We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Global view dependent 2d scripts.. HOW?

Anonymous
Not applicable
Hi Guys.

Im currently scripting a tree object using AC21, I need to define 2d scripts for plan (default 2d scriptpage) section, and elevation.
It´s no proplem doing the script for the plan view, as this is the default. But defining section and elevation views have become a challenge. I have tried:

IF GLOB_VIEW_TYPE = 4 THEN (Section)
2dscript..........
ENDIF

IF GLOB_VIEW_TYPE = 5 THEN (Elevation)
2dscript....
ENDIF

However viewing the model in Section and elevations Ac still sows a projection of the 3d model/script.

What am I missing here?

Any simple tips & tricks would be highly appreciated
4 REPLIES 4
Barry Kelly
Moderator
If you are placing the object in plan then there is no point scripting in the 2D script for sections and elevations.
These use the 3D script.
So you need to either place the object again in the elevation view (I think this might work but have not tested) or better do your 'if section/elevation' bit in the 3D script.

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
Anonymous
Not applicable
Hi Barry Kelly. Thx´for the reply...

I´m aware, and a frequent user the "PROJECT2..." codes however this time it´s different

Im on a quest to create a simple "tree object" the challenge is to create a simple 3d geo. for the tree, above and below terrain level.
Furthermore there´s specific demands for the 2d expressions ex. different fills for roots and crown etc.

Thus I need to script different graphics for the different views, in order to create satisfying 2d graphics

..So I need to control which 2d script is read in different Global views...


Just like MVO settings...

It should be possible!?
Barry Kelly
Moderator
What I was trying to say is that the 2D script is not read in the sections and elevations (if the object was place in the plan view).
It is the 3D script you need to alter.

i.e.
IF GLOB_VIEW_TYPE = 3 then
	SPHERE 1.0
ENDIF
IF GLOB_VIEW_TYPE = 4 then
	BLOCK 1.0,1.0,1.0
ENDIF

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
Anonymous
Not applicable
Ahhh There it is..

I see now, that´s what you wrote in the first reply, sorry for not getting it the first time.

I was so focused on the 2d script. I couldn´t imagine I had to do it in the 3d script.

Thank you. You just made my day 😉

M7