Hi,
I query my components like this:
sub GetComponents Dim Objs As ViewDraw.IVdObjs Objs = vdApp.Query(ViewDraw.VdObjectTypeMask.VDM_COMP, ViewDraw.VdAllOrSelected.VD_ALL) Dim Component As ViewDraw.Component For i = 1 To Objs.Count Component = Objs.Item(i) Dim CompName As String CompName = Component.Refdes Dim CompLabel As ViewDraw.IVdLabel CompLabel = Component.Label Next i msgbox "ready" end sub
The Macro is written in VB.Net, but it is easy to transfer to VBS. It is a cutout of something bigger I have here.
So a few things are missing, like inizialization of the vdApp Object, and the Licensing.
ciao /Stefan