Hi Guys,
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.ApplicationDxAppHandle = (ViewDraw.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("ViewDraw.Application");
ViewDraw.IVdSchematicSheetDocumentstempSSD = DxAppHandle.SchematicSheetDocuments(); // tempSSD has counter, butCANNOTiterate through
ViewDraw.IVdObjsDesignObjects = DxAppHandle.Query(ViewDraw.VdObjectTypeMask.VDM_COMP, ViewDraw.VdAllOrSelected.VD_ALL); // CANNOTagain
This problem has troubled me a few weeks, how can I fix it?
Any hints are welcome!