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

Shape array in shapesheet

Started by dmacleod101, July 15, 2021, 11:25:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dmacleod101

Hi All,
I am working on a smart shape for a section of a guyed tower. The idea is to add some data into the group shape that allows the height, width, diameter of legs, etc to be defined and all elements within the group update accordingly. I have managed to setup the outline of the structure (Legs and Horizontal bracing top and bottom) along with the first of the diagonal bracing. As several of the elements are replicated throughout the shape X times depending on the section height, I would like to be able to create an array or duplicate these shapes X times. I have used the array shapes feature before but not sure how to achieve this from the shapesheet data.
Any ideas on the best way to achieve this?


Surrogate

IMHO It is impossible via shapesheet! May be fillpattern for diagonal bracing ?

Yacine

#2
The trick is to not generate new shapes dynamically when needed, but to hide them when they are not.

Basically you would position the subshapes based on an index stored in a field - eg "prop.n".
The parent shape would have a field (in the attached file "user.maxN") that can be used to check if the index of the subshape is in the range and subsequently show or hide the sub-shape.
In my case maxN is directly proportional to the height of the group.
Each of the sub-shapes will have a command to increment the index by one when the shape is duplicate (cell "EventDrop"), so you don't need to write it manually, just duplicate the shape as many times as reasonable.

Hiding the subshapes can either be done via the geometry section (cell "noline") for simple shapes. For complexe shapes (like in my example), you can either superpose them with the first item or chose anoter appropriate methode (cf "the hidden world of shapes" in this forum).

HTH, Y.
Yacine

wapperdude

An alternative that would be shapesheet contained...
Pre-build the max structure, using multiple Geometry Sections.  Then, as suggested, use Shape Data to get the total number of sections up to max limit.

For example, let's say the tallest structure uses 10 sections.  In the shapeshjeet, would add Geometry sections such hat total number is 10.  The visibility of each section would be controlled by the User specified entry, say 5.  Thus, Geometry sections 1- 5 would be visibile, and 6-10 would be hidden.

Each Geometry section would be defined such that if would stack upon the immediately preceding section.  Thus, there is only one shape.  Limitation is that the shape properties apply universally to all Geometry sections.

Visio 2019 Pro

Yacine

Quote from: wapperdude on July 16, 2021, 06:43:51 PM
An alternative that would be shapesheet contained...

That's not an alternative but a better explanation in plain english of what I was trying to say. :D .
Yacine

wapperdude

@Yacine:  Hmmm.  Maybe I looked at wrong attachment.  The one I saw appeared to be a grouped shape.  I was trying to avoid duplicating you.  Oh well.
Visio 2019 Pro

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: 244 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1112KB.
Tokens: post-login.
Cache hits: 13: 0.00133s for 26,767 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]