Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Reference Plane / 2D Lines in Elevation

Anonymous
Not applicable
Ok, so i'm working on my first GDL object, i've got a minor in CS so the programming is not an issue, just trying to get all the syntax down. Before moving to ArchiCAD i was using Revit. It had a great tool called reference plane that would basically cut a plane through the model, and would only be visible on edge. So you could draw a line in plan and it would show up in elevation and section. It could be used for column lines as well. Anyway, i haven't been using archiCAD very long, so I wanted to make sure I wasn't reinventing the wheel, and if not, any advice on ways to approach this would bw appriciated.
8 REPLIES 8
Anonymous
Not applicable
My understanding is that you want a line drawn in plan to show in the section view as well?

In AC there is always a split between the 2d & 3d so you will have to make an object and script it to draw a line in 2d (using the LINE2 command) and then again in 3d using the LIN_ command.

The LIN_ command only does solid lines so if you want it dashed, you will have to program a loop to create 3d dashed lines (see some of the door macros in the standard library for examples).

If you want a plane then the 3d script can draw that (using PLANE) while the 2d script just draws a line

If you want the line/plane to not show in the 3d window you can use the "GLOB_CONTEXT" gobal variable to determine which type of view the line is appearing in and draw it accordingly, ie sections only.

Any help?

regards
Aussie John
Newcomer
Two of the main project menus are the "3d cutaway" and "3d cutting planes" commands under "image". This is not a GDL scripting thing.

This will give you a temporary cutting line by drawing a line on a facsimile of the plan.
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]
Anonymous
Not applicable
So i'm beginning to realize the major error in the tool i'd like to create. You can only snap to hotspots in GDL objects, is this correct? If this is the the case, then having a "guide line" that you can't snap to doesn't help me at all. Is it possible to define how an object is viewed in different elevations? or is all of that information derived from the 3d model?
Anonymous
Not applicable
I do not know of any way snapping to a line in 3d, short of putting lots and lots of hotspots in, the curor will pick up lines in section when they are parts of objects.

All the section information is derived from the 3d window, you can alter the 3d script when called from a section window but you cannot determine the name of the section window ( so you cannot tailor your object to individual views )

big help
Vitruvius
Booster
Dalek,

You can determine how a GDL object will look in different windows using GLOB_CONTEXT. In the example below, GLOB_CONTEXT = 2 is the 2D Plan View. 3 is 3D View; 4 is Section/Elevation View.

3D SCRIPT WINDOW (this will cut your symbol at a desired height, for example 1200 mm above the floor):

IF GLOB_CONTEXT = 2 THEN
ADDz Cut Object @ Height
PEN Pen @ Cut Line
CUTPLANE
DEL 1
ENDIF

2D SCRIPT WINDOW (this will project the above cut view):

PROJECT2 3,270,2

You could probably use the above to script a 3D Line object using "stretchy" hotspots at either end. It could look different depending on which window you're viewing it from.
Cameron Hestler, Architect
Archicad 27 / Mac Studio M1 Max - 32 GB / LG24" Monitors / 14.5 Sonoma
dalek wrote:
So i'm beginning to realize the major error in the tool i'd like to create. You can only snap to hotspots in GDL objects, is this correct? If this is the the case, then having a "guide line" that you can't snap to doesn't help me at all. Is it possible to define how an object is viewed in different elevations? or is all of that information derived from the 3d model?
Did you mean snapping in 2D or in 3D? I guess you meant both. For 2D, At the moment you have to snap to a hotspot or draw a selection rectangle round a hotspot location.
One thing i can say which will help you here (because I am bound by rules) is to advise you to get into the habit of scripting things in 2D using LINE2 and ARC2 wherever possible, use POLY2_ in as much as you can. Get out of the habit of relying on the lazy old PROJECT2.
You will find this a very good investment of your time, in the future.
Vitruvius
Booster
DNC,

I must question your comment vis-a-vis PROJECT2 being inferior to scripting a 2D symbol using LINE2, etc..

Each has it's own merits, and quite often, it is far more sensible and economical to utilize PROJECT2 rather than to invest more time in a marginal improvement using 2D scripting. This is especially true with complex, highly varied, or non-orthagonal geometries such as space frames, tilted glazing systems, unusual shapes etc. Especially if they're project specific.

The goal should be design and documentation (with the commensurate profit!!) - and the above question regarding GDL scripting should be evaluated on a cost-benefit basis. Elegant scripting is not a goal unto itself!

Cheers, Cameron
Cameron Hestler, Architect
Archicad 27 / Mac Studio M1 Max - 32 GB / LG24" Monitors / 14.5 Sonoma
Vitruvius wrote:
Each has it's own merits, and quite often, it is far more sensible and economical to utilize PROJECT2 rather than to invest more time in a marginal improvement using 2D scripting. This is especially true with complex, highly varied, or non-orthagonal geometries such as space frames, tilted glazing systems, unusual shapes etc. Especially if they're project specific.
Perhaps you didnt note the preceding discussion which was about the SELECTION of Objects and frustration that this was limited to HOT SPOTs. If you have PROJECT2, you have a transparent symbol. (I know you can have a code 3 version with material fills, but this is slow to draw). Selection is difficult with PROJECT2, regen time is slow. You might still need some smart scripting with some trigonometry to make hotspots land on the right place if you want to do better than the bounding box.

i was dropping a major hint to the questioner, that using POLY2, LINE2 and ARC2 will lead to profit, if you see the economical use of your time (rapid and sure selection of objects) as leading to profit. (perhaps not now, but next year)

You mention that the purpose is to make profit through design and documentation. This is not everybodys purpose. If one's main interest is in GDL, and one is not fortunate enough to be designing apartment blocks, there is considerable benefit in writing code that is easy to maintain and develop, and in its own way this leads to wellbeing. One does not take ones children or ones granny for a walk in the park for profit - there are things one can do for wellbeing.