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!
hscript formatting - nested expressions help
2710 2 2- dvfedele
- Member
- 33 posts
- Joined:
- Offline
- koen
- 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()?
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()?
- dvfedele
- Member
- 33 posts
- Joined:
- Offline
-
- Quick Links