VB.NET Sample Code from .NET Developers' Guide Not Working for Me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I hate to keep being the complainer in the group but I'm really trying to understand how to become a better programmer in .NET. My mission today was to write some code which would open an existing drawing. I worked on a machine with 2009 first and only limited success, so I then went to another computer running AC 2013 and accessed the 2013 .NET Developers' Guide at this link:
About 1/2 way down the page I found information on how to open an existing drawing. As usual the text is missing what references need to be added in order to make the code work. So thinking it would be as the first couple of chapters in the guide outlined I would need the following:
AcMgd.dll AcDbMgd.dll AcCoreMdg.dll
When I inserted the code I got the error
'Open is not a member of Autodesk.AutoCAD.ApplicationServices.DocumentCollection'
Now trying to be student who learns why this is happening I do a quick search and find in another Autodesk forum that DocumentCollection should be replaced with DocmentCollectionExtension and that I should read more in the .NET migration part of the .NET Developers' Guide for 2013. I further see mention that the statement should actually be DocumentCollectionExtension.Open but I cannot get the .Open to enter into the IDE. I guess I'm missing another refernence but since I've tried just about all of them I cannot imagine which one it could be.
I have poured over the migration page and found only limited information on how I could resolve this. Perhaps I am missing it right in front of me.