Integration with Other Applications > Windchill Workgroup Manager Documentation > ECAD > Advanced Techniques > Using Hooks > Hook Data Exchange
  
Hook Data Exchange
In order for the Windchill Workgroup Manager to communicate with an external program, it passes data using dedicated environment variables that tell it where to find files that are used as input to the external program, the input data is then modified and passed back to the Windchill Workgroup Manager as an output file . The environment variables, HOOK_INPUT and HOOK_OUTPUT are used to designate these files.
Other environment variables are used to pass additional information. A complete list of these environment variables is shown in the table below:
Variable Name
Description
DESIGN_DIR
Represents the directory for the design data. (Normally inside the Workspace Local Directory.)
DESIGN_ITEM
Represents the design item selected for the operation.
NEUTRAL_FORMAT_FILE
Points to the neutral format file related to the design item, IF:
It is selected during the operation (only for neutral-dependent ECAD tools)
The neutral format was created previously by the Windchill Workgroup Manager
Otherwise, the value is NULL.
DESIGN_NAME
Represents the name of the EPM document.
BUILT_IN_EXECUTION
Indicates whether or not the Windchill Workgroup Manager’s default action will be executed during this operation. This variable has two possible values:
BuiltInExecutionResult:False signifies that the default action was skipped.
BuiltInExecutionResult:True signifies that the default action was executed
HOOK_INPUT
Points to a file that can be used to pass additional input data to the external program.
HOOK_OUTPUT
Points to a file that can be used by the external program to pass output data back to the Windchill Workgroup Manager.
In addition to the above environment variables, the Windchill Workgroup Manager also recognizes the external program’s return value. A return value of 0 is taken to mean successful execution of the external program. Any other return value is taken to represent an error condition, and the action will be aborted.