AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Set plotting order of layers programmatically

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
530 Views, 3 Replies

Set plotting order of layers programmatically

Anonymous
Not applicable

How can I set or change the plotting order of layers in AutoCAD programmatically in a standalone application?

 

The program is made for AutoCAD Map 3D 2016 in Visual Studio 2012, the language is C#. The AutoCAD ObjectARX SDK is not installed on my computer.

 

Many thanks

Zoltán

0 Likes

Set plotting order of layers programmatically

How can I set or change the plotting order of layers in AutoCAD programmatically in a standalone application?

 

The program is made for AutoCAD Map 3D 2016 in Visual Studio 2012, the language is C#. The AutoCAD ObjectARX SDK is not installed on my computer.

 

Many thanks

Zoltán

3 REPLIES 3
Message 2 of 4
norman.yuan
in reply to: Anonymous

norman.yuan
Mentor
Mentor

You might want to explain what "...plotting order of layers..." mean. My guess is that you mean to set entities' "Draw Order" by layers before plotting. If so, yes, you can do it programmatically.

 

If you want to do this with a standalone application (EXE, desktop app or console app), then you can only use COM API to automate AutoCAD. That is, you need to run 2 applications in the same time (the EXE and AutoCAD), which can hardly be a good, user-friendly business solution in most cases. There is no need for ObjectARX SDK. Because AutoCAD has to run anyway, why not do it inside AutoCAD (so that user only needs to run AutoCAD, a single application for the job)? You can do it with either VBA, or AutoCAD .NET API plugin.

 

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes

You might want to explain what "...plotting order of layers..." mean. My guess is that you mean to set entities' "Draw Order" by layers before plotting. If so, yes, you can do it programmatically.

 

If you want to do this with a standalone application (EXE, desktop app or console app), then you can only use COM API to automate AutoCAD. That is, you need to run 2 applications in the same time (the EXE and AutoCAD), which can hardly be a good, user-friendly business solution in most cases. There is no need for ObjectARX SDK. Because AutoCAD has to run anyway, why not do it inside AutoCAD (so that user only needs to run AutoCAD, a single application for the job)? You can do it with either VBA, or AutoCAD .NET API plugin.

 

 

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 4
Anonymous
in reply to: norman.yuan

Anonymous
Not applicable

Thank you for your answer.

 

I'm new in AutoCAD developing. Is it possible to develop AutoCAD plugin application in C#.NET without ObjectARX SDK? If so, how can I do it?

 

Best regards

Zoltan

0 Likes

Thank you for your answer.

 

I'm new in AutoCAD developing. Is it possible to develop AutoCAD plugin application in C#.NET without ObjectARX SDK? If so, how can I do it?

 

Best regards

Zoltan

Message 4 of 4
norman.yuan
in reply to: Anonymous

norman.yuan
Mentor
Mentor

Since you are to use C# (or VB.NET, does not matter here), you would develop AutoCAD .NET API plugin (AutoCAD has LISP API/COM API/.NET API (or Managed API)/ObjectARX C++ API). With AutoCAD .NET API, all you need is AutoCAD installed and A version of Visual Studio (free Community version of 2019 is good for all later version of AutoCAD since 2013). While ObjectARX SDK is not required for AutoCAD .NET API development, it would be good idea to still downloaded to just for the API documentation browsing and .NET code sample to get started. Of course, you can search the web for more learning resources. If you just want to get started, I'd highly recommend you begin with watch some tutorials on YouTube, by searching "AutoCAD .NET Programming" (you would get quite some for sure). If you do have experience of programming in AutoCAD from Lisp/VBA, you would find the learning curve is a bit of steeper. 

I am not how long does it take for your learning to progress so that you can do what you want in your original post, it depends on both your AutoCAD knowledge and your programming knowledge. But for a novice, from quite a few months might be minimum to reach the point when one can write reasonable good code for production. 

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes

Since you are to use C# (or VB.NET, does not matter here), you would develop AutoCAD .NET API plugin (AutoCAD has LISP API/COM API/.NET API (or Managed API)/ObjectARX C++ API). With AutoCAD .NET API, all you need is AutoCAD installed and A version of Visual Studio (free Community version of 2019 is good for all later version of AutoCAD since 2013). While ObjectARX SDK is not required for AutoCAD .NET API development, it would be good idea to still downloaded to just for the API documentation browsing and .NET code sample to get started. Of course, you can search the web for more learning resources. If you just want to get started, I'd highly recommend you begin with watch some tutorials on YouTube, by searching "AutoCAD .NET Programming" (you would get quite some for sure). If you do have experience of programming in AutoCAD from Lisp/VBA, you would find the learning curve is a bit of steeper. 

I am not how long does it take for your learning to progress so that you can do what you want in your original post, it depends on both your AutoCAD knowledge and your programming knowledge. But for a novice, from quite a few months might be minimum to reach the point when one can write reasonable good code for production. 

 

Norman Yuan

Drive CAD With Code

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report