News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

How to select ALL shapes linked to rows with a specific value

Started by fahnoubi, November 27, 2014, 02:04:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fahnoubi

Dear people,

so I have a huge Visio diagram where every shape is linked to a row in a table. I would like to select all the shapes that are linked to a row that has "X" as a value for a specific column, so I can change the color of these shapes. Is there an easy way to do this?

Thanks! :D

Yacine

Fastest would be a small macro:
activewindow.desellectall
for each shp in activepage.shapes
  if shp.cellexists("prop." & "RowSoAndSo", visexistsanywhere) then
    if shp.cells("prop." & "RowSoAndSo").resultstr("") = chr(34) & "X" & chr(34) then 'not sure about the chr(34) - depends on the field.
      activewindow.select shp visselect
    endif
  endif
next shp

You end up with the desired shapes selected and can apply the desired modifications. (Or set it to a new layer, so you can re-select the shapes later by their layer.
Yacine

Browser ID: smf (possibly_robot)
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: 160 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1055KB.
Tokens: post-login.
Cache hits: 13: 0.00176s for 26,731 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]