Sv translation | ||
---|---|---|
| ||
You can edit the code for user-defined actions.
|
Sv translation | ||||||
---|---|---|---|---|---|---|
| ||||||
Sie können den Code für benutzerdefinierte Aktionen bearbeiten.
Der Code für eine benutzerdefinierte Aktion sieht folgendermaßen aus: 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 |
Sv translation | ||
---|---|---|
| ||
Public Sub Run( _ |
Sv translation | ||||||
---|---|---|---|---|---|---|
| ||||||
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 |
Sv translation | ||||||
---|---|---|---|---|---|---|
| ||||||
Vous pouvez modifier le code pour les actions définies par l'utilisateur.
Le code d'une action définie par l'utilisateur ressemble à celui-ci : 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 |
Sv translation | ||||||
---|---|---|---|---|---|---|
| ||||||
ユーザー定義アクションのコードを編集できます。
ユーザー定義アクションのコードは、以下のようになります。 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 |