Page tree

Es posible editar el código para las acciones definidas por el usuario.

El código de una acción definida por el usuario tiene este aspecto:
Public Sub Run( _
ByVal triggerEvent As Creo.PWS.Automation.PrinergyDataModel.PageSetCreatedEvent, _
ByVal action As Creo.PWS.Automation.GenericDataModel.UserDefinedAction)
'These are the three possible events you can raise as a result of this action
If you do not raise an event then no "chained" rules will be executed
Dim okEvt As Creo.PWS.Automation.BaseDataModel.DMEvent _
= action.CreateEvent( _
GetType(Creo.PWS.Automation.GenericDataModel.UserDefinedOKEvent), _
action.Context.ToString)
Dim warnEvt As Creo.PWS.Automation.BaseDataModel.DMEvent _
= action.CreateEvent( _
GetType(Creo.PWS.Automation.GenericDataModel.UserDefinedWarnEvent), _
action.Context.ToString)
Dim errEvt As Creo.PWS.Automation.BaseDataModel.DMEvent _
= action.CreateEvent( _
GetType(Creo.PWS.Automation.GenericDataModel.UserDefinedErrorEvent), _
action.Context.ToString
'<your logic here>
'This is how you raise an event
action.RaiseEvent(okEvt)
End Sub

  • No labels