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.
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...
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.
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...
OK can you tell which or which training i should take to learn API.
thanks
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
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