Table Environment Variable via COM
Hello,
I'm having a problem casting a table environment variable to it's correct type. I'm currently controlling TestComplete via COM and doing the following on the .NET (C#) side:
var proj = IntegrationObject.GetObjectByName("Project");
var tableVars = proj.Variables;
ItcTableVariable Table1 = (ItcTableVariable)tableVars.VariableByName("TheTableVariable")
After casting Table1 to ItcTableVariable, I got the following exception:
+ $exception {"Unable to cast COM object of type 'System.__ComObject' to interface type 'TestComplete.ItcTableVariable'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{1615C685-B588-40CB-8AAA-E4D74C963B59}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."} System.Exception {System.InvalidCastException}
I presume I'm going to hit the same problem casting to an ItcTableVariableIterator as well (which is what my next step would be).
Please advise. Thanks.