GDL
About building parametric objects with GDL.

Dynamic Polyline base code object

sinceV6
Advocate
Hello everyone.

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.
 

Enjoy.

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.
47 REPLIES 47
Mario Sacco
Expert
Here 2d view
MacBook M1 Max 64GB- OS X 12.2.1 - Archicad 27
https://www.archiradar.it/en/
boatingcow
Booster
Olivier, Mario, this tool is excellent. I think it should be a native feature of ArchiCAD! I have been looking for a tool like this for a while (see this post: http://archicad-talk.graphisoft.com/viewtopic.php?t=45472) but my GDL isn't so good!

Do you think it would be difficult to report the length of each segment and also the total length in the schedules? Also, do you think it would be difficult to show a cross-section area, or report a total volume? Thanks
ArchiCAD 24 | Dell Precision 5750 | 32GB RAM | Nvidia RTX 3000 6GB | Windows 11 Pro
Mario Sacco
Expert
boatingcow wrote:
Olivier, Mario, this tool is excellent. I think it should be a native feature of ArchiCAD! I have been looking for a tool like this for a while (see this post: http://archicad-talk.graphisoft.com/viewtopic.php?t=45472) but my GDL isn't so good!

Do you think it would be difficult to report the length of each segment and also the total length in the schedules? Also, do you think it would be difficult to show a cross-section area, or report a total volume? Thanks
No it's not difficult. The master object already compute lenght of each segment and total. I need only add a variable in the parameters. Also the volume, if I set a section, as in the other my object based on the same master.
MacBook M1 Max 64GB- OS X 12.2.1 - Archicad 27
https://www.archiradar.it/en/
Anonymous
Not applicable
Great job!
Could be a good starting point for some interesting objects.
Thanks for sharing!
Anonymous
Not applicable
Olivier wrote:
*SNIP*
Wow, Olivier, this object is amazing! I have been searching for a fuature like this forever! So handy for drawing eave lines, floor lines etc. that you want to be visible across multiple floors.

I can only think of one way to improve this. Right now the floor plan display options for this object is a little limited with the options "show on relevant stories", "all stories", or "home story +above/below" etc.

Would it be possible to change the object code so the floor plan display options act like they do for slabs and roofs? I.e with a custom setting, where you can select on how many floors up and down you want the object to be visible?

Thanks for this!
Such options are possible(in any object), however the UI must be different as all settings must be done "in object". Something similar is in elevator object in the default library.

Piotr
Lingwisyer
Guru
This should totally be pinned in this sub-forum.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win10 | R5 2600 | 16GB | GTX1660 
Agreed. And or even a thread where we can post the objects we make, or leave links so its easy to find the work that has generated from this code.
Hmooslechner
Rockstar
i updatet my old object with the "new Profile" - Commands:

german, turn off the sound, just watch..


Bimcomponents:
https://bimcomponents.com/GSM/Details/23833
AC5.5-AC27EduAut, PC-Win10, MacbookAirM1, MacbookM1Max, Win-I7+Nvidia
Barry Kelly
Moderator
Hmooslechner wrote:
i updatet my old object with the "new Profile" - Commands:

Looks great but I can't download (drag & drop) from BimComponents to 23.


Any body else able to do it?
Website counts it as being downloaded even though it isn't.

Also I can only access it via your link.
Searching for it in BIMComponents or in the object settings shows nothing.


Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!