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

Autotext String Width

owen
Newcomer
I am trying to get our Drawing Title to set its width based on its text content (<DRAWINGNAME> & <DRAWINGSCALE>) however I am having difficulty finding the correct way to extract the string width to position the text and line length. I have tried:

width=STW('<DRAWINGNAME>')*A_/1000
TEXT2 0,0,'<DRAWINGNAME>'
LINE2 0, 0, width, 0

Whilst this correctly displays the drawing name, the text anchor and line length use the width of the 13 characters in <DRAWINGNAME> and not the actual drawings name.

I (think) i understand why this doesn't work - the <DRAWINGNAME> autotext conversion to the correct drawing name is done after the script is run (ie. when displayed on the layout) whereas the STW is done within the script when <DRAWINGNAME> is still just those characters.

So is there a REQUEST function to get the name of the attached drawing name? I can't find anything in the AC10 GDL Reference Guide .. is there another more extensive list somewhere else?
cheers,

Owen Sharp

Design Technology Manager
fjmt | francis-jones morehen thorp

iMac 27" i7 2.93Ghz | 32GB RAM | OS 10.10 | Since AC5
18 REPLIES 18
LiHigh
Newcomer
Owen,

AC_DrawingName is the answer which should be automatically listed in the parameter if we choose subtype Drawing Title. To make it works, we must first add this variable to the parameter manually.

There many more available Datas that shloud be included for subtype Drawing Title:
AC_DrawingNumber, AC_DrawingScale, AC_OriginalDrawingScale, AC_magnification, etc.

GS screw up again!
Howard Phua

Win 10, Archicad 19 INT
owen
Newcomer
Excellent ... many thanks LiHigh! Works perfectly

Nice to see GS is sticking to their usual standards of documentation

I'm sorry but where the f-ing hell is this stuff documented?

I have run a text search on every single bit of documentation that comes with AC. Not only can i not find it anywhere in that, the fact that these variables are not created automatically when selecting the Drawing Title subtype but really are fundamental to their functionality shows they have well and truly fucked this up!

How many times do we have to say it ... If you add/change features you MUST include FULL documentation of ALL associated GDL commands and AC created variables as part of the documentation that ships with AC. We should not have to go any further than the Help Menu to find it!
cheers,

Owen Sharp

Design Technology Manager
fjmt | francis-jones morehen thorp

iMac 27" i7 2.93Ghz | 32GB RAM | OS 10.10 | Since AC5
Frank Beister
Moderator
You can find some documentation in the "basic library documentation". You should find the library on the GS server. There is included some html-doc. Most for the macros, but some of the blue optional object parameters are explained too.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
owen
Newcomer
thanks Frank

i've downloaded the Basic Library 10 kit from http://www.graphisoft.com/support/developer/downloads/ but cannot seem to find any of this documented there ... as a matter of fact i cannot find any reference anywhere in any of the HTML documentation to the Layouting environment in AC10 (both browsing through it and Spotlighting the entire Lib kit folder to check the contents of all the HTML files ...)

I appreciate the help given so far but could anyone post a link to the appropriate web page, or a page number to any of the PDF docs for AC. I'd really like to work out why I can't find this stuff
cheers,

Owen Sharp

Design Technology Manager
fjmt | francis-jones morehen thorp

iMac 27" i7 2.93Ghz | 32GB RAM | OS 10.10 | Since AC5
Frank Beister
Moderator
It is not much you can find there, because there are explained the macros. But if the use these optional (global) parameters they are listed with a few words: Have alook to Basic Library doc, which is available from developer/documentation site. Even that it is named there as "ArchiCAD 9" I think it is the version 10.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Frank Beister
Moderator
Especially have a look to this part:
http://www.graphisoft.com/ftp/techsupport/documentation/developer_docs/BasicLibraryDoc/10/LibDevGuide/Appendix_ACParams.html
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
owen
Newcomer
OK thanks for the direction guys ... i can see there is a lot of stuff in here so i will have to look through it. However i have to say after quick look through the index there is nothing aparent that is AC10 layout environment related. Will see how i go.

This really shouldn't be so hard to find. I wish i had the time to work these things out for myself but GDL is only my side job here. And anyway, I shouldn't have to work it out for myself. I would definately put myself in the 'guys who haven't the time' category Matthew has refered to here
Matthew wrote:
Besides the lack of standards for structuring the parts (which is beginning to be addressed with the subtypes) there is no standard for ensuring that all these thing are properly documented and communicated to the end users. Guys like us can figure it out, but we really shouldn't have to, and the guys who haven't the time or inclination to figure it out should have a place to look this stuff up.
cheers,

Owen Sharp

Design Technology Manager
fjmt | francis-jones morehen thorp

iMac 27" i7 2.93Ghz | 32GB RAM | OS 10.10 | Since AC5
Anonymous
Not applicable
LiHigh wrote:
AC_DrawingName is the answer which should be automatically listed in the parameter if we choose subtype Drawing Title. To make it works, we must first add this variable to the parameter manually.

There many more available Datas that shloud be included for subtype Drawing Title:
AC_DrawingNumber, AC_DrawingScale, AC_OriginalDrawingScale, AC_magnification, etc.
LiHigh,

Thanks for tips.
Could you please explain what exactly you mean:- "To make it work, we must first add this variable to the parameter manually"?
Frank Beister
Moderator
You have to add a parameter named AC_DrawingName to the parameter list of the object. Otherwise parameter content is not available. GS has introduced with AC 8 a new way to get more information by optional (global) parameters, which have to be part of the parameter list.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm