In the past couple of months I've been in a GDL streak creating, updating and fixing lots of little self made parts... and the code just seemed to flow; so I tackled my wish to have (make, to learn, in my case) a dynamic polyline. A few months ago, I sketched a new "parking place" object that I wanted, but just didn't have the time to do; and didn't
really need because I've just been adding stuff and parameters to the GS parking place object for years.
I did some research a few years ago, but just kept the links for reference. Now that I was naturally digging into GDL again, I though I could make it possible.
The basic code for a Dynamic Polyline is useful for me; and I thought many people here could benefit from it. I tried several approaches for two weeks trying to make it work the way I wanted (I'm really no expert in GDL). It solves a few issues and serves as learning resource too, as it dynamically adds points to the polyline between segments, adds points at the end, dynamically removes points and dynamically grows and shrinks arrays.
I already have other ideas for this, like a 3D railing (the code already has Z for each point). I'm not putting it in BIMcomponents (this is for AC15+) or the Depository as it is not a final product.
I hope you find it useful, if you do, leave a comment; the only condition is that if you use it for something, you must post back the developed object with the code unlocked so other people can see how to implement it in new objects.
(so please, no locked commercial derivatives... this is for the community)
Thanks to the plethora of information found in this community.http://Archicad-talk.Graphisoft.com/viewtopic.php?p=164099&highlight=polyline#164099http://Archicad-talk.Graphisoft.com/viewtopic.php?p=167325&highlight=dynamic+array#167325http://Archicad-talk.Graphisoft.com/viewtopic.php?p=163424&highlight=dynamic+array#163424http://Archicad-talk.Graphisoft.com/viewtopic.php?p=117388&sid=84c8152f200b0e00fce3c5ca31cce51ehttp://Archicad-talk.Graphisoft.com/viewtopic.php?t=30992&postdays=0&postorder=asc&&start=30&sid=5b2...
The "Dynamic Polyline ER" base code object:
EDIT: new version: added a few things, like length of the segments, and a visual constraint for the first segment to keep at least 2 points.