.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help..why do i cannot use docunmentcollect to open an drawing

5 REPLIES 5
Reply
Message 1 of 6
hoyin0820
461 Views, 5 Replies

Help..why do i cannot use docunmentcollect to open an drawing

Error 1 'open' is not a member of 'Autodesk.AutoCAD.ApplicationServices.DocumentCollection'. 

 

how can i solve this problem?

5 REPLIES 5
Message 2 of 6
artc2
in reply to: hoyin0820

Open is parrt of the DocumentCollectionExtension class.

Message 3 of 6
hoyin0820
in reply to: artc2

i am using autocad 2013

 

i have tried ur method it also do not work

 

Public Class test

<CommandMethod("OpenDrawing", CommandFlags.Session)> _
Public Sub OpenDrawing()

Dim acDocMgr As DocumentCollection = Application.DocumentManager

DocumentCollectionExtension.Open(acDocMgr, "C:\Users\michael.yeung\Desktop\Acad\1F_MHS.dwg", False)

End Sub
End Class

Message 4 of 6
Balaji_Ram
in reply to: hoyin0820

Hi,

 

Can you please try the attached sample project ? 

It worked ok in AutoCAD 2013. You may need to change the path to the referenced assemblies.

 

You may also be interested in this blog post about extension methods :

http://adndevblog.typepad.com/autocad/2012/05/extension-methods-in-autocad-2013.html 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 5 of 6
hoyin0820
in reply to: Balaji_Ram

it also have error....

Message 6 of 6
Balaji_Ram
in reply to: hoyin0820

The sample project works ok in AutoCAD 2013 in my system.

 

Not sure what else could be causing this error.

 

Maybe you can try this :

http://adndevblog.typepad.com/infrastructure/2012/08/add-is-not-a-member-of-autodeskautocadapplicati...

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost