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

Property Expression Split with " as delimiter

Is it possible to use a SPLIT expression where the delimiter is " ?

 

We have long product names where the standard format is 'TYPE OF FINISH - MANUFACTURER PRODUCT "COLOUR"' and I'd like to be able to seperate the COLOUR component of the long name.

 

Operating system used: Windows

Matthew Johnson - POWE Architects
AC4.5 --> AC29 & Revit 2016 --> 2026
Asus Zenbook Pro 16x i9-13900H w/ Nvidia RTX 4070 4K dual, Windows 11 64bit + Quest3
I'd rather be sailing.
1 Solution

Accepted Solutions
Stefan L_
Rockstar

Masking with a backslash should do the trick:

SPLIT ( <your property>; "\""; 2 )

 

Stefan - AC ...-29GER, WIN11

Go to post

7 Replies 7
Barry Kelly
Moderator

There are SPLIT functions in the expression editor.

 

BarryKelly_0-1789438355585.png

 

It might be a multi-stage process though.

SPLITRIGHT to get COLOUR" and then SPLITLEFT that result to get just COLOUR.

 

The only problem then is the functions use the double quote symbol in the command.

I am not sure if you can change that.

So instead of "delimiter" - because """ (triple quotes) would make no sense, you can change it to a single quote 'delimeter' - so you will have '"' in the expression.

 

Changing to single quotes works in GDL, I can't say I have tried it in the expression editor.

 

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

Barry, thanks for the response. I understand the SPLIT functions in expression editing. My qeustion was more about if it is possible to use the double quote marks as delimiter as we have hundreds of surfaces in this format and would rather not rename all of them through all of our standards.

 

Some script languages allow you to use ASCI codes and the like to refer to a specific character rather than the actual character that has meaning in the script language.

Matthew Johnson - POWE Architects
AC4.5 --> AC29 & Revit 2016 --> 2026
Asus Zenbook Pro 16x i9-13900H w/ Nvidia RTX 4070 4K dual, Windows 11 64bit + Quest3
I'd rather be sailing.
Barry Kelly
Moderator

That is why I suggested trying to change the quotes used in the expression to single quotes.

So ' " ' instead of  " " " (spaces are just for clarity).

 

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
Barry Kelly
Moderator

Seems that doesn't work.

 

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
Stefan L_
Rockstar

Masking with a backslash should do the trick:

SPLIT ( <your property>; "\""; 2 )

 

Stefan - AC ...-29GER, WIN11

Thanks Stefan. I knew someone on here would know what the trick to masking was.

Matthew Johnson - POWE Architects
AC4.5 --> AC29 & Revit 2016 --> 2026
Asus Zenbook Pro 16x i9-13900H w/ Nvidia RTX 4070 4K dual, Windows 11 64bit + Quest3
I'd rather be sailing.
Barry Kelly
Moderator

Thanks @Stefan L_ 

I thought there was something.

I tried that but must have used a forward slash. 🙄

 

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

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!