17 Posts
0 Kudos
Registered: ‎09-16-2011
Post 1 of 4

Calling Civil3d code inside simple autocad.

148 Views, 3 Replies
09-09-2013 01:20 AM
Hi there.

I have a couple of questions:
1. Is it practical and possible to use civil3d api classes such as tinsurface etc in simple autocad by referencing aecdbmgd.dll if the objects are not appended to a database? That is, just for doing calculations etc?

2. Would it be legal?

It might sound like a silly question, kindly take it easy wih me :smileyhappy: thanks.
Valued Mentor
388 Posts
30 Kudos
Registered: ‎03-31-2005
Post 2 of 4

Re: Calling Civil3d code inside simple autocad.

09-09-2013 07:10 AM in reply to: hassanhafeez33

I can't speak directly to civil3d but creating autocad objects for "internal" purposes happens often.  For example, I create lines between 2d points just to get the angle, length, midpoint, etc.  Just remember to dispose any autocad objects you create.

*Expert Elite*
5,760 Posts
502 Kudos
Registered: ‎10-12-2006
Post 3 of 4

Re: Calling Civil3d code inside simple autocad.

09-09-2013 07:25 AM in reply to: hassanhafeez33

Since it would need to be loaded to be used, and needs a license to be loaded, and you have zero idea what kind of interdependancies are going to rear their ugly heads... just use Civil3D.  Alternatively, you can code a simplified version using specifically what you need without being constrained by the Civil3D data types and work processes.

If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.

17 Posts
0 Kudos
Registered: ‎09-16-2011
Post 4 of 4

Re: Calling Civil3d code inside simple autocad.

09-09-2013 09:08 AM in reply to: hassanhafeez33
1. Fieldguy, i am familiar with what youre talking about. And i do similar stuff. However,
2. Dgorsman, i am aware of the implications. But theres a limit to what i can mimic with my code. I have created several algorithms to do calculations for a tinsurface. Triangulation and all that. But i cant seem to get everything right. I have also tried kean's blog example by triangulating a polyface mesh and using exploded 3d faces. My point is, the way i can reference acad entities in other applications, is it possible to do something similar for tinsurface object from civil3d?
3. Using civil 3d nullifies my aim for writing a program for tinaurface calcs. Considering civil3d products fees and the ease with which i can work inside civil3d. I hope you know what i mean.
4. Theres a computational geometry library cgal. But my c++ is very rusty and i cant even seem to be able to compile it. Kindly take a look if you can.

Thanks a lot for your time though. Id appreciate any ideas.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!