2 weeks ago
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.
2 weeks ago
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
2 weeks ago
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.
2 weeks ago
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.
2 weeks ago
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.