# Dynamic Operator Names in Equations

## Recommended Posts

Back with another question

Let's say I have created a set of nodes, which are named obj1, obj2, obj3, etc. I can reference the name of each node using \$OS. Is there any way to implement this into an equation which modifies the number in the node title?

For example, I might have an equation in a parameter of obj1 which is dependent on a parameter of obj2. So ideally, for obj1, \$OS + 1 would equal obj2. However, I can't get this to work. I don't want to manually map to the parameter in obj2, because obj1 has a parameter which is dependent on obj2, obj2 has one which is dependent on obj3, obj3 on obj4, et cetera. The equations are identical except for the reference to the next node.

Any suggestions?

##### Share on other sites

This will sort of get you half-way there.

`obj`int(atof(opdigits(\$OS))+1)``

##### Share on other sites

Thank you, opdigits is very helpful. Your post also helped me find opinputpath and opoutputpath, which I think are exactly what I need. However, I'm having trouble using these the way I wish to. The equation is a bit more complex than this, but for simplicity's sake, let's say that for each node, I would like to set the rotation of the x (rx) to :

ch("/obj/geo/obj1/rx")

where obj1 is changed to opoutput. The following will return the path to the rx of the output node:

`opoutputpath(".",0)`/rx

However, I can't figure out the syntax to put that in the ch() to properly utilize it within each parameter.

##### Share on other sites

Try:

ch(opoutputpath(".",0)/rx)

Cheers!

steven

##### Share on other sites

Perfect! I was trying to throw some quotes in there

Thanks so much!

## Create an account

Register a new account