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

Requesting Drawing Window Type

Anonymous
Not applicable
Hi Friends,
This is a 2part question:
firstly can you request the window type? (ie Section, Elevation, Interior Elevation, Details) I have created a simple text object but want it to be smart enough to know what kind of window its in & to change parameters accordingly.
also, can you substitute abbreviations for actual text? ie my Elevation Marker reads NE, but in the above created object I want the WndID to come out "NorthEast".

regards.
4 REPLIES 4
David Larrew
Booster
1. I think what you are looking for is... "GLOB_CONTEXT"

2. Depending on the object parameters, you could set a "custom text" in lieu of the ID.
David Larrew, AIA, GDLA, GSRC

Architectural Technology Specialist

a r c h i S O L U T I O N S



WIN7-10/ OSX 10.15.7

AC 5.1-25 USA
Anonymous
Not applicable
Hi David, Thanks for your advice, I have tried the GLOB_CONTEXT , & it just returns the number 2. I need that to actually read the Window Type.

Can you elborate on the custom text?
Anonymous
Not applicable
Hello,

With either or both of these you can determine the situation quite well;

GLOB_CONTEXT contains the info of the active appearance (window)
AC 12 GDL Reference Guide p. 227
GLOB_CONTEXT context of appearance 
1-library part editor
2-floor plan
3-3D view
4-section/elevation
5-settings dialog
6-list
7 - detail drawing
8 - layout
22 - editing feedback mode from the floor plan
23 - editing feedback mode from a 3Dview
24 - editing feedback mode from a section/elevation
28 - editing feedback mode from a layout
43 - generating as an operator from a 3D view
44 - generating as an operator from a section/elevation
46 - generating as an operator from a  list
homeContext contains the info of the placement
AC 12 GDL Reference Guide p. 259
REQUEST ("HomeDB_info", "", homeDBIntId, homeDBUserId, homeDBName, homeContext) 
Returns in the given variables the internal ID (integer), the user ID and name (strings) of the home database (where the library part containing 
this request was placed). 
• if placed on the floor plan: the story internal ID, index as a string and name, homeContext = 1 
• if placed on a section: the section internal ID, reference IDand name, homeContext = 2 
• if placed on a detail: the detail internal ID, reference ID and name, homeContext = 3 
• if placed on a master layout: the layout internal ID, empty string and name, homeContext = 4 
• if placed on a layout: the layout internal ID, number and name, homeContext = 5 
For labels the returned data refers to the labeled element. The collected data can be used to uniquely identify elements in different ArchiCAD databases of a plan file. 


Hope this helps.

--
Regards, Juha
David Larrew
Booster
You can use the GLOB_CONTEXT like this...

If GLOB_CONTEXT=(#) Then ... (you can script how you want the object to act or fill in a text value parameter to describe the window type)

You can script an If/Then/Else statement to substitute the listed value (ID or custom text parameter) that you are using for your label...

txtLBL=GLOB_ID !(txtLBL text parameter = object ID)

If GLOB_CONTEXT=2 Then !(when viewed from the floor plan window)
txtLBL=custom_text !(txtLBL = custom_text text parameter)
EndIf

PARAMETERS txtLBL=txtLBL !(txtLBL value is reflected in the GUI)
David Larrew, AIA, GDLA, GSRC

Architectural Technology Specialist

a r c h i S O L U T I O N S



WIN7-10/ OSX 10.15.7

AC 5.1-25 USA