Learn to manage BIM workflows and create professional Archicad templates with the BIM Manager Program.

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

Story Marker, maximum text width

Anonymous
Not applicable
Hi,
Hope I can explain this one. I might be dreaming a bit.
I want to create a story marker, that collects the story name (easy enough).
But what I'm hoping, is there a way I can use the STW command to determine the length of the longest story name.
For example if I have a section with storys

Level Ground
Level 1
Level 2

Level Ground is obviously the longest name, so I want to only know the width of this name.
This is so I can anchor my story settings correctly.

Maybe the MAX command?
4 REPLIES 4
David Maudlin
Rockstar
Tom wrote:
Maybe the MAX command?
That is where I would start, create an argument for each story using the STW command and plug them in. Define the text style before using the STW command for accuracy of the text length.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Anonymous
Not applicable
Hello Tom,

You might try something like;


define style "textstyle" "Arial", 2, 1, 0
style "textstyle"

storyName= ""
maxWidth= 0

dim t[]
n= request("STORY_INFO", "", nr, t)!--GDL Reference Guide 13 page 288
for i= 1 to nr
	storyName= t[4*(i-1)+2]
	storyWidth= STW(storyName)/1000*A_
	if storyWidth> maxWidth then
		maxWidth= storyWidth
	endif
next i


Hope it works...or helps, I can't test it at the moment.

Regards, Juha
Anonymous
Not applicable
Juha,
That is brilliant. Thank you very much.
I would upload the final object code on here, but it is an absolute mess as I have modified an existing one.
Works a treat though.

This will be useful for custom story markers with different scales.

Thanks Again
Tom
Laszlo Nagy
Community Admin
Community Admin
I see you are on AC16.
I that case you could also upload it to https://bimcomponents.com/.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28