06-01-2012 02:34 PM
Is it possible to identify the adapter type of the step in CVI?
In the modelsupport project, c_report.c has a function
int DLLEXPORT _stdcall GetFlaggedValuesForReport_Html(CAObjHandle context, CAObjHandle optionsHandle, CAObjHandle stepResult, int level,
char *labelOnlyStart, char *labelStart, char *valueStart, CAObjHandle reportString)
{
..
}
How can I find the module adapter of the step whose results are to be traversed using this fuction?
Tried:
int DLLEXPORT _stdcall GetFlaggedValuesForReport_Html(CAObjHandle context, CAObjHandle optionsHandle, CAObjHandle stepResult, int level,
char *labelOnlyStart, char *labelStart, char *valueStart, CAObjHandle reportString)
{
TSObj_Adapter moduleAdapterType;
/// get Adapter type
tsErrChkMsgPopup( TS_ModuleGetAdapter (context, &errorInfo, &moduleAdapterType));
Error:
CA_DiscardObjHandle(moduleAdapterType);
return error;
}
This returns an ActiveX error: " No such interface supported"
using CVI 8.5 and TS 4.1
06-04-2012 08:13 AM
Not sure if this is helpful since I don't have CVI installed here but I think from the context you should be able to get the step. Once you have the step then you should be able to use the AdapterKeyName property to determine which adapter the step uses. You can read more about that property in the TS help.
This is assuming the context is the SequenceContext which is passed during execution time.