Jump to content
tagosaku

how to write opfullpath with relative reference

Recommended Posts

hi, 

I try to get absolute path in order to use VEX  @P = fromNDC("camera_path", @P); 

Problem is camera_path has to be absolute path, then I am using opfullpath beforehand. However, the expression does not work with relative reference:

 

`opfullpath("../../cam2")` becomes /obj/cam2 (this is good!)

`opfullpath("`chs("parm2")`")`becomes chs("parm2")")  (it's wrong!)

 

If anyone knows how to correctly write the above second line  in VEX or hscript, it would be appreciating.

 

Best,

 

opfullpath.png

Share this post


Link to post
Share on other sites

you can use relative path in there, no need to convert it to absolute

but also to get absolute path directly in Hscript or VEX you can use chsop() instead of chs()

Edited by anim

Share this post


Link to post
Share on other sites

`chsop("../CamPathGeo")` becomes /obj/cam_master. That gives me absolute path, and it let me go to next process.

chsop is great function. Thank you so much!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×