GDL
About building parametric objects with GDL.

How to Set Different 2D Symbols for Plan and Elevation (GDL Object)

Marcelov
Contributor

Hey everyone! I'm starting to build a landscaping library for myself, and I was wondering if anyone could help. I want to take a 3D object and customize how it looks in both the floor plan and elevation — like replacing the automatic view with fixed 2D drawings for each. If anyone knows of any content or resources I could check out, that would help too. I'm currently looking into the GDL Reference Guide and the GDL Handbook from Cadimage. 

thx for help.

4 REPLIES 4
scottjm
Advisor

The 2D is easy, whatever you script in the 2D script or saw in the 2D symbols is going to show in 2D. 

show something different in a section/elevation is a little trickier. GLOB_VIEW_TYPE will allow you to identify when you are viewing the object from a section/elevation. So therefore in your 3d script with a simple if/else you can create different geometry to that which is displaying in a regular 3d view.
Unfortunately if you want to display what looked like 2D linework or a 2D symbol in a section or elevation, you would still have to create or fake this out of 3d geometry, as you can’t use any of the 2D script functions and section/elevation is always just a projected view of the 3d element. 

 

If you wanted to show a colour image in the section / elevation, I believe there is an object in the standard Archicad library for a tree cutout, that you might be able to steal code from. 

 

https://gdl.graphisoft.com/reference-guide/general-object-parameters/

 

in terms of other GDL reference material, check out barking dog on YouTube. 

https://youtube.com/@barkingdogbim

Scott J. Moore | Fulton Trotter Architects | BIM Manager, Associate, Architect
Since AC13 | Current versions AC23.7000 & AC26.5002 | BIMCloud Basic | Python, GDL, VBA, PHP, SQL, CSS
Certified Graphisoft BIM Manger (2022)
Win 10, i9-9900K, 32GB, Quadro P2200, 500GB NVMe
Barry Kelly
Moderator

The other thing you can do is you can place a 2D object in an elevation.

So you could script a separate object for tree elevations, or you could have it as an optional 2D view in the one object (just look at some of the Graphisoft trees that can do both plan and elevation views).

Note, you will have to place the objects separately in plan and elevation and they won't be linked to each other at all.

Changing/moving one will not affect the other.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Marcelov
Contributor

 

Thank you for the tips. I am still testing a few things, but I have already managed to achieve three different representations in different views: one for the floor plan, one for sections and elevations, and one for 3D.

I would also like to take this opportunity to ask if, regarding the floor plan, there is a way, through GDL coding in the symbol script, that when at least two identical objects are placed, they would appear as a single outline, merging into one object in the representation.

Once again, thank you very much for the tips.

That’s great to hear!
Unfortunately no ability to know if another identical object is placed next to one and other though.  (Well there is but it involves c++ API coding and is totally unrealistic to implement)

Your best bet would be to add an option in your object to manually activate that option, when you need it. 

Scott J. Moore | Fulton Trotter Architects | BIM Manager, Associate, Architect
Since AC13 | Current versions AC23.7000 & AC26.5002 | BIMCloud Basic | Python, GDL, VBA, PHP, SQL, CSS
Certified Graphisoft BIM Manger (2022)
Win 10, i9-9900K, 32GB, Quadro P2200, 500GB NVMe