VS:vsoStateGetRot
Jump to navigation
Jump to search
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Used to determine of the object has been rotated. See VS:Parametric State Notifications#vsoStateGetRot
This function should be called during the parametric reset event: 3: {kParametricRecalculate}
FUNCTION vsoStateGetRot(
hObj : HANDLE;
VAR outDiffAng : REAL;
VAR outIs3D : BOOLEAN) : BOOLEAN;
def vs.vsoStateGetRot(hObj): return (BOOLEAN, outDiffAng, outIs3D)
Parameters
hObj HANDLE Handle to the parametric object. Obtained by call to VS:GetCustomObjectInfo outDiffAng REAL Output parameter. Difference between the new and the old angles. Negative if old angle was bigger value. outIs3D BOOLEAN Output parameter. Was a 3D operation.
Example
VectorScript
BEGIN result := GetCustomObjectInfo(objectName, objectHand, recordHand, wallHand); vsoGetEventInfo(theEvent, message ); CASE theEvent OF 5: {kObjOnInitXProperties} BEGIN {enable eventing for this plug-in} SetPrefInt( 590, 1 ); {varParametricEnableStateEventing, kParametricStateEvent_ResetStatesEvent} result := SetObjPropVS(18, TRUE); {kObjXPropAcceptStates} END; 44: {kObjOnAddState} BEGIN message := vsoStateAddCurrent( objectHand, message ); END; 3: {kParametricRecalculate} BEGIN MoveTo( 5mm, 8mm ); CreateText( 'State events received after the last kParametricRecalculate:' ); IF vsoStateGetRot( objectHand, diffAng, is3D ) THEN BEGIN MoveTo( 0,-20mm ); CreateText( Concat( 'Object just rotated! diff=', diffAng,' deg is3DMove=', is3D ) ); END; END;
Python
Version
Availability: from Vectorworks 2009
This is drop-in function.
See Also
VS:Parametric State Notifications | VS:vsoStateAddCurrent
VS:vsoStateGetPos | VS:vsoStateGetRot | VS:vsoStateGetParamChng | VS:vsoStateGetObjChng | VS:vsoStateGetLayrChng | VS:vsoStateGetExitGroup | VS:vsoStateGetNameChng
[[VS:Parametric State Notifications]] | [[VS:vsoStateAddCurrent]]
[[VS:vsoStateGetPos]] | [[VS:vsoStateGetRot]] | [[VS:vsoStateGetParamChng]] | [[VS:vsoStateGetObjChng]] | [[VS:vsoStateGetLayrChng]] | [[VS:vsoStateGetExitGroup]] | [[VS:vsoStateGetNameChng]]