Shapesheet row exist?

Started by Miki, May 01, 2015, 08:26:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Miki

Hello,
I have a code where I select a shape and insert Shape data rows in shapesheet using a form.
Now once the rows are inserted, when I select the same shape and want to change the value via the same form it gives me an error.
I tried inserting a check for if a row exist or not but was unsuccessful on how to use the syntax for that expression.

I want to know if:
xPS is my selected visio shape, and I want to know if I have a row named "Prop.Grnd" under "Shape Data" section
Is there are syntax for that? I tried xPS.RowExists but didn't understand how it works?

Can anyone please help me understand this?

Thanks,
- Miki

Miki

No worries.
Figured it out.
I used "CellExists" syntax and it works fine.

Just to let others know how this works is:
Lets say you have a selected shape "xPS" and you want to check is contains "Prop.PerGrnd", then use the following code line:

xPS.CellExists("Prop.PerGrnd",0)

If the it exists, it will give "-1" and if not, it will give "0".

Regards,
-Miki