Quantcast
Channel: Mentor Graphics Communities: Message List
Viewing all articles
Browse latest Browse all 4541

Re: Unable to get rid of exception in VB .NET Code (Exception - Unable To Allocate Object Collection)

$
0
0

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


Viewing all articles
Browse latest Browse all 4541


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>