VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Listing registered applications

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
186 Views, 2 Replies

Listing registered applications

Hi.

I want to list all the registered applications and am trying to use the
following code:

Dim dbMyDrawing As AcadDatabase
Dim rgapMyRegApp As AcadRegisteredApplication
Set dbMyDrawing = ThisDrawing.Database
For Each rgapMyRegApp In dbMyDrawing
Debug.Print rgapMyRegApp.Name
Next rgapMyRegApp

I am getting an "Object does not support this property or method." error.
Any idea why?

I can get it to work with:
Dim i As Integer
Debug.Print ThisDrawing.RegisteredApplications.Item(1).Name
For i = 0 To ThisDrawing.RegisteredApplications.Count - 1
Debug.Print ThisDrawing.RegisteredApplications.Item(i).Name
Next i
But am interested in why it will not work with my first example.

Any assistance will be appreciated.

Regards

Sean Bartleet
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

first subroutine... you need to get to the Collection object for reg apps
For Each rgapMyRegApp In dbMyDrawing.RegisteredApplications

James
Message 3 of 3
Anonymous
in reply to: Anonymous

Hi,

Well, doesn't that make sense now that you point it out to me.

Thanks.

Sean


"James Belshan" wrote in message
news:A4923693967CD196CC93503B031A37A1@in.WebX.maYIadrTaRb...
>
> first subroutine... you need to get to the Collection object for reg apps
> For Each rgapMyRegApp In dbMyDrawing.RegisteredApplications
>
> James

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost