hscript formatting - nested expressions help

   2710   2   2
User Avatar
Member
33 posts
Joined:
Offline
So I have multiple file nodes feeding into a switch.

Downstream of the switch I created a string detail attribute that has
the following expression to get the active file node:

`opinputpath(“../switch1”,chs(“../switch1/input”))`/file


Now I want to evaluate that path using the chs() expression.

What is the proper syntax?

I try this and get errors:

`chs(“`opinputpath(”../switch1“,chs(”../switch1/input“))`/file”)`

Can't seem to find the proper syntax using " or ' or `

Thanks in advance!
User Avatar
Member
789 posts
Joined: April 2020
Offline
if you create a detail attribute, cant you just use the details() expression?

for a paramter you could replace

`opinputpath(“../switch1”,chs(“../switch1/input”))`/file

with

strcat(opinputpath(“../switch1”,chs(“../switch1/input”)),“/file”)

that would get rid of the outer set of quotes I guess.

(and of course in python this is even easier)

cheers,

Koen

ps. the second parameter of the opinputpath should be a float, any reason you are using chs() instead of ch()?
User Avatar
Member
33 posts
Joined:
Offline
ok great! thanks for the response!
  • Quick Links