Si conoce el evento precedente, puede escribir código que lo recree en la regla actual y que acceda a los datos.
El código tiene las siguientes limitaciones:
- Si utiliza un tipo erróneo, se producirá un error de tiempo de ejecución.
- La información de estos eventos antiguos es inestable. Si una acción Afinar crea algunas páginas, los eventos que hayan ocurrido antes del proceso de afinado no tendrán acceso a dichas páginas.
' Casting the very first event in this rule to its type
Dim myRootEvent As Creo.PWS.Automation.GenericDataModel.GenericUserStartEvent =
triggerEvent.RootEvent
' Casting the previous event in this rule to its type
Dim myRefineOkEvent As CreoCreo.PWS.Automation.PrinergyDataModel.InputFileRefinedOk =
triggerEvent.Previous