Jump to content

Accesing The Parameters Of An Otl With Hscript


SvenP

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...