SvenP Posted July 31, 2005 Share Posted July 31, 2005 Ok i have an otl and have created some parameters for it on the parameters page and now i want to access this parameters in the callback script of another parameter . Is it possible to do this ? and if so how ? Thanks in advance Sven Quote Link to comment Share on other sites More sharing options...
grasshopper Posted August 2, 2005 Share Posted August 2, 2005 I tend to pass in the name of the OTL as the first argument in a callback so I can have scripts that access other parameters like this: set theOTL = $arg1 set someFloat = `ch(${theOTL}/someFloat)` set someString = `chs(${theOTL}/someString)` : : etc I usually pass the name of the OTL as an argument like this becasue I find it more readable. Furthermore, I often have callback scripts call other callback scripts and sometimes these can even be on other instances of the asset so it also gives me greater flexibility. If you aren't going to get that messy then this works too: set someFloat = `chs(opfullpath(".")/someFloat)` set someString = `chs(opfullpath(".")/someString)` : : etc where "." stands for the current node, i.e. the calling OTL. Quote Link to comment Share on other sites More sharing options...
grasshopper Posted August 2, 2005 Share Posted August 2, 2005 whoops ... that should be set someFloat = `ch(opfullpath(".")/someFloat)` Quote Link to comment Share on other sites More sharing options...
SvenP Posted August 2, 2005 Author Share Posted August 2, 2005 Thank you very much Quote Link to comment Share on other sites More sharing options...
grasshopper Posted August 2, 2005 Share Posted August 2, 2005 I should have added that the name of the OTL can be passed as a the first argument in the callback using the opfullpath function like this: set OPname = `run("optype -o .")`;source opdef:$OPname?mySectionName `opfullpath(".")` arg2 arg3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.