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

Autodesk.AutoCAD namespaces for C# and Sample code

10 REPLIES 10
Reply
Message 1 of 11
AloyH
4178 Views, 10 Replies

Autodesk.AutoCAD namespaces for C# and Sample code

Hi,

I am new to .Net and trying to do some C# programming. Where can I find some Autocad sample code for download?. Also where can I get the following namespaces?.

Autodesk.AutoCAD.ApplicationServices;

 Autodesk.AutoCAD.DatabaseServices;

 Autodesk.AutoCAD.EditorInput;

 Autodesk.AutoCAD.Runtime;

 Autodesk.AutoCAD.Geometry;

 Autodesk.AutoCAD.GraphicsInterface

I shall be thankful for help.

AloyH

10 REPLIES 10
Message 2 of 11
Hallex
in reply to: AloyH

You might want to download this example:

http://download.autodesk.com/media/adn/AutoCADDotNet_06thSept12.zip

 

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 3 of 11
AloyH
in reply to: AloyH

Thanks Hallex

AloyH

Message 4 of 11
Hallex
in reply to: AloyH

No problem

Digg dipper inside the API

Cheers Smiley Happy

 

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 5 of 11
AloyH
in reply to: AloyH

Hallex,

I am using AutoCAD 2011 and Visual Studio (pro) 2010. I down loaded ObjectARX 2010-2012 (for C#) and was trying to reference the three dlls namely: acdbmgd.dll, acmgd.dll and accoremgd.dll and ended up in an emplty folder each time. It appears what is contained in the SDK are only C++ classes. What seems to be the problem?.

Thanking in advance.

Aloyh 

Message 6 of 11
Hallex
in reply to: AloyH

I can't test this issue, because I still

working with A2010 only

 

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 7 of 11
Alfred.NESWADBA
in reply to: AloyH

Hi,

 

>> trying to reference the three dlls namely: [...] accoremgd.dll

AcCoreMgd.DLL has to be used starting with 2013, not for 2012 and previous.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 8 of 11
AloyH
in reply to: AloyH

Hallex,

Thank you for replying. Can you access the C# namespaces I have indicated in my fisrt posting using visual studio 2010?. If so ,pl let me know how you did it. I downloaded the Sep 6 examples indicated in the link you gave me, but cannot use the samples. Perhaps these are applicable to A2013.

Regards,

AloyH

Message 9 of 11
AloyH
in reply to: Alfred.NESWADBA

Hi Alfred,

Thanks for your reply. As you might have observed I use A2011 and Visual Studio 2010. My problem is how to use them for .Net API and referencing those dlls and use the name spaces indicated for C#.

Regards,

AloyH

Message 10 of 11
Balaji_Ram
in reply to: AloyH

Hello,

 

If you are using Visual Studio 2010 and AutoCAD 2011, then you will need to set the .Net Framework version to 3.5 in the project settings. You can then reference the Acmgd.dll and acdbmgd.dll from the <ObjectARX 2011>\inc folder. As Alfred said, you will not have the accoremgd.dll in the ObjectARX 2011 folder.

 

Set the references as "CopyLocal" as False and you are all set.

 

I have attached a simple sample project that I created using VS 2010 and that works with AutoCAD 2011.

 

Hope this helps.

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 11 of 11
AloyH
in reply to: AloyH

Thanks.

It works well with ACAD 2011.

I would like to copy and paste it in .Net forum in CadTutor where a similar posting by me remained unanswered for 10 days untill yours appeared.

Namasthei Balaji.

AloyH

 

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