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 the Filter flow action to split the contents of a particular event into two groups.
For example, on page approval you may want to proof large pages one way and the rest of the pages another way. You can use the Filter flow action to perform this kind of split. 


By default, the user interface creates two blocks of code: one that contains the True/False conditions for the filter, and another that checks the condition for each item of interest and adds it to the Accepted list or the Rejected list.

' =======================================================
' The ConfigureAction function implements a filter.
' It is called with the event which triggered the rule and the action.
' ================================================================
Public Sub ConfigureAction( _
ByVal triggerEvent As Creo.PWS.Automation.PrinergyDataModel.SurfaceFullEvent, _
ByVal action As Creo.PWS.Automation.GenericDataModel.FilterAction)

'Create a counter variable and initialize to the value 0
Dim idx0 As Integer = 0

'Next we create a loop that will go through all the input files (until
'the counter reaches the end of the list)
Do While (idx0 < triggerEvent.Surfaces.Length)

Dim idx1 As Integer = 0

Do While (idx1 < triggerEvent.Surfaces(idx0).Separations.Length)

‘Check to see if this item is Accepted or Rejected
If Me.IsAccepted(triggerEvent.Surfaces(idx0).Separations(idx1)) Then

‘This is how we add an item to the Accepted list for the filter
action.AddAcceptedItem(triggerEvent.Surfaces(idx0).Separations(idx1))

Else

‘This is how we add an item to the Rejected list for the filter
action.AddRejectedItem(triggerEvent.Surfaces(idx0).Separations(idx1))

End If

idx1 = (idx1 + 1)
Loop

idx0 = (idx0 + 1)
Loop

End Sub


' ==============================================================
' The condition functions test each item selected by the filter.
' If it returns true the item will be added to a list of items accepted by the filter.
' If it returns false the item will be added to a list of items rejected by the filter.
' =============================================================
Private Function Condition1( _
ByVal item As Creo.PWS.Automation.PrinergyDataModel.PageApprovalChangedEvent) _
As Boolean

Return (item.NewApprovalState = _
Creo.PWS.Automation.PrinergyDataModelTypes.ApprovalState.Approved)

End Function

Private Function Condition1( _
ByVal candidate As Creo.PWS.Automation.PrinergyDataModel.Separation) As Boolean
‘We return a TRUE if this item is accepted by the filter, a FALSE value if not
Return candidate.Color.IsProcessYellow

End Function

Sv translation
languagede

Sie können den Code für die Flussaktion Filter bearbeiten und den Inhalt eines bestimmten Ereignisses in zwei Gruppen aufteilen.
Beim Abnehmen der Seite möchten Sie möglicherweise große Seiten auf eine Weise proofen und alle anderen Seite auf eine andere. Eine solche Aufteilung können Sie mit der Flussaktion Filter vornehmen.

Anchor
Bookmark171_concept_DBB70F30D98349FABF2A
Bookmark171_concept_DBB70F30D98349FABF2A

Standardmäßig erstellt die Benutzeroberfläche zwei Codeblöcke: einen, der die True/False-Bedingungen für den Filter enthält, und einen weiteren, der die Bedingungen für jedes relevante Element überprüft und dieses zur Liste Accepted oder zur Liste Rejected hinzufügt.
' =======================================================
' The ConfigureAction function implements a filter.
' It is called with the event which triggered the rule and the action.
' ================================================================
Public Sub ConfigureAction( _
ByVal triggerEvent As Creo.PWS.Automation.PrinergyDataModel.SurfaceFullEvent, _
ByVal action As Creo.PWS.Automation.GenericDataModel.FilterAction)
'Create a counter variable and initialize to the value 0
Dim idx0 As Integer = 0
'Next we create a loop that will go through all the input files (until
'the counter reaches the end of the list)
Do While (idx0 < triggerEvent.Surfaces.Length)
Dim idx1 As Integer = 0
Do While (idx1 < triggerEvent.Surfaces(idx0).Separations.Length)
'Check to see if this item is Accepted or Rejected
If Me.IsAccepted(triggerEvent.Surfaces(idx0).Separations(idx1)) Then
'This is how we add an item to the Accepted list for the filter
action.AddAcceptedItem(triggerEvent.Surfaces(idx0).Separations(idx1))
Else
'This is how we add an item to the Rejected list for the filter
action.AddRejectedItem(triggerEvent.Surfaces(idx0).Separations(idx1))
End If
idx1 = (idx1 + 1)
Loop
idx0 = (idx0 + 1)
Loop
End Sub

' ==============================================================
' The condition functions test each item selected by the filter.
' If it returns true the item will be added to a list of items accepted by the filter.
' If it returns false the item will be added to a list of items rejected by the filter.
' =============================================================
Private Function Condition1( _
ByVal item As Creo.PWS.Automation.PrinergyDataModel.PageApprovalChangedEvent) _
As Boolean
Return (item.NewApprovalState = _
Creo.PWS.Automation.PrinergyDataModelTypes.ApprovalState.Approved)
End Function
Private Function Condition1( _
ByVal candidate As Creo.PWS.Automation.PrinergyDataModel.Separation) As Boolean
'We return a TRUE if this item is accepted by the filter, a FALSE value if not
Return candidate.Color.IsProcessYellow
End Function

Sv translation
languagezh

可以编辑过滤器流程操作的代码,将特定事件的内容拆分到两个组。
例如,对于页面审核,您可能希望以一种方式打样大页面,而以另一种方式打样其余页面。您可以使用过滤器流程操作来执行此类拆分。

Anchor
Bookmark171_concept_DBB70F30D98349FABF2A
Bookmark171_concept_DBB70F30D98349FABF2A

默认情况下,用户界面会创建两个代码块:一个代码块包含过滤器的 True/False 条件,另一个代码块检查每个感兴趣项的条件,并将它添加到Accepted列表或Rejected列表。
' =======================================================
' The ConfigureAction function implements a filter.
' It is called with the event which triggered the rule and the action.
' ================================================================
Public Sub ConfigureAction( _
ByVal triggerEvent As Creo.PWS.Automation.PrinergyDataModel.SurfaceFullEvent, _
ByVal action As Creo.PWS.Automation.GenericDataModel.FilterAction)
'Create a counter variable and initialize to the value 0
Dim idx0 As Integer = 0
'Next we create a loop that will go through all the input files (until
'the counter reaches the end of the list)
Do While (idx0 < triggerEvent.Surfaces.Length)
Dim idx1 As Integer = 0
Do While (idx1 < triggerEvent.Surfaces(idx0).Separations.Length)
'Check to see if this item is Accepted or Rejected
If Me.IsAccepted(triggerEvent.Surfaces(idx0).Separations(idx1)) Then
'This is how we add an item to the Accepted list for the filter
action.AddAcceptedItem(triggerEvent.Surfaces(idx0).Separations(idx1))
Else
'This is how we add an item to the Rejected list for the filter
action.AddRejectedItem(triggerEvent.Surfaces(idx0).Separations(idx1))
End If
idx1 = (idx1 + 1)
Loop
idx0 = (idx0 + 1)
Loop
End Sub

' ==============================================================
' The condition functions test each item selected by the filter.
' If it returns true the item will be added to a list of items accepted by the filter.
' If it returns false the item will be added to a list of items rejected by the filter.
' =============================================================
Private Function Condition1( _
ByVal item As Creo.PWS.Automation.PrinergyDataModel.PageApprovalChangedEvent) _
As Boolean
Return (item.NewApprovalState = _
Creo.PWS.Automation.PrinergyDataModelTypes.ApprovalState.Approved)
End Function
Private Function Condition1( _
ByVal candidate As Creo.PWS.Automation.PrinergyDataModel.Separation) As Boolean
'We return a TRUE if this item is accepted by the filter, a FALSE value if not
Return candidate.Color.IsProcessYellow
End Function

Sv translation
languagees

Es posible editar el código de la acción de flujo Filtro para dividir el contenido de un evento concreto en dos grupos.
Por ejemplo, en la aprobación de páginas puede que desee probar las páginas extensas de una forma y el resto de páginas de otra. Puede usar la acción de flujo Filtro para realizar este tipo de división.

Anchor
Bookmark171_concept_DBB70F30D98349FABF2A
Bookmark171_concept_DBB70F30D98349FABF2A

De forma predeterminada, la interfaz de usuario crea dos bloques de código: uno que contiene las condiciones True/False para el filtro y otro que comprueba la condición para cada elemento de interés y lo agrega a las listas Accepted o Rejected.
' =======================================================
' The ConfigureAction function implements a filter.
' It is called with the event which triggered the rule and the action.
' ================================================================
Public Sub ConfigureAction( _
ByVal triggerEvent As Creo.PWS.Automation.PrinergyDataModel.SurfaceFullEvent, _
ByVal action As Creo.PWS.Automation.GenericDataModel.FilterAction)
'Create a counter variable and initialize to the value 0
Dim idx0 As Integer = 0
'Next we create a loop that will go through all the input files (until
'the counter reaches the end of the list)
Do While (idx0 < triggerEvent.Surfaces.Length)
Dim idx1 As Integer = 0
Do While (idx1 < triggerEvent.Surfaces(idx0).Separations.Length)
'Check to see if this item is Accepted or Rejected
If Me.IsAccepted(triggerEvent.Surfaces(idx0).Separations(idx1)) Then
'This is how we add an item to the Accepted list for the filter
action.AddAcceptedItem(triggerEvent.Surfaces(idx0).Separations(idx1))
Else
'This is how we add an item to the Rejected list for the filter
action.AddRejectedItem(triggerEvent.Surfaces(idx0).Separations(idx1))
End If
idx1 = (idx1 + 1)
Loop
idx0 = (idx0 + 1)
Loop
End Sub

' ==============================================================
' The condition functions test each item selected by the filter.
' If it returns true the item will be added to a list of items accepted by the filter.
' If it returns false the item will be added to a list of items rejected by the filter.
' =============================================================
Private Function Condition1( _
ByVal item As Creo.PWS.Automation.PrinergyDataModel.PageApprovalChangedEvent) _
As Boolean
Return (item.NewApprovalState = _
Creo.PWS.Automation.PrinergyDataModelTypes.ApprovalState.Approved)
End Function
Private Function Condition1( _
ByVal candidate As Creo.PWS.Automation.PrinergyDataModel.Separation) As Boolean
'We return a TRUE if this item is accepted by the filter, a FALSE value if not
Return candidate.Color.IsProcessYellow
End Function

Sv translation
languagefr

Vous pouvez modifier le code pour l'action de flux Filtre afin de séparer en deux groupes les contenus d'un événement spécifique.
Par exemple, sur l'approbation des pages, vous pouvez vouloir tirer des épreuves de grandes pages d'une façon et des autres pages d'une autre façon. Vous pouvez utiliser l'action de flux Filtrer pour exécuter ce type de séparation.

Anchor
Bookmark171_concept_DBB70F30D98349FABF2A
Bookmark171_concept_DBB70F30D98349FABF2A

Par défaut, l'interface utilisateur crée deux blocs de code : l'un contenant les conditions VRAI/FAUX True/Falsedu filtre et l'autre vérifiant la condition pour chaque élément d'intérêt et l'ajoutant à la liste AcceptéAccepted ou à la liste RejetéRejected.
' =======================================================
' The ConfigureAction function implements a filter.
' It is called with the event which triggered the rule and the action.
' ================================================================
Public Sub ConfigureAction( _
ByVal triggerEvent As Creo.PWS.Automation.PrinergyDataModel.SurfaceFullEvent, _
ByVal action As Creo.PWS.Automation.GenericDataModel.FilterAction)
'Create a counter variable and initialize to the value 0
Dim idx0 As Integer = 0
'Next we create a loop that will go through all the input files (until
'the counter reaches the end of the list)
Do While (idx0 < triggerEvent.Surfaces.Length)
Dim idx1 As Integer = 0
Do While (idx1 < triggerEvent.Surfaces(idx0).Separations.Length)
'Check to see if this item is Accepted or Rejected
If Me.IsAccepted(triggerEvent.Surfaces(idx0).Separations(idx1)) Then
'This is how we add an item to the Accepted list for the filter
action.AddAcceptedItem(triggerEvent.Surfaces(idx0).Separations(idx1))
Else
'This is how we add an item to the Rejected list for the filter
action.AddRejectedItem(triggerEvent.Surfaces(idx0).Separations(idx1))
End If
idx1 = (idx1 + 1)
Loop
idx0 = (idx0 + 1)
Loop
End Sub

' ==============================================================
' The condition functions test each item selected by the filter.
' If it returns true the item will be added to a list of items accepted by the filter.
' If it returns false the item will be added to a list of items rejected by the filter.
' =============================================================
Private Function Condition1( _
ByVal item As Creo.PWS.Automation.PrinergyDataModel.PageApprovalChangedEvent) _
As Boolean
Return (item.NewApprovalState = _
Creo.PWS.Automation.PrinergyDataModelTypes.ApprovalState.Approved)
End Function
Private Function Condition1( _
ByVal candidate As Creo.PWS.Automation.PrinergyDataModel.Separation) As Boolean
'We return a TRUE if this item is accepted by the filter, a FALSE value if not
Return candidate.Color.IsProcessYellow
End Function

Sv translation
languageja

フィルタフロー アクション用のコードを編集して、特定イベントの内容を 2 つのグループに分割できます。
たとえば、ページの承認時にサイズの大きいページをある方法でプルーフし、残りのページを別の方法でプルーフする場合などがあります。フィルタフロー アクションを使用すると、この種類の分割を実行できます。

Anchor
Bookmark171_concept_DBB70F30D98349FABF2A
Bookmark171_concept_DBB70F30D98349FABF2A

ユーザー インターフェイスのデフォルトでは 2 つのコード ブロックが作成されます。1 つ目のコードにはフィルタ用の True/False 条件が含まれており、もう 1 つのコードでは必要な各アイテムの条件をチェックして、[Accepted]リストまたは[Rejected]リストに追加します。
' =======================================================
' The ConfigureAction function implements a filter.
' It is called with the event which triggered the rule and the action.
' ================================================================
Public Sub ConfigureAction( _
ByVal triggerEvent As Creo.PWS.Automation.PrinergyDataModel.SurfaceFullEvent, _
ByVal action As Creo.PWS.Automation.GenericDataModel.FilterAction)
'Create a counter variable and initialize to the value 0
Dim idx0 As Integer = 0
'Next we create a loop that will go through all the input files (until
'the counter reaches the end of the list)
Do While (idx0 < triggerEvent.Surfaces.Length)
Dim idx1 As Integer = 0
Do While (idx1 < triggerEvent.Surfaces(idx0).Separations.Length)
'Check to see if this item is Accepted or Rejected
If Me.IsAccepted(triggerEvent.Surfaces(idx0).Separations(idx1)) Then
'This is how we add an item to the Accepted list for the filter
action.AddAcceptedItem(triggerEvent.Surfaces(idx0).Separations(idx1))
Else
'This is how we add an item to the Rejected list for the filter
action.AddRejectedItem(triggerEvent.Surfaces(idx0).Separations(idx1))
End If
idx1 = (idx1 + 1)
Loop
idx0 = (idx0 + 1)
Loop
End Sub

' ==============================================================
' The condition functions test each item selected by the filter.
' If it returns true the item will be added to a list of items accepted by the filter.
' If it returns false the item will be added to a list of items rejected by the filter.
' =============================================================
Private Function Condition1( _
ByVal item As Creo.PWS.Automation.PrinergyDataModel.PageApprovalChangedEvent) _
As Boolean
Return (item.NewApprovalState = _
Creo.PWS.Automation.PrinergyDataModelTypes.ApprovalState.Approved)
End Function
Private Function Condition1( _
ByVal candidate As Creo.PWS.Automation.PrinergyDataModel.Separation) As Boolean
'We return a TRUE if this item is accepted by the filter, a FALSE value if not
Return candidate.Color.IsProcessYellow
End Function