Home › Forums › Problems and solutions in GDL › Documentation elements, text handling › ID of layout
Tagged: ID
- This topic has 7 replies, 3 voices, and was last updated 5 years, 10 months ago by
Dmitry Rogozhin.
-
AuthorPosts
-
-
February 4, 2016 at 11:20 #2171
Илья Орлов
ParticipantHello
I wonder, it’s possible to script a setting of id in layout book. I’m need to make ID, which is start numbering from variable number (Exampl: ID of layot is 12, but i need make it to 35, 23 – is start number). Difficulty in the fact that i need also have an workable autotext #Layoutid, to mark the number of list.
PS. Sorry for my English…Attachments:
-
February 9, 2016 at 15:34 #2203
Gergely Fehér
KeymasterHi,
As layout id can be reached as an autotext, you can not read it’s actual value in GDL script. But, if you want your layouts to start from 23, you can set that in the layout book settings.Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE -
February 10, 2016 at 13:43 #2221
Илья Орлов
ParticipantIs it possable to make this
1. Mark layout by autotext(numbering = id of layout in layout book)
and at same time
2. Mark the same layout(and start ID from my nuber 23) -
February 10, 2016 at 17:08 #2229
Gergely Fehér
KeymasterI think there is no solution for that in GDL, as you can’t reach the value of the layout id.
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE -
February 11, 2016 at 06:35 #2245
Илья Орлов
ParticipantI use this
temp=REQUEST (“HomeDB_info”, “”, homeDBIntId, homeDBUserId, homeDBName, homeContext)
!—————————–
txt1=datetimestring
txt2=index+pop
txt3=homeDBIntId+popPop – this is my variable start number
But script don’t use “homeDBUserId”(layout id) as arithmetical number (“homeDBIntId”(global ID) – used as number)
Can I convert “homeDBUserId” to number? -
February 11, 2016 at 06:40 #2246
Илья Орлов
ParticipantI’m need to do this
Attachments:
-
February 12, 2016 at 10:59 #2250
Gergely Fehér
KeymasterTo convert strings to numbers, you can use the SPLIT function.
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE -
August 30, 2016 at 09:58 #2685
Dmitry Rogozhin
Participant`n = REQUEST (“HomeDB_info”, “”, homeDBIntId, homeDBUserId, homeDBName, homeContext)
n1= SPLIT (homeDBUserId, “%n”, num)
n2 = SPLIT (GLOB_LAYER, “%n”, num1)
if num1 = 0 then
part1=”Prefix layout”
part2=”.postfix”
lenp1 = STRLEN(part1)
lenp2 = STRLEN(part2)
n = STRSUB(GLOB_LAYER,lenp1+2,STRLEN(GLOB_LAYER)-lenp1-lenp2-1)
n2 = SPLIT (n, “%n”, num1)
endifI used this code to solve this problem. An example of an object can be viewed here
https://yadi.sk/d/RmNZDFD7ubPPv
-
-
AuthorPosts
- The forum ‘Documentation elements, text handling’ is closed to new topics and replies.