Extracting part of a global variable

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-04-14 07:03 AM
‎2010-04-14
07:03 AM
Hopefully a simple request..?
I've created a simple label to extract a walls composite name. The problem is the name is too long to be practical on a floor plan ie:
'WT06 - Reverse Brick Veneer.'
I'd like the label to just note the first 4 letters. "WT06"
I vaguely recall seeing the ability in GDL a long time ago....
Is there a way I can specify just these few letters instead of the whole name?
Cheers
Warwick Lloyd-Martin
3 D E N V I R O N M E N T
http://www.3de.com.au
Windows 11 Pro 64bit
ArchiCad 4.55>27 AUS
Lumion 12.5/2023
D5 Render
3 D E N V I R O N M E N T
http://www.3de.com.au
Windows 11 Pro 64bit
ArchiCad 4.55>27 AUS
Lumion 12.5/2023
D5 Render
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-04-14 07:16 AM
‎2010-04-14
07:16 AM
STRSUB is the command you are after.
For the first 4 characters of your name you want STRSUB(composite name, 1,4)
Barry.
For the first 4 characters of your name you want STRSUB(composite name, 1,4)
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
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

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-04-14 08:11 AM
‎2010-04-14
08:11 AM
Barry,
Fantastic, thanks for that. I knew it was somewhere.
The problem is, as I've 'hacked' the original ARchiCad object, I don't fully understand all the manipulations required to get the final result.
I placed in the masterscript:
If gs_content_type = `Composite` then
identify = WALL_COMPS_NAME
endif
after adding a new parameter to the parameter list.
Where do I insert your bit of script?
Thanks again...I know time is money...
DON"T PANIC thanks but I got it to work! Cheers again!
Fantastic, thanks for that. I knew it was somewhere.
The problem is, as I've 'hacked' the original ARchiCad object, I don't fully understand all the manipulations required to get the final result.
I placed in the masterscript:
If gs_content_type = `Composite` then
identify = WALL_COMPS_NAME
endif
after adding a new parameter to the parameter list.
Where do I insert your bit of script?
Thanks again...I know time is money...
DON"T PANIC thanks but I got it to work! Cheers again!
Warwick Lloyd-Martin
3 D E N V I R O N M E N T
http://www.3de.com.au
Windows 11 Pro 64bit
ArchiCad 4.55>27 AUS
Lumion 12.5/2023
D5 Render
3 D E N V I R O N M E N T
http://www.3de.com.au
Windows 11 Pro 64bit
ArchiCad 4.55>27 AUS
Lumion 12.5/2023
D5 Render

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-04-14 08:26 AM
‎2010-04-14
08:26 AM
In your 2D script there will be a TEXT2 command to add the text for the name.
i.e. TEXT2 0,0, identify
You will wnt to change this to TEXT2 0,0, STRSUB(identify,1,4)
I am assuming you are using the variable "identify" to hold the name of the composite.
But watch out because it looks like when your "gs_content_type" parameter is not `Composite` then you will have a blank "identify" parameter and no text will appear.
I can't say for sure without seeing all of the script.
Barry.
i.e. TEXT2 0,0, identify
You will wnt to change this to TEXT2 0,0, STRSUB(identify,1,4)
I am assuming you are using the variable "identify" to hold the name of the composite.
But watch out because it looks like when your "gs_content_type" parameter is not `Composite` then you will have a blank "identify" parameter and no text will appear.
I can't say for sure without seeing all of the script.
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
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

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2010-04-14 08:53 AM
‎2010-04-14
08:53 AM
Thanks again Barry,
All working fine now!!
Cheers
All working fine now!!
Cheers
Warwick Lloyd-Martin
3 D E N V I R O N M E N T
http://www.3de.com.au
Windows 11 Pro 64bit
ArchiCad 4.55>27 AUS
Lumion 12.5/2023
D5 Render
3 D E N V I R O N M E N T
http://www.3de.com.au
Windows 11 Pro 64bit
ArchiCad 4.55>27 AUS
Lumion 12.5/2023
D5 Render