Regards,
Maybe someone can help me solve my problem.
I wonder why this code does not work when working with AutoCAD 2013:
I wonder if the way we work with INTEROP, and INTEROP.COMMON, has changed in AutoCAD 2013, and if so what would be the new way of working with these references.
When I run the plugin shows me the following error:
There are some changes in AutoCAD .NET API since ACAD2013. In your case you call Document's extension method GetAcadDocument():
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiDocument.GetAcadDocument()
FYI, migrating COM based VBA code into .NET API code and yet still using COM API doing the work is not a good choice. When start doing .NET programming withg AutoCAD, it would be better to forget all the COM stuff and try to learn and understand the .NET API, and only turn to COM when you really cannot find a way to do it with .NET API or you really have no time to learn .NET API (then why not stick with VBA?).
Norman Yuan
Does not work I have the following error:
Error 1 'MdiDocument' is not a member of 'Autodesk.AutoCAD.ApplicationServices.DocumentCollection'.
Since Acad2013, you need add 3 managed references:
accordmgd.dll
acdbmgd.dll
acmgd.dll
It is likely that you missed setting reference to accoremgd.dll.
Norman Yuan
If I have added the three references, not what will be the problem, as you show me and should work but still the same.
Anyway thank you very much po devote their time to help me solve my problem.