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.

Controlling object text display through display options

Anonymous
Not applicable
I was wondering if there was a creative way to display text within an object by control of for example window and door marker through the display options?

I have objects with text and would like a simple way to turn them off through display settings. e.g. when I print a review set I do not want the text to show as opposed to when I print final working drawings.

Help is greatly appreciated
8 REPLIES 8
Barry Kelly
Moderator
Sure.
You can use either ...

REQUEST ("window_show_dim", "", show)
Returns 1 in the show variable if in the Model View Options/Window options the "with Markers" is checked, 0 otherwise.

Or ...

REQUEST ("door_show_dim", "", show)
Returns 1 in the show variable if in the Model View Options/Door options the "with Markers" is checked, 0 otherwise.


So in your 2D script for every TEXT2 command you would need ...


dummy = request ("window_show_dim", " ", show)
if show = 1 then
TEXT2 .....
endif

I have also used ...

REQUEST ("floor_plan_option", "", storyViewpointType)
Returns the story viewpoint type which is set in the Model View Options. 0 stands for "Floor Plan", 1 stands for "Ceiling Plan".


These days it can be done with Library Globals but this is a bit more involved to set up.

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
Awesome! worked like a champ. Thank you.
What would be a best way to write this function?
dt= Display text (Check Box)
I would like control the text being visible or hidden based on dt (Value)
unless the request ("window_show_dim", " ", show) is off then the text will remain hidden.
Hope that makes sense?
Anonymous
Not applicable
Think I have it?

Deadreq = request ("window_show_dim", " ", show)
if show = 1 and dt=1 then
TEXT2 txtx,txty,CABSIZE

Is this correct?
Barry Kelly
Moderator
Yes that would work.
If both those values were "1" (on) then the text will show.
If either is "0" (off) then there will be no text.

The dt checkbox will control the text on an object by object basis.
The MVO show window marker will control all objects with text globally.

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
Thank you very much. Big help.
Anonymous
Not applicable
Sorry to continue with another question. How do you get rid of the "Uninitialized variable" which I am guessing is the "dummy" value
Barry Kelly
Moderator
Just add ... dummy = 0 ... at the beginning of the 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
Yes, Thanks again. It is weird the check code works now, I run it and it reports no errors run it again and reports multiple errors. It acts as if it cannot check get statement properly or any function outside the object script itself. Any how you have been a big help, Thanks.