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
derekjackson
Expert
Thanks Erwin, but we'll need it to be a layout object (as it'll be a scale bar in the end).

I got the Autotext <DRAWINGSCALE> working fine on the layout, but that's not much help, as GDL can't process the content of it.
http://www.lsiarchitects.co.uk
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
Erwin Edel
Rockstar
Instead of object for the 'stamp' at the bottom of the drawing (can't think of the english name, early mondays!) we use a worksheet we just placed on the masterlayout. The autotext in this works just fine with whatever we put on the layout afterwards. Maybe your object will work this way too.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-26NED FULL
Windows 10 Pro
Adobe Design Premium CS5
Anonymous
Not applicable
create an object with subtype drawing title

create a text parameter AC_OriginalDrawingScale
in the parameter's value field type 1:50 to initialise
and then hide it.


then in 2d script text2 0,0 AC_OriginalDrawingScale

then save

now on first look you will get a value 1:50
go view setting and change scale value. It will update.

I hope this is what you were looking for.
derekjackson
Expert
Thanks ispyridis, I've had a go but there's something odd.

As soon as I select the 'Drawing Title' subtype, I seem to no longer be able to place the object as a normal GSM file. It doesn't throw up any errors in the scripting area, but it doesn't appear alongside the others in the object selection area.

I've tested with a blank object (New Object, then Save As) and it works fine for, say, 'Drawing Symbol', but the moment I change it to 'Title', it no longer appears.

If I try to pick it directly through the 'Load Other Object' settings, then I get an error saying 'The selected file is not a General GDL Object file. Please select a valid General GDL Object file.'

Are Drawing Title objects used / placed differently?
http://www.lsiarchitects.co.uk
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
David Maudlin
Rockstar
derekjackson wrote:
Are Drawing Title objects used / placed differently?
They can only be placed as a Title to a Drawing on a Layout sheet.

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 - I wasn't even aware that the title of a drawing could be an object.

The code works great.

Unfortunately we're after something we can place on our Master Layouts before any drawings have been created, so this won't help.

Thanks for the input anyway people - I guess we need to write this off as unachievable at the minute!

A useful bit of R&D though
http://www.lsiarchitects.co.uk
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
Erwin Edel
Rockstar
Have you tried putting the object on a worksheet, saving a view of that and putting that view on the (master) layout. As I wrote before, this works fine for us with autotext picking up information about scale and such.
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

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