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

Reading Autotext

derekjackson
Expert
Hi,
I was wondering if it's still the case that GDL objects can't read Autotext values?

We're wanting to make a scale bar object that automatically displays the correct scale when placed on a sheet (based on the Autotext Drawing Scale value).

I read something here about outputting to an XML file but that seems a step too far. Can they not even be read in a text string in some form?

Thanks,

Derek
http://www.lsiarchitects.co.uk
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
26 REPLIES 26
Barry Kelly
Moderator
That parameter is not part of the 'Drawing Title' subtype (or any other that I know of) - but you should be able to just add it in.

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
derekjackson
Expert
Hmm - thanks Barry, but surely just adding it in manually will make the object think it's a user-defined parameter, rather than looking at anything within the current project?
http://www.lsiarchitects.co.uk
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
David Maudlin
Rockstar
Derek:

Just add the parameter as shown in my screen shot. The blue ones that are part of the Sub-Type are not editable, the black ones are. From Parameters set by ARCHICAD:
The new method of ARCHICAD for providing information is the method of fixed named optional parameters. If a given library part has a parameter matching a fix named optional parameter in name and in type, sets its value according to its function.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
derekjackson
Expert
Thanks guys, but it simply isn't working.

I've taken it back to basics, and started a new 'Drawing Title' object.

I've manually added in the AC_DrawingScale parameter, and given it an initial value.

The only script I then have is a simple
text2 0, 0, AC_DrawingScale
line in the 2D script.

All it does it output my initial value, rather than picking up the actual scale.

What am I missing?
http://www.lsiarchitects.co.uk
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
David Maudlin
Rockstar
Derek:

In my code where I want the drawing scale text shown I have the line:
Text2 0, 0, "<DRAWINGSCALE>"

If that does not work, zip and attach the library part to your post so we can see the whole thing.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
derekjackson
Expert
Thanks David, that's got the drawing scale correctly outputting.

However, digging in to it, my code still doesn't recognise the AC_DrawingScale variable - it's still just looking at the Autotext for the 2D script.

I even removed any reference to AC_DrawingScale and the object still gave the Autotext output, so I'm not sure how to work with it.

I've attached it in case you have any idea what I'm missing?

My Parameter list simply has 'AC_DrawingScale' as a text input with a default set to 'x'.

My 2D script is then:
text2 0, 0, "<DRAWINGSCALE>"

! Check if recognising AC_DrawingScale
IF strstr(AC_DrawingScale, "1mm = 20mm") THEN
	text2 0, -0.1, "20"
ENDIF

IF strstr(AC_DrawingScale, "x") THEN
	text2 0, -0.1, "x"
ENDIF
And the object then outputs the correct Autotext scale, and then an 'x' (suggesting the AC_DrawingScale parameter isn't being affected by the project environment).

Thanks,

Derek
http://www.lsiarchitects.co.uk
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
Erwin Edel
Rockstar
You can exclude placed drawings from being included in autotext.

Look for the tickbox "Include Scale in Autotexting and Indexes" in the drawing selection settings dialogue.

This was included a few versions ago and was most welcome!
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
David Maudlin
Rockstar
derek:

The library part you posted has a SubType of Drawing Symbol, not Drawing Title. The Drawing Title is part of a placed Drawing, the Drawing Symbol can be placed independently and will read the scales of all the Drawings placed on the Layout. I tried playing with your library part but did not make any progress, it may not be possible to do what I did with a Drawing Symbol.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
derekjackson
Expert
I've changed the subtype to Drawing Title, and reduced the 2D script to simply
text2 0, 0, AC_DrawingScale
I've defined an 'AC_DrawingScale' parameter with a default value of 'x', and the object just outputs 'x', rather than looking at the drawing scale.

Looking like it can't be done...
http://www.lsiarchitects.co.uk
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
Erwin Edel
Rockstar
How about placing the object in floorplan? It should be easy to pick up the scale of the floor plan view, as lots of objects use this to determine how detailed the symbol should be.

Placing a simple textbox with autotext works fine in any view, that's what we use instead of drawing titles to show the drawing name.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5