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

License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…

GDL
About building parametric objects with GDL.
SOLVED!

Show Story level in the Drawing title of a Plan view

Durval
Advocate

I am looking for a means to code a Drawing Title that can automatically read the story level set in Model>Story Settings if the title is attached to a Plan View.
I could find a REQUEST ("STORY_INFO", ...), but I don't know how to tell the title's script if it is linked to a plan view and, if so, in what story.
Is this possible?

 

 

--- www.dtabach.com.br ---

AC 27/28 BRA – MacBook Pro Apple M2 16GB RAM Mac OS Sonoma
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Jaime-airc_digital
Enthusiast

It is indeed possible, see working Drawing Title attached:Screenshot 2025-05-25 at 00.20.14.png:
In the Master script:

n = request ("REFERENCE_LEVEL_DATA", "", name1, elev1, name2, elev2, name3, elev3, name4, sealevel)

DIM t[]
n = request ("STORY_INFO", "", nr, t)

dim story_nr[], name[], elevation[], height[]

! Iterate through the stories
for i = nr to 1 step -1
story_nr[i] = str ("%.0m", t [4 * (i - 1) + 3])
name[i] = t [4 * (i - 1) + 2]
elevation[i] = str ("%m", t [4 * (i - 1) + 1] - sealevel) ! Here remove " - sealevel" if you just want the elevations to Project 0.
height[i] = str ("%m", t [4 * (i - 1) + 4])
next i



And in the 2D script:

drawingName = AC_DrawingName  ! Default value
for i = 1 to vardim1(name)
if STRSTR(name[i], AC_DrawingName) > 0 then drawingName = AC_DrawingName + " " + elevation[i]
next i

 

Archicad 28 ARM, MacBook Pro M3 Max 128Gb, macOS Sonoma.
/Operations Director /BIM Lead /Architect @ www.airc.digital ltd ™
M Architecture & Urbanism ARB

View solution in original post

4 REPLIES 4
vlahtinen
Advocate

AFAIK, it’s not possible. The only way is to include the story name in the view name or id.

Solution
Jaime-airc_digital
Enthusiast

It is indeed possible, see working Drawing Title attached:Screenshot 2025-05-25 at 00.20.14.png:
In the Master script:

n = request ("REFERENCE_LEVEL_DATA", "", name1, elev1, name2, elev2, name3, elev3, name4, sealevel)

DIM t[]
n = request ("STORY_INFO", "", nr, t)

dim story_nr[], name[], elevation[], height[]

! Iterate through the stories
for i = nr to 1 step -1
story_nr[i] = str ("%.0m", t [4 * (i - 1) + 3])
name[i] = t [4 * (i - 1) + 2]
elevation[i] = str ("%m", t [4 * (i - 1) + 1] - sealevel) ! Here remove " - sealevel" if you just want the elevations to Project 0.
height[i] = str ("%m", t [4 * (i - 1) + 4])
next i



And in the 2D script:

drawingName = AC_DrawingName  ! Default value
for i = 1 to vardim1(name)
if STRSTR(name[i], AC_DrawingName) > 0 then drawingName = AC_DrawingName + " " + elevation[i]
next i

 

Archicad 28 ARM, MacBook Pro M3 Max 128Gb, macOS Sonoma.
/Operations Director /BIM Lead /Architect @ www.airc.digital ltd ™
M Architecture & Urbanism ARB

You’re right! I read the original question too hastily. I thought the question was about the story name not elevation. 

 


However, in your solution, it’s required that the name of the drawing is included in the name of the story. In other words, the drawing is linked to the correct story using the name. That might usually be the case, but maybe not always.

Durval
Advocate

Great, Jaime-airc_digital's solution worked!
With the following observations:

- As you inverted the order of the loop ('nr to 1 step -1' instead of '1 to nr') it is necessary to invert also the order of the variable definitions, otherwise the elevation value will be stored in story_nr and vice-versa. Or you can uninvert the loop (use 'for i = 1 to nr').
- As I don't need the sea leval info, I don't need the 'REQUEST ("REFERENCE_LEVEL_DATA,...)'.
- As vlahtinen pointed out, the Drawing name should be contained in the Story name. I found it more reasonable the other way round: that the Drawing Name should contain the Story name, so that I can give names to drawings such as "Ground Floor - Equipments". So I inverted STRSTR command and added 1 so that it becomes case insensitive: 'if STRSTR (AC_DrawingName, name [i], 1) > 0 ...'
Thank you for your valuable help, it saved me hours of work!

--- www.dtabach.com.br ---

AC 27/28 BRA – MacBook Pro Apple M2 16GB RAM Mac OS Sonoma