global variable?

how do I define a global variable, like $posX and $posY to use as a
coordinate in several transforms?

I’m wondering how you use a value from another object - like
$object1.posx or if we have a DAT (I think) with names and values do I do
$object1[“positionX”] where the DAT has a name ‘positionX’ with a value of
say ‘500’ ?

to create a global variable, go to the Dialogs menu, choose Variables and switch to the Root tab

Using values from other objects:
to just get a parameter (say tx) put the following in a parameter of another object: par(“path/to/object/tx”)
or go to the “base” parameter, RMB and choose ‘yank parameter’. Then in the node where you wanna use it, RMB and choose ‘put yanked references’

You can also use a fetch CHOP to get those values into CHOPs and then export to the parameter of your choice.

Finally, to access a DAT you would use: tab(“/path/to/dat”,rowindex, colindex) or tabr(“path/to/dat”,“rowname”,colindex)…
Have a look at ‘commands and expressions’ in help menu. Switch to the expressions tab and find the entries starting with tab.
In your example it would be: tabr(“path/to/dat”,“positionX”,1)

Also you can use the rvar and cvar commands to set variables.