TranslateAction Callback

TestStand ATML Toolkit 2017 Help

Edition Date: June 2018

Part Number: 374205B-01

»View Product Info
Download Help (Windows Only)

The ATML TD translator calls the TranslateAction callback after translating the <Behavior> child element of each <Action> or <Test> element.

Typical Use

Use the TranslateAction callback to modify the code module generated for the <Action> element. If the UpdateActionParameters callback modifies parameters for a LabVIEW code module, you must change the connector pane to match the modified parameters.

LabVIEW

The following figure shows the controls and indicators connected to the VI connector pane.

CodeGenerator_TranslateAction.vi

  • TranslatorCodeGenerator—Automation Refnum control that uses the TranslatorCodeGenerator interface.
  • CodeGenerator—Automation Refnum control that uses the LVCodeGenerator interface.
  • FileGenerator—Automation Refnum control that uses the VIFileUpdater interface.
  • DOMNode—Automation Refnum control that uses the MSXML DOM Node of the <Action> element.
  • ParameterCollection—Automation Refnum control that uses the ParameterInfoCollection interface.
  • Error Out—The error out cluster, which contains the error status, code, and source information.

LabWindows/CVI

LabWindows/CVI Function Prototype

HRESULT __stdcall CodeGenerator_TranslateAction(
IDispatch * translatorCodeGen,
IDispatch * cviCodeGen,
IDispatch * cFileUpdater,
IDispatch * domNode,
IDispatch * paramInfoCollection,
long* errorCode,
BSTR* errorDescription )

Microsoft Visual C++ Function Prototype

extern "C" HRESULT __stdcall CodeGenerator_TranslateAction(
TranslatorCodeGenerator* translatorCodeGen,
CVICodeGenerator* cviCodeGen,
CFileUpdater* cFileUpdater,
MSXML2::IXMLDOMNode* domNode,
ParameterInfoCollection* paramInfoCollection,
long* errorCode,
BSTR* errorDescription )

Parameters

  • translatorCodeGen—Instance that implements TranslatorCodeGenerator interface.
  • cviCodeGen—Instance that implements CVICodeGenerator interface.
  • cFileUpdater—Instance that implements CFileUpdater interface.
  • domNode—MSXML DOM Node of the <Action> element.
  • paramInfoCollection—Instance that implements ParameterInfoCollection interface.
  • errorCode—Error code to log in the log file.
  • errorDescription—Error description of the error code.

See Also

<Action> Element

<Behavior> Element

CFileUpdater

Creating a DLL for a LabWindows/CVI Custom Code Generator

Creating a VI for a LabVIEW Custom Code Generator

CVICodeGenerator

Example LabVIEW Custom Code Generator VIs

LVCodeGenerator

ParameterInfoCollection

Recommended LabWindows/CVI Function Prototypes

Recommended Microsoft Visual C++ Function Prototypes

TranslatorCodeGenerator

UpdateActionParameters Callback

VIFileUpdater

WAS THIS ARTICLE HELPFUL?

Not Helpful