Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
How to start Lisp with Civil 3D-Props?
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: How to start Lisp with Civil 3D-Props? (Read 4076 times)
0 Members and 1 Guest are viewing this topic.
Peter2
Swamp Rat
Posts: 650
How to start Lisp with Civil 3D-Props?
«
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?
Logged
Peter
AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23
Jeff_M
King Gator
Posts: 4087
C3D user & customizer
Re: How to start Lisp with Civil 3D-Props?
«
Reply #1 on:
March 17, 2017, 09:35:23 AM »
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
, 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):
Code - Auto/Visual Lisp:
[Select]
(
defun
getaeccApp
(
/
*
acad
*
C3D
)
(
vl-load-com
)
(
if
(
and
(
setq
*
acad
*
(
vlax-get-acad-object
)
)
(
setq
C3D
(
strcat
"HKEY_LOCAL_MACHINE
\\
"
(
if
vlax
-
user
-
product
-
key
(
vlax
-
user
-
product
-
key
)
(
vlax-product-key
)
)
)
C3D
(
vl
-
registry
-
read
C3D
"Release"
)
C3D
(
substr
C3D
1
(
vl-string-search
"."
C3D
(
+
(
vl-string-search
"."
C3D
)
1
)
)
)
C3D
(
vla-getinterfaceobject
(
vlax-get-acad-object
)
(
strcat
"AeccXUiLand.AeccApplication."
C3D
)
)
)
)
C3D
)
)
Logged
Peter2
Swamp Rat
Posts: 650
Re: How to start Lisp with Civil 3D-Props?
«
Reply #2 on:
March 20, 2017, 08:16:15 AM »
Thanks Jeff, I will look at it.
Logged
Peter
AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23
BIGAL
Swamp Rat
Posts: 1396
40 + years of using Autocad
Re: How to start Lisp with Civil 3D-Props?
«
Reply #3 on:
March 23, 2017, 09:49:50 PM »
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
Logged
A man who never made a mistake never made anything
Peter2
Swamp Rat
Posts: 650
Re: How to start Lisp with Civil 3D-Props?
«
Reply #4 on:
March 24, 2017, 04:09:46 AM »
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
«
Last Edit: March 28, 2017, 03:26:12 AM by Peter2
»
Logged
Peter
AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
How to start Lisp with Civil 3D-Props?