TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Peter2 on March 17, 2017, 08:05:27 AM
-
I would like to start with usage of Autolisp in Civil 3D (objects, props, ..)
Are there some references which describes the (different?) ways of communication between Lisp and Civil?
Have a fine weekend?
-
Peter, no, there are no references specifically for lisp with C3D. If you search the Autodesk C3D Customization forum you will find a number of posts steering you away from lisp lisp to the .NET API. You will also find quite a few small lisp commands that I, and others, have posted. The C3D COM API reference has not been updated since C3D 2012 (http://docs.autodesk.com/CIV3D/2012/ENU/API_Reference_Guide/com/civil_om.htm), and some of the links in that are broken so some creative editing of the url is needed at times.
There are quite a few of the COM objects that you cannot get/set properties for due to lisp not recognizing the type of variable it expects. However, there is still a lot you can do in lisp. Here is what I currently use (posted by another user on the C3D forum, I do not recall who that was though) to get the AeccLandApplication for any version of C3D (you will need this to get any C3D object without using a selection):
(defun getaeccApp
(/ *acad
* C3D
) (if vlax
-user
-product
-key
(vlax-user-product-key)
)
)
C3D
(vl
-registry
-read C3D
"Release") C3D
1
"."
C3D
)
)
(strcat "AeccXUiLand.AeccApplication." C3D
) )
)
)
C3D
)
)
-
Thanks Jeff, I will look at it.
-
What are you trying to do ?
To give a couple of my examples.
Rotate multiple Aeccpoints
Contour style display via a toolbar rather than toolspace
Label styles via a toolbar
-
Thanks.
In the meantime I found this document:
http://images.autodesk.com/adsk/files/AutoCAD_Civil_3D_API_Developer_s_Guide.pdf
I will start to work with it to understand the basic and the "data-system". For further questions I will come back to the forum.
EDIT: More links
Snoop Civil 3D 2015 Database (.bundle format)
http://adndevblog.typepad.com/infrastructure/2014/04/snoop-civil-3d-2015-database-bundle-format-1.html
Version 2017:
https://github.com/ADN-DevTech/Civil3DSnoop/tree/2017
Civil 3D 2017 - API Developer's Guide:
http://help.autodesk.com/view/CIV3D/2017/ENU/?guid=GUID-DA303320-B66D-4F4F-A4F4-9FBBEC0754E0
xx