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

ShapeSheet Row Self Reference

Started by thekingofspain, December 22, 2022, 06:56:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I am trying create a generic shapesheet formula that uses the current row's index.  The theory is that the current row's index can be used to reference another row by a given offset or to calculate some magic number.

In the UML Sequence template's UML Actors shape, the Connection Points Y formulas are a series of hard coded formulas that I would to convert to a single formula that uses the current row's row index.  Thus one can just copy and paste the existing formula to a new row when an additional connection point is needed on the shape.

Row 1.Y      = IF(Controls.Row_1.Y<-6.35 mm,-6.35 mm,Controls.Row_1.Y)
Row 2.Y      = IF(Controls.Row_1.Y<-12.7 mm,-12.7 mm,Controls.Row_1.Y+MODULUS(ABS(Controls.Row_1.Y),6.35))
Row 100.Y  = IF(Controls.Row_1.Y<-635 mm,-635 mm,Controls.Row_1.Y+MODULUS(ABS(Controls.Row_1.Y),6.35))

To something like
Row n.Y     = IF(Controls.Row_1.Y< thisRow.Index * User.ConnectionPointWidth < thisRow.Index * User.ConnectionPointWidth, Controls.Row_1.Y+MODULUS(ABS(Controls.Row_1.Y), User.ConnectionPointWidth))

Is such a thing possible directly or indirectly via the default row name?




I see two ways:
1. using VBA code to fill in these lines (the easiest way)
2. using the CONCATENATE function in Excel, generate a long formula that will correct the formulas in these 100 cells.


I just used excel as a hack to create 100 fixed formulas and then created 100 rows via in visio via menus clicks (only accidently deleted the connection points section once) and then performed a 100 copy & pastes.  However I would like to leverage the shapesheet itself going forward.

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: 196 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1053KB.
Tokens: post-login.
Cache hits: 13: 0.00143s for 26,764 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]