Reading Autotext
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-01-06 01:52 PM
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://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-01-06 04:43 PM
I see you are on 19 so I don't know if that version has been upgraded to use it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-01-06 04:48 PM
That's halfway there, but we want to then analyse the content of the autotext output, so I guess it can't be done (yet)
Oh well - I'll just have to trust my colleagues to manually enter the scale on the scale bar object

http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-01-06 05:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-01-06 05:51 PM
I'm struggling to find a reference for how to call ac_drawingScale - I don't suppose you know of one? I suspect it's somewhere in the REQUEST syntax but not getting very far...
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-01-06 06:23 PM
You could also interrogate a drawing view title to see how that is put together.
There is a scale bar object in the UK library but I couldn't get it to work logically. Could be worth checking the code to see if it offers any pointers.
Going back to basics I don't see how a scale bar in paper space could shown anything other than 1:1 units, this makes sense as it allows some less digitally savvy operators to print to the right size (recent issue for me). If you have a view at 1:50 and another detail at 1:20 how should the scale bar react?
For me the only logical solution for an adaptive scale bar is to place it in the view where it can adjust to the GLOB_SCALE variable.
One final observation while you are trying to resolve the scale bar you may find you drawings carry a big disclaimer "DO NOT SCALE"...


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-01-07 03:56 PM
This is what I did to add a graphic scale to my Drawing Title. It is not elegant but gets the job done:
ds = AC_DrawingScale
ds1 = `1' = 1'-0"`
ds2 = `6" = 1'-0"`
ds4 = `3" = 1'-0"`
ds8 = `1 1/2"= 1'-0"`
ds12 = `1" = 1'-0"`
ds18 = `3/4" = 1'-0"`
ds24 = `1/2" = 1'-0"`
ds36 = `3/8" = 1'-0"`
ds48 = `1/4" = 1'-0"`
ds72 = `3/16" = 1'-0"`
ds96 = `1/8" = 1'-0"`
ds144 = `3/32" = 1'-0"`
ds192 = `1/16" = 1'-0"`
ds120 = `1" = 10'`
ds240 = `1" = 20'`
ds360 = `1" = 30'`
ds480 = `1" = 40'`
ds600 = `1" = 50'`
ds1200 = `1" =100'`
If AC_DrawingScale = ds1 Then
noma = `1/4"`
nomz = `1/2"`
noend = `1"`
EndIf
If AC_DrawingScale = ds2 Then
noma = `1/2"`
nomz = `1"`
noend = `2"`
EndIf
If AC_DrawingScale = ds4 Then
...
The graphic scale is always an inch long, with the correct units displayed for the scale. Note the number of spaces in each text string, they vary from scale to scale. More complicated scales should be possible. I think I poached this approach from one of the Graphisoft graphic scales, but I don't see a Graphisoft Drawing Title with the graphic scale option anymore.
HTH,
David
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-01-09 01:20 PM
that looks encouraging, but I'm still getting errors as I try to use AC_DrawingScale. Do I need to declare it as a parameter first? I'm assuming not.
I'm getting an 'Uninitialized variable' issue with it.
Any ideas what I'm missing?
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-01-09 02:42 PM
I am not sure what is the cause of your issue. My title library part is of the Sub-Type Drawing Title, and has the parameter AC_DrawingScale as a Text Type parameter (see screen shot below). All the references to AC_DrawingScale are shown in my previous post, there is nothing else done to this parameter. You could also look at a Graphisoft title to see if there is something there (or not there) compared to your code.
David
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-01-09 02:54 PM
This page suggests it should be there:
gdl.graphisoft.com/gdl-docs/gdl-guide/chapter-12-miscellaneous/fix-named-optional-parameters/paramet...
but the attached is what I see when I start a new object with that subtype - not sure what is going on here!!
http://derekjackson.artstation.com
AC19 / 21 / 23 / 27
Windows 7 Intel Xeon 18Gb