Ole4D Methods

OCGetRealProperty(p_Area;p_Propery;p_4DVar)


Used to retrieve the value of a Ole object property.
The property must be of type Real.
"p_Area" is the value of the variable associated with plug-in area, "p_Property" is the name of the OleObject property, and "p_4DVar" is the 4D variable to which will be assigned the value of the property.
This command cannot be used in 4D event handling methods, where you should use instead the OCGetRealOfSender command.
The p_4DVar variable must be of type Real and already declared before calling this method.

Parameters

Parameter Type   Description
p_Area Longint ->

Plug-in area identifier.

p_Property String -> Name of the property to which you want to assign a value.
p_4DVar Real <- Process or interprocess 4D variable to which will be assigned the value of the property.



Return Values
0 – The method call was successful.
If the method call was not successful the return value is not zero. For more information call OCLastError.

Example


` creating a script host
$i:=OCCreaScriptHost ("ScriptHost")
` declaring the Ole object
$i:=OCDeclareObj ("ScriptHost";"OleObj1";Area1)

` declaring the 4D variable
C_Real(RealVar)
` executing the plug-in command which transfers the value of the property to the 4D variable
$i:=OCGetRealProperty(Area1;"RealProperty";RealVar)

command is equivalent to the following sequence of code:

` creating a script host
$i:=OCCreaScriptHost ("ScriptHost")
` declaring the Ole object
$i:=OCDeclareObj ("ScriptHost";"OleObj1";Area1)
` declaring the 4D variable

C_Real(RealVar)
` executing the VBScript code which transfers the value of the property to the 4D variable
$i:=OCRunScript ("ScriptHost";"SHost.SetReal "+Char(34)+"RealVar"+Char(34)+", OleObj1.RealProperty")