cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Lingwisyer
Guru

GDL: Multi Use Code Label

Hi all,

 

https://community.graphisoft.com/t5/GDL/Hack-the-Surface-Label/m-p/621379

 

*Fixed and updated attached. Working in AC22+

 

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.

 

Lingwisyer_0-1782287156708.png

 

Following on from this thread about splitting Surface names, I got it working with Composite and CP names, but have run into an issue with Building Materials when it comes to beams and columns... For all situations I have it working, I just replaced the _sContentStringsHead[1][5] parameter with the value that I wanted displayed to then be passed on into the label_marker_form stock macro to be displayed. For what ever reason though, the value that I am inserting is getting placed between a pair of numbers followed by a bmat_ID from the element. For beams, this is the number Zero. For columns it is Zero/One for the core, else One. The extra bmat_ID for columns seems to always be the core. If I do not insert anything in the the _sContentStringsHead[1][5] parameter these numbers bound a "x" usually. The veneer bmat shows if there is one though...

 

[old image]

_sContentStringsHead[1][5] = bmat_id

[old image]

Default _sContentStringsHead[1][5]

 

 

 

Ling.

 

Operating system used: Windows

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
1 Solution

Accepted Solutions
Lingwisyer
Guru

I found out where those values are coming into the label. They are brought in from the label_content_macro and written into the _sRowsOfLabel array. To resolve my issue when it comes to the building materials of beams or columns, I just uniformly overrode the array under the relevant circumstances.

 

		returned_parameters  _nRowLabel, tempsRowsOfLabel

		! making from one dimensioned array to two dimensioned
		idx = 0
		dim _sRowsOfLabel[][]
			_sRowsOfLabel[1][1] = ""
		for i = 1 to 1!_nRowLabel
			for j = 1 to 48
				IF bSurface = 0 & GLOB_ELEM_TYPE = 6 | bSurface = 0 & GLOB_ELEM_TYPE = 12 then					!Beam or Column Building Material		
						_sRowsOfLabel[i][j] = ""
					ELSE
						_sRowsOfLabel[i][j] = tempsRowsOfLabel[idx + j]
				endIF
			next j
			idx = idx + 48
		next i

 

 

Ling.

 

Lingwisyer_0-1782283961224.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

Go to post

1 Reply 1
Lingwisyer
Guru

I found out where those values are coming into the label. They are brought in from the label_content_macro and written into the _sRowsOfLabel array. To resolve my issue when it comes to the building materials of beams or columns, I just uniformly overrode the array under the relevant circumstances.

 

		returned_parameters  _nRowLabel, tempsRowsOfLabel

		! making from one dimensioned array to two dimensioned
		idx = 0
		dim _sRowsOfLabel[][]
			_sRowsOfLabel[1][1] = ""
		for i = 1 to 1!_nRowLabel
			for j = 1 to 48
				IF bSurface = 0 & GLOB_ELEM_TYPE = 6 | bSurface = 0 & GLOB_ELEM_TYPE = 12 then					!Beam or Column Building Material		
						_sRowsOfLabel[i][j] = ""
					ELSE
						_sRowsOfLabel[i][j] = tempsRowsOfLabel[idx + j]
				endIF
			next j
			idx = idx + 48
		next i

 

 

Ling.

 

Lingwisyer_0-1782283961224.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

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!