I'm trying to iterate through component via .NET, but it does not work.
By using "COM Interop" , I got file named "Interop.ViewDraw.dll" .
But the code segment below could not work at all:
ViewDraw.Application DxAppHandle = (ViewDraw.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("ViewDraw.Application");
ViewDraw.IVdSchematicSheetDocuments tempSSD = DxAppHandle.SchematicSheetDocuments(); // tempSSD has counter, but CANNOT iterate through
ViewDraw.IVdObjs DesignObjects = DxAppHandle.Query(ViewDraw.VdObjectTypeMask.VDM_COMP, ViewDraw.VdAllOrSelected.VD_ALL); // CANNOT again
This problem has troubled me a few weeks, how can I fix it?
Any hints are welcome!