cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Design forum

Using <LAYOUTID> as a string in object

Anonymous
Not applicable
I am trying to write a gdl object that detects the ID of the layout it is placed on and then breaks the resulting ID into component strings. e.g. If the ID of layout is A123. I want to break it down into separate strings of "A", "1","2","3". The code I have written works fine with either a global ID, or a regular text string("A123"), but if I set a variable equal to <LAYOUTID> and try to break it down, it doesn't work the same. If I look at the full text of that variable with a text2 output, I see "A123." However, if I use the SPLIT command, or STRSUB command to 'break it down' the way I do with the regular text variable, it breaks out as "<","L","A","Y" instead of "A","1","2","3" Why?

Does anyone know how I can use the layout ID to get the results I want? Or, is there another way to do this that I haven't thought of. I can post the object, but it's still rough.
7 REPLIES 7

TomWaltz
Newcomer
Sorry, but GDL doesn't have the ability to actually get the value of the project info, so your object cannot process the value of information in it.

It's been a wish list item ever since AC10 came out and we could place objects on layouts.
Tom Waltz

F_ Beister
Enthusiast
It will not really help, but some layout informations are available if you generate optionial parameters in the parameter list. E.g. AC_DrawingGUID.

Anonymous
Not applicable
Try this.

nome2 = "A.02.1"
ii = REQUEST ("HomeDB_info", "", homeDBIntId, homeDBUserId, homeDBName, homeContext)
stringa = "<LAYOUTID>"
TEXT2 0,0, stringa

IF GLOB_CONTEXT = 8 THEN
IF homeDBUserId = NOME2 THEN TEXT2 0,.01,"I'm happy"
n = SPLIT (homeDBUserId, "A. %n ",aaaa, bbbb)
TEXT2 0,-.01,aaaa
TEXT2 0,-.02,bbbb
ENDIF

Put this code/object onto Layout.
If Layout's UserID = A.02.1 ..... You will be happy 😉

CU mirco

jp
Participant
Brilliant! Why can't the GDL user guide actually explain how most things work. They never show a very basic example so you can figure out the proper syntax and usage. Posted a bit of your script in my object and voila! Thank you very much.
Many Thanks, JP

John Peterson, AIA
Dalgliesh Gilpin Paxton Architects
Archicad 7-21 US
PC and iMac

jp
Participant
Well actually now none of it works. With a project index, I can't add a parameters from seleted objects like you can in schedules. In schedules, it won't scan Layouts for objects. POS!
Many Thanks, JP

John Peterson, AIA
Dalgliesh Gilpin Paxton Architects
Archicad 7-21 US
PC and iMac

vfrontiers
Enthusiast
I guess I'm running into the same thing...

I've been trying to break the TITLE of a DRAWING into Main and SubTitles separated by a special character (like "/")...

My syntax is correct, but it's not splitting the one title into two..
Duane
Visual Frontiers
AC22 6021:|: AC24 4007:|: Enscape3:|:TwinMotion
DellXPS 4.7ghz i7:|: 8gb GPU 1070ti

vfrontiers
Enthusiast
Since I've asked this question several times in other places and received no answer.. maybe I'll ask it here...


Is it not possible to get and display BOTH the LAYOUT ID and the VIEW ID of a drawing placed on a layout?

I want to keep my VIEW ID's for details as they are in my MASTER DETAIL setup... But when placed in a project I want to obviously show the ID by Layout in the bubble and have a small piece of text in the title that is the Master ID (ID by View ID)...
Duane
Visual Frontiers
AC22 6021:|: AC24 4007:|: Enscape3:|:TwinMotion
DellXPS 4.7ghz i7:|: 8gb GPU 1070ti

Didn't find the answer? Start a new discussion

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!