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

AVEVA™ E3D Design

Execute

  • Last UpdatedSep 30, 2022
  • 1 minute read

The Execute callback is called when the attached tool is clicked and optionally can be passed a single STRING argument !args[0] from the tool.

In its simplest form a button requires a simple callback to be executed.

define method .execute(!args is ARRAY)

show !!form

endmethod

If the button provides a string argument:

define method .execute(!args is ARRAY)

if (!args.size() gt 0) then

if (!args[0] eq 'EQUI') then

!!callback1()

elseif (!args[0] eq 'PIPE') then

!!callback2()

else

!!callback3()

endif

endif

endmethod

For a state button we can get the current state from the button using the checked() method:

define method .execute(!args is ARRAY)

!mode = !this.checked()

if (!mode) then

!!callbackA()

else

!!callbackB()

endif

endmethod

For a combo box we can get the selected item using the .selectedindex() method.

define method .execute(!args is ARRAY)

!this.setSpecification( !this.selectedIndex() )

Endmethod

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