Author Topic: Shape array in shapesheet  (Read 3622 times)

0 Members and 1 Guest are viewing this topic.

dmacleod101

  • Newbie
  • *
  • Posts: 3
Shape array in shapesheet
« on: July 15, 2021, 06:25:03 PM »
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

  • Hero Member
  • *****
  • Posts: 1328
    • ShapeSheet™ Knowledge Base
Re: Shape array in shapesheet
« Reply #1 on: July 15, 2021, 06:44:29 PM »
IMHO It is impossible via shapesheet! May be fillpattern for diagonal bracing ?

Yacine

  • Hero Member
  • *****
  • Posts: 2739
Re: Shape array in shapesheet
« Reply #2 on: July 16, 2021, 06:48:10 AM »
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.
« Last Edit: July 16, 2021, 06:50:51 AM by Yacine »
Yacine

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4046
  • Ideas Visio-lized into solutions
Re: Shape array in shapesheet
« Reply #3 on: July 16, 2021, 01:43:51 PM »
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

  • Hero Member
  • *****
  • Posts: 2739
Re: Shape array in shapesheet
« Reply #4 on: July 16, 2021, 01:56:13 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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4046
  • Ideas Visio-lized into solutions
Re: Shape array in shapesheet
« Reply #5 on: July 16, 2021, 02:30:07 PM »
@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