.NET

Reply
Contributor
hassanhafeez33
Posts: 17
Registered: ‎09-16-2011
Message 1 of 4 (144 Views)

Calling Civil3d code inside simple autocad.

144 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
fieldguy
Posts: 379
Registered: ‎03-31-2005
Message 2 of 4 (122 Views)

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*
dgorsman
Posts: 5,596
Registered: ‎10-12-2006
Message 3 of 4 (118 Views)

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.


Contributor
hassanhafeez33
Posts: 17
Registered: ‎09-16-2011
Message 4 of 4 (110 Views)

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.
Regards,
hassan.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!