Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space PRINSAG and version 9.0
Sv translation
languageen

You can edit the code for user-defined actions.

 
The code for a user-defined action looks like this:

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
languagede

Sie können den Code für benutzerdefinierte Aktionen bearbeiten.

Anchor
Bookmark173_concept_461BDAA69A84492498D1
Bookmark173_concept_461BDAA69A84492498D1

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
languagezh

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
languagees

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

Anchor
Bookmark173_concept_461BDAA69A84492498D1
Bookmark173_concept_461BDAA69A84492498D1

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
languagefr

Vous pouvez modifier le code pour les actions définies par l'utilisateur.

Anchor
Bookmark173_concept_461BDAA69A84492498D1
Bookmark173_concept_461BDAA69A84492498D1

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
languageja

ユーザー定義アクションのコードを編集できます。

Anchor
Bookmark173_concept_461BDAA69A84492498D1
Bookmark173_concept_461BDAA69A84492498D1

ユーザー定義アクションのコードは、以下のようになります。
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