AutoCAD Civil 3D Customization

AutoCAD Civil 3D Customization

Reply
Valued Mentor
kevin.barnett
Posts: 397
Registered: ‎08-13-2007
Message 21 of 28 (337 Views)

Re: AEC Objects & LISP

07-31-2012 01:48 AM in reply to: peterfunkautodesk

What about stand alone development, outside Civil 3D?

Is it possbible to reference C3D dot net libraries in stand alone devlopments?

Or should developers only build applications to worlk inside C3D?

Are the answers consistant with 2012 and 2013 versions of C3D?

Thanks,

Kevin.

 

Member
rubenarias
Posts: 5
Registered: ‎03-29-2013
Message 22 of 28 (279 Views)

Re: AEC Objects & LISP

03-29-2013 04:15 AM in reply to: coffeeTwitch

Hi there,

 

I disagree with everyone who thinks LISP is old and a bad way to develop Civil 3D.

 

LISP is cool, clear, and stable, and one can do a lot of things using LISP.

 

The key is to know how to use properties and methods, and just all of then use the same structure :

(vlax-get-Property *Object* 'Property)

(vlax-inoke-method *Object* 'Method)

 

Although to start a Civil 3D application, we need to know some other functions 

 

First of all we activate the Visual Lisp extension for AutoLISP

(vl-load-com) ;;;Enables vl, vla and vlax funtions

 

To catch the Civil 3D application (an objet of AeccAplication class)
(if (not *Civil3D*)                        
   (setq *Civil3D*
      (vla-getinterfaceObject
         (vlax-get-acad-object);;;AutoCAD Object Application (any version)
         "AeccXUiLand.AeccApplication.7.0" ;Civil3D2010 Object Application      
      )      ;;;some other versions:                    
   )         ;;; 2009... "AeccXUiLand.AeccApplication.6.0"                      
)            ;;; 2011... "AeccXUiLand.AeccApplication.8.0"

             ;;; 2012... "AeccXUiLand.AeccApplication.9.0"   

 

From here, we can use properties and methods as if we were using any other language:

For example, to take the ActiveDoument (a AeccApplication Property)
(if (not *aeccDoc*)
  (setq *aeccDoc* (vlax-get-Property *Civil3D* 'ActiveDocument)))

Etc...

Rubén Arias Fernández
PhD. Civil Engineer
ADN Support Specialist
augusto.goncalves
Posts: 387
Registered: ‎04-30-2009
Message 23 of 28 (267 Views)

Re: AEC Objects & LISP

04-01-2013 05:59 AM in reply to: rubenarias

Although LISP is good and still working, the COM interfaces used accessible from LISP to customize Civil 3D are not evolving anymore, all new features and improvements are coming to .NET API (which we cannot access from LISP).

 

In general, consider LISP+COM a good way for small or prototype applications, and .NET for bigger and more complex. Also C++ can access both COM and .NET, but it's a more complicated language for beginners.

Regards,



Augusto Goncalves
Autodesk Developer Network
ADN Support Specialist
augusto.goncalves
Posts: 387
Registered: ‎04-30-2009
Message 24 of 28 (266 Views)

Re: AEC Objects & LISP

04-01-2013 06:04 AM in reply to: kevin.barnett

Kevin,

 

To access Civil 3D APIs from stand alone application you need COM. You can either use native built-in COM APIs inside Civil 3D or expose .NET features through COM interfaces, see more at http://through-the-interface.typepad.com/through_the_interface/2009/05/interfacing-an-external-com-a...

 

Access from outside have advantages, but in general the COM interface add complexity and, therefore, speed/performance cost. Not much, but should be considered if you application does lots of data interchange with Civil 3D.

 

Yes, it's consistent between 2012 and 2013, but note that binary incompatibility between those two version will force applications that run inside Civil 3D to be rebuild, nothing complicated though, see at http://adndevblog.typepad.com/autocad/2012/04/migrating-objectarx-and-net-plug-ins-to-autocad-2013.h...

Regards,



Augusto Goncalves
Autodesk Developer Network
Active Contributor
lelandleahy4987
Posts: 44
Registered: ‎12-30-2008
Message 25 of 28 (261 Views)

Re: AEC Objects

04-01-2013 09:09 AM in reply to: rubenarias
Glad you are happy, that is all that matters. Yeah I worked in the yard and on the vehicles all weekend. Leland Leahy COUGHLINPORTERLUNDEEN STRUCTURAL CIVIL SEISMIC ENGINEERING 413 Pine Street | Suite 300 | Seattle WA 98101 P: 206.343.0460 | F: 206.343.5691 www.cplinc.com
Leland
Civil3d 2012
Windows 7 64x (16 gigs ram)
Distinguished Contributor
kulfi
Posts: 924
Registered: ‎09-29-2005
Message 26 of 28 (132 Views)

Re: AEC Objects & LISP

04-07-2014 04:11 AM in reply to: peterfunkautodesk

OK can you tell which or which training i should take to learn API.

thanks

Kulfi
Electronics Engineer

Pind Saudi Arabia



ADN Support Specialist
Partha.Sarkar
Posts: 543
Registered: ‎06-09-2009
Message 27 of 28 (114 Views)

Re: AEC Objects & LISP

04-08-2014 10:34 PM in reply to: kulfi

Hi Kulfi,

 

I am sure, there would various organizations to deliver a customized API training, however, to get started you can refer to Autodesk DevTVs (these are training videos on API) and you can also refer to other resources available in Autodesk website. See the links below -

 

http://www.youtube.com/channel/UC6Fl_1mFNt0rBqa068Vaxcg

 

http://usa.autodesk.com/adsk/servlet/index?id=1911627&siteID=123112

 

 

Thanks,
Partha Sarkar

 



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Distinguished Contributor
kulfi
Posts: 924
Registered: ‎09-29-2005
Message 28 of 28 (100 Views)

Re: AEC Objects & LISP

04-09-2014 11:39 PM in reply to: kevin.barnett

 

Thanks a lot for providing vlauable informations,

My Issue here is that i ned to get all the Aecc Objects ( Pressure Pipe Accessories) Information from Civil 3d 2014 (Pressure Network) a new topic added to Civil 3d , My concern here is if there is any related material on this issue which will be really helfull to me.

Thanks

Kulfi
Electronics Engineer

Pind Saudi Arabia



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!