How can I set set value for properties of Shapes

Started by bazinga, November 25, 2015, 05:31:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bazinga

Hi Guys,
Visio newbie here.

The user defined cells value is read only and cannot be changed according to this microsoft page - https://msdn.microsoft.com/en-us/library/office/ff765764.aspx

My goal is to mark the shape so that I can identify it later in the code. For example, I copy a shape and move towards right. Then I repeat this for 5 times. Now I have 6 shapes. I'd like to mark all these shapes so that I can access it through some property value and group them. I cannot use the name or other existing properties because the shapes can be used somewhere in the same document.

Any ideas?

Thank you for you help.

Yacine

Hi Bazinga,
If you had read the article of the mentioned link till the end, you would have found that despite CELLS is read only, it has a property FORMULA that has read/write access.
Thus: shp.cells("user.myProperty").formula=chr(34)&"something"&chr(34)

HTH,
Y.
Yacine

Browser ID: smf (is_webkit)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 156 (show)
Files included: 34 - 1321KB. (show)
Memory used: 1063KB.
Tokens: post-login.
Cache hits: 13: 0.00267s for 26,582 bytes (show)
Cache misses: 2: (show)
Queries used: 20.

[Show Queries]