ObjectARX

Reply
Valued Contributor
TickleMeElmo
Posts: 72
Registered: ‎08-18-2009
Message 1 of 9 (387 Views)
Accepted Solution

Worth learning C++?

387 Views, 8 Replies
09-27-2011 04:38 PM

Is there much advantage learning C++ for ObjectARX development?  I've used VBA / VB6 / VB.net for years (mainly .net) so am nice and comfortable with it, but I see loads of ObjectARX code in C++.

it depends what you want to do.

 

If the only AutoCAD API available to meet your needs is the unmanaged C++ ObjectARX API (e.g. if you decide you absolutely have to create a custom objects), then you'll have to learn C++ or pay someone to write it for you.

 

IMHO If the .NET API gives you everything you need, then there is no benefit to also learning unmanaged C++. And if you're new AutoACD programming, then I'd suggest you start with the .NET APi and see how it goes. You'll be learning the general structure of the unmanaged API as you learn the .NET API because the managed API is built on top of the unmanaged API.

 

 

Board Manager
StephenPreston
Posts: 400
Registered: ‎05-22-2006
Message 2 of 9 (363 Views)

Re: Worth learning C++?

09-29-2011 06:58 PM in reply to: TickleMeElmo

it depends what you want to do.

 

If the only AutoCAD API available to meet your needs is the unmanaged C++ ObjectARX API (e.g. if you decide you absolutely have to create a custom objects), then you'll have to learn C++ or pay someone to write it for you.

 

IMHO If the .NET API gives you everything you need, then there is no benefit to also learning unmanaged C++. And if you're new AutoACD programming, then I'd suggest you start with the .NET APi and see how it goes. You'll be learning the general structure of the unmanaged API as you learn the .NET API because the managed API is built on top of the unmanaged API.

 

 

Cheers,

Stephen Preston
Autodesk Developer Network
Contributor
anishtain4
Posts: 21
Registered: ‎06-01-2011
Message 3 of 9 (292 Views)

Re: Worth learning C++?

10-31-2011 01:53 AM in reply to: StephenPreston

I have to create new objects, for example I need to creat an object for sewer line and some other kind of things. When I want to make an add-on like thing to compute some stuffs and give a material take off should I learn C# too?

I need some GUI for my application, when I used the integration wizard in my VS2008 I can only see autodesk in the C#, not c++ how can I add it here too?

tnx

Board Manager
StephenPreston
Posts: 400
Registered: ‎05-22-2006
Message 4 of 9 (278 Views)

Re: Worth learning C++?

10-31-2011 09:31 PM in reply to: anishtain4

If you have to create a custom object/entity, then you will have to use C++. For everything else, you can probably use .NET or C++. Its your choice.

 

For your second question, it sounds like you're using the AutoCAD .NET Wizards and not the ObjectARX Wizards. The ObjectARX Wizards are posted to www.autodesk.com/developautocad. The direct link is http://images.autodesk.com/adsk/files/objectarx_2012_wizards.zip.

 

The ObjectARX Wizards only work with professional versions of Visual Studio - not Visual C++ Express.

 

Cheers,

Stephen Preston
Autodesk Developer Network
Valued Contributor
TickleMeElmo
Posts: 72
Registered: ‎08-18-2009
Message 5 of 9 (265 Views)

Re: Worth learning C++?

11-01-2011 06:31 AM in reply to: StephenPreston

<muses to self>

The ability to create/use custom entity classes is hugely appealing.....I just can't help wondering though if it would be similar to the old days where someone would create a custom .shx just because they could.  The next decade would be characterized by "Can't find shape file xxxx" messages.  (Presumably if I use a custom entity class the dll has to follow the drawing around).

</muses to self>

Board Manager
StephenPreston
Posts: 400
Registered: ‎05-22-2006
Message 6 of 9 (262 Views)

Re: Worth learning C++?

11-01-2011 07:43 AM in reply to: TickleMeElmo

That is a danger. IMHO One should never create a custom entity unless one has no other choice to achieve the same functionality. And when making your design decision, always consider how you feel when you see that proxy dialog appear as you open a drawing someone sent you :-).

 

BTW The closes we have in .NET is the Overrule API. You can customize the behavior of a standard AutoCAD entity without creating a custom entity. But any custom graphics/behavior you create with your Overrule aren't saved to the drawing and only appear when your plug-in is loaded. That's either a good thing or a bad thing, depending on your need.

Cheers,

Stephen Preston
Autodesk Developer Network
Valued Contributor
TickleMeElmo
Posts: 72
Registered: ‎08-18-2009
Message 7 of 9 (259 Views)

Re: Worth learning C++?

11-01-2011 07:48 AM in reply to: StephenPreston

I saw a Youtube clip(?) where API had overridden circle grip drag behaviour to filter on X (or Y) direction.  I'm picking that's an example of overruling

Contributor
anishtain4
Posts: 21
Registered: ‎06-01-2011
Message 8 of 9 (255 Views)

Re: Worth learning C++?

11-01-2011 11:30 AM in reply to: StephenPreston

Veryyy good and usefull point, I keep that in my mind while I'm doing my stuff.

Actually I'm thinking of custom objects since in this way it would be faster for calculation. yet overrule is a greate idea. We need to take out some information from the drawings which is usefull only for us while we have this dll we added, but when we give out the drawing to the executers they use it as a usual cad file, right? This is awsome.

Valued Contributor
TickleMeElmo
Posts: 72
Registered: ‎08-18-2009
Message 9 of 9 (250 Views)

Re: Worth learning C++?

11-01-2011 11:35 AM in reply to: anishtain4

Awesome indeed.  A lesser known fact about Autodesk is that originally the company was going to be called Awesomedesk - it was just that Autodesk fitted better for page layout purposes.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.