cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
RHF55
Booster

Hack the Surface Label

I would like to edit the Surface Label 25 to show the text of a surface before a delimiter. For example:

 

Surface Name is TC:Timber Cladding

Label to shown only TC

 

This is the code I have used to get this working on a wall label i wrote a while ago:

!======split
len = STRLEN (string)
iDotPos = STRSTR (string, sep)!sep is the seperator
code = STRSUB (string, 1, iDotPos - 1)
mat = STRSUB (string, iDotPos+1, len-iDotPos)!material

if display_txt = 'code' and code<>"" then
string=code
endif

if display_txt = 'mat' then
string=mat
endif

 

But I cant figure out where to catch the surface name and split it in this object. I think it might be happening in the macro label_content_macro. Any wizards out there that can figure this out??? @Barry Kelly ?

 

Of course this would not be required if GS would give us an ID field for surfaces the same as building materials.

 

Operating system used: Mac Intel-based 12

27 Replies 27
Benjamin Dani
Graphisoft
Graphisoft

@Lingwisyer @Barry Kelly 

Have you tried accessing the page in a private/incognito mode?

Just checked it that way and it seems to be working on my side. 

Dani Benjamin
Technical Support Engineer

Barry Kelly
Moderator

It is the same for me, still no 'product support'.

And that is again after I allowed all cookies.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Lingwisyer
Guru

https://community.graphisoft.com/t5/GDL/GDL-Multi-Use-Code-Label/td-p/706119

 

Fixed mine. Can display the building material, surface, composite or complex profile for most building elements. For building materials, it displays the building material ID of the chosen outside face. For the rest, it splits out the part of the attribute name set by a delimiter. For composites, this allows you to put something like a core code in one part of the name and a unique code in another.

 

Ling.

 

 

Lingwisyer_1-1782287077112.png

 

AC22-29 AUS 3200Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | 7800X3D | 32GB | RTX5070TI
RHF55
Booster

 Hi Ling

 

Great object. This should be rolled into the stock label.

I couldn't get the “Building Material” option to work on walls.

 

I made a different label for this purpose a while ago, the code is probably a mess and it only works on walls. Feel free to nick anything that looks useful.

 

Thanks for sharing your efforts. 


Screenshot 2026-07-29 at 9.20.21 am.jpg          Screenshot 2026-07-29 at 9.20.06 am.jpg

Lingwisyer
Guru

The Building Material option just pulls the Building Material ID rather than the name like the other options. Could give it the option to use the name I guess if you want to store other information there... Was it returned an error for you, or just returning nul?

 

ps. Oh, the BM option does not work on basic walls... Woops. Assume it is when ever it is a basic element since the SKINS_PARAMS variables do not work with them. I think I have fixed it now.

AC22-29 AUS 3200Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | 7800X3D | 32GB | RTX5070TI
RHF55
Booster

I didnt realise is was calling the building material ID. I added an ID and it works. 

Made a mod which has building material or ID options

Lingwisyer
Guru

Is that an update to the one I updated two hours ago?

 

I already added the option to swap between BM ID and Name... forgot to note that...

 

ps. I only recently realised that we can now upload GSM files. Much nicer than having to ZIP things all the time, though that is still good if you have multiple parts.

AC22-29 AUS 3200Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | 7800X3D | 32GB | RTX5070TI
RHF55
Booster

haha. No its from the original, I didn't see your update. Yours looks neater.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!