Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LISP to create Civil 3D surface from Point file

18 REPLIES 18
SOLVED
Reply
Message 1 of 19
hakangus
3792 Views, 18 Replies

LISP to create Civil 3D surface from Point file

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

18 REPLIES 18
Message 2 of 19
Pointdump
in reply to: hakangus

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 2024
Message 3 of 19
AllenJessup
in reply to: hakangus

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
in reply to: AllenJessup

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
in reply to: hakangus

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
in reply to: Jeff_M

EDIT:

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

Message 7 of 19
hakangus
in reply to: hakangus

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

Message 8 of 19
hakangus
in reply to: hakangus

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!

Message 9 of 19
BearDyugin
in reply to: Jeff_M

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

Message 10 of 19
erdemcankur12
in reply to: Jeff_M

how can I use this lisp on command window.

Message 11 of 19
hakangus
in reply to: erdemcankur12

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!

Message 12 of 19
erdemcankur12
in reply to: hakangus

I take that message. 

Message 13 of 19
244311
in reply to: Jeff_M

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

Message 14 of 19
Jeff_M
in reply to: 244311

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
Message 15 of 19
244311
in reply to: Jeff_M

 

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

Screenshot_3.png

Message 16 of 19
Jeff_M
in reply to: 244311

@244311 Please post your dwg and txt files.

Jeff_M, also a frequent Swamper
EESignature
Message 17 of 19
libarraSCXGZ
in reply to: Jeff_M

@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¡
Message 18 of 19
Jeff_M
in reply to: libarraSCXGZ

@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
in reply to: Jeff_M

thank you so much. jeff¡¡

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report