.NET

Reply
Contributor
hoyin0820
Posts: 15
Registered: ‎08-09-2013
Message 1 of 6 (212 Views)

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

212 Views, 5 Replies
09-01-2013 02:26 AM

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

 

how can i solve this problem?

Employee
artc2
Posts: 209
Registered: ‎06-08-2010
Message 2 of 6 (178 Views)

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

09-01-2013 09:21 AM in reply to: hoyin0820

Open is parrt of the DocumentCollectionExtension class.

Contributor
hoyin0820
Posts: 15
Registered: ‎08-09-2013
Message 3 of 6 (157 Views)

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

09-01-2013 06:38 PM 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

ADN Support Specialist
Balaji_Ram
Posts: 702
Registered: ‎03-21-2011
Message 4 of 6 (135 Views)

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

09-01-2013 10:33 PM 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

Contributor
hoyin0820
Posts: 15
Registered: ‎08-09-2013
Message 5 of 6 (116 Views)

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

09-02-2013 03:09 AM in reply to: Balaji_Ram

it also have error....

ADN Support Specialist
Balaji_Ram
Posts: 702
Registered: ‎03-21-2011
Message 6 of 6 (109 Views)

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

09-02-2013 04:02 AM 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

Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.