Read an OLE object property
- Last UpdatedJul 24, 2024
- 1 minute read
In a script, you can read an OLE object property by assigning the property to a tag. You cannot use a direct reference to an OLE object property in an animation display link.
Syntax
tagname = %pointer.property;
Arguments
%pointer
The pointer that references the OLE object. Must be created with OLE_CreateObject() function or assigned to another pointer before reading a property.
property
The name of the property to be read.
tagname
The tag to write the value to.
Example(s)
This script creates an OLE object based on the System.Random OLE class, creates a pointer %SR to reference it, and assigns the value of the .NextDouble property of the Math.Random OLE object to a real tagname randtag.
At run time the real tagname Randtag receives a random double float value between 0 and 1.
OLE_CreateObject(%SR,"System.Random");
randtag = %SR.NextDouble;