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

error in document object creation

2 REPLIES 2
Reply
Message 1 of 3
shamkumar
584 Views, 2 Replies

error in document object creation

using System;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Runtime.InteropServices;
using Autodesk.AutoCAD.Interop.Common;
using Autodesk.AutoCAD.Interop;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.EditorInput;

namespace application
{
class Program
{
static void Main(string[] args)
{

Document acDoc = Application.DocumentManager.MdiActiveDocument;

 

}

}

Working Environment:-

  1. Visual Studio 2010
  2. AutoCAD 2011 
  3. C#

 

 

After run following error will occure

 

"

An unhandled exception of type 'System.TypeLoadException' occurred in mscorlib.dll

 

Additional information: Method 'CopyTo' in type 'Autodesk.AutoCAD.ApplicationServices.DocumentCollection'

from assembly 'acmgd, Version=18.1.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation ."

2 REPLIES 2
Message 2 of 3

I see what you're trying to create a standalone application (exe-file). In this case you can not use AutoCAD. NET API (ie acmgd.dll, acdbmgd.dll, accoremgd.dll, etc)

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 3 of 3

Although you can license the RealDWG SDK to add DWG capability to your own app. Brief explanation here - http://adndevblog.typepad.com/autocad/2012/03/readingwriting-dwg-files-from-a-standalone-application....

Cheers,

Stephen Preston
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