Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Engineering

Add Packet

  • Last UpdatedNov 07, 2024
  • 1 minute read

Before an event can be used, the event packet must be defined in its entirety. When an event is added to the system, several tasks are performed:

  • Remove equivalent packets from the system (prompts on major packets).

  • Makes previous event packet's forms inactive.

  • Move currently active event packet onto the stack.

  • Applies currently defined picking filters to picks (where applicable).

  • Applies new packet event handlers to all registered graphical views.

If an event fails for any reason when it is added to the system, the .add method will return false.

The AppWare developer should handle failures and inform you why the event was not added to the system. Where a packet does fail, the developer should pass any error messages that they want to use back via the public_error object !!error.

The following example is a simple adding of an event packet object edgPacket into the event system:

-- Define Event Packet

!packet = object EDGPACKET()

!packet...

-- Add Packet to event system

if(!!edgCntrl.add(!packet).not()) then

!!alert.warning('Failed loading event packet (' & !!error.text & ').')

endif

-- End

return

Any code in the macro, function or method which is after the event has been added into the system, will be completed before the event is available to you.

Note:
Code after the '.add' method, should not modify any element of the packet definition, as in, forms, Global variable, and so on, as it will only modify the local definition, not the one that has been added on the EDG system.

TitleResults for “How to create a CRG?”Also Available in