Skip to content

Latest commit

 

History

History
72 lines (56 loc) · 2.24 KB

File metadata and controls

72 lines (56 loc) · 2.24 KB

vsoStateGetObjChng

Description

Used to determine if the object attributes have been changed. See [[VS:Parametric State Notifications#vsoStateGetObjChng]]

This function should be called during the parametric reset event: 3: {kParametricRecalculate}

FUNCTION vsoStateGetObjChng(
				hObj            : HANDLE;
				VAR outChangeID : LONGINT): BOOLEAN;
def vs.vsoStateGetObjChng(hObj):
    return (BOOLEAN, outChangeID)

Parameters

Name Type Description
hObj HANDLE Handle to the parametric object. Obtained by call to GetCustomObjectInfo
outChangeID LONGINT Output parameter. Identifier of the object change that has happened.

Examples

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 vsoStateGetObjChng( objectHand, changeID ) THEN BEGIN
        MoveTo( 0,-50mm );
        CreateText( Concat( 'Object changed! fChangeID=', changeID, ' - sorry there are no constants for those values yet!' ) );
      END;
    END;

Python

See Also

[Parametric State Notifications](Parametric%20State Notifications.md) | vsoStateAddCurrent

vsoStateGetPos | vsoStateGetRot | vsoStateGetParamChng | vsoStateGetObjChng | vsoStateGetLayrChng | vsoStateGetExitGroup | vsoStateGetNameChng

Version

Availability: from Vecorworks 2009

This is drop-in function.

Category