LISP to create Civil 3D surface from Point file

LISP to create Civil 3D surface from Point file

hakangus
Advocate Advocate
5,692 Views
18 Replies
Message 1 of 19

LISP to create Civil 3D surface from Point file

hakangus
Advocate
Advocate

I want a LISP routine that creates a TIN Surface in Civil 3D from a specific CSV-file. Is that possible?

0 Likes
Accepted solutions (1)
5,693 Views
18 Replies
Replies (18)
Message 2 of 19

Pointdump
Consultant
Consultant

H,

 

Well, maybe. I don't know that much about LISP. But I just have to ask you why it needs to be a LISP? You can make a Surface from a CSV file easily and quickly.

 

Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
Message 3 of 19

AllenJessup
Mentor
Mentor

To add to what Dave said.

 

pfadd.png

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 4 of 19

hakangus
Advocate
Advocate

Point taken!

 

My reasons are that if I could get some help with that LISP routine, I have an extremely streamlined workflow from database points to a Civil Surface.

 

Backkground:

We store our height points in an Oracle database. To search them out we draw a polygon, check it in the database with FDO Connection and use it like a boundary. Then SQL creates a CSV file with points that is renamed and copied to the working folder.

That, we have accomplished in LISP and it is a one-button-click.

 

Wishlist:

The last thing that we don´t know how to do is to create a Surface with a certain CSV file in LISP. If we could do that we´ve made it really easy for our users to do their work.

Message 5 of 19

Jeff_M
Consultant
Consultant
Accepted solution

Attached is a lisp file that will help with this task. It is setup as a function which can be called from another lisp like so:

 

(createtinfromfile "E:\\Civil 3D Projects 2016\\Surface.txt" "Test1" "C-TOPO-EG" "Border Only" "PNEZD (comma delimited)")

 where the arguments are: filename surfacename layer stylename fileformat.

 

Jeff_M, also a frequent Swamper
EESignature
Message 6 of 19

hakangus
Advocate
Advocate

EDIT:

To hasty. Maybe I did something wrong after all. Now it seem to work.

0 Likes
Message 7 of 19

hakangus
Advocate
Advocate

Thanks a lot, Jeff! You helped me out once again!

0 Likes
Message 8 of 19

hakangus
Advocate
Advocate

Thanks to Jeff (and others) we now have a command that gets point data from Oracle to a file, copies and renames it, creates a Civil Surface with maxtrianglelength set to 5 m. Many thanks to all you people out there helping eachother getting smarter!

0 Likes
Message 9 of 19

BearDyugin
Contributor
Contributor

Thank you very much, now on the basis of your code I will try to create a surface of volumes.
Until the end is not sure what it will turn out

0 Likes
Message 10 of 19

erdemcankur12
Observer
Observer

how can I use this lisp on command window.

0 Likes
Message 11 of 19

hakangus
Advocate
Advocate

See top post where it says: 

(createtinfromfile "E:\\Civil 3D Projects 2016\\Surface.txt" "Test1" "C-TOPO-EG" "Border Only" "PNEZD (comma delimited)")

 where the arguments are: filename surfacename layer stylename fileformat.

 

I have made a command in the Toolbox easy use but the command line is the same.

 

Good Luck!

0 Likes
Message 12 of 19

erdemcankur12
Observer
Observer

I take that message. 

0 Likes
Message 13 of 19

244311
Participant
Participant

how can ı use this. I cant. I have to much point files and ı must create seperate surfaces

0 Likes
Message 14 of 19

Jeff_M
Consultant
Consultant
Use it just as has been described. Why can't you use it? Just create a new line for each point file:
(createtinfromfile "E:\\Civil 3D Projects 2016\\Surface1.txt" "Test1" "C-TOPO-EG" "Border Only" "PNEZD (comma delimited)")
(createtinfromfile "E:\\Civil 3D Projects 2016\\Surface2.txt" "Test2" "C-TOPO-EG" "Border Only" "PNEZD (comma delimited)")
(createtinfromfile "E:\\Civil 3D Projects 2016\\Surface3.txt" "Test3" "C-TOPO-EG" "Border Only" "PNEZD (comma delimited)")
(createtinfromfile "E:\\Civil 3D Projects 2016\\Surface4.txt" "Test4" "C-TOPO-EG" "Border Only" "PNEZD (comma delimited)")
Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 15 of 19

244311
Participant
Participant

 

I have 1.txt and file path :C : \ Civil 3D Projects I edited name, path, layer and penzd but ı cant run

Screenshot_3.png

0 Likes
Message 16 of 19

Jeff_M
Consultant
Consultant

@244311 Please post your dwg and txt files.

Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 17 of 19

libarraSCXGZ
Contributor
Contributor
@Jeff_M is it possible to automatically create a series of surfaces using VLISP, where the origin is 3Dfaces that are on different layers? In other words, create surfaces from objects on different layers.
greetings¡
0 Likes
Message 18 of 19

Jeff_M
Consultant
Consultant

@libarraSCXGZ no, the COM API does not have a method for adding drawing objects. This can be done using the .NET API. If you'd like to pursue this please inquire in the C3D Customization forum.

Jeff_M, also a frequent Swamper
EESignature
Message 19 of 19

libarra
Explorer
Explorer

thank you so much. jeff¡¡

 

0 Likes