Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Lisp Routine for Plotting a Cylinder with 2 different points and levels

jaspal_sandhu1
Explorer

Lisp Routine for Plotting a Cylinder with 2 different points and levels

jaspal_sandhu1
Explorer
Explorer

Hi

Does anyone know of a Lisp routine that will help me plot a cylinder with given Eastings, Northings and levels from a excel table? I can plot the line and then draw a circle to then extrude a cylinder and follow the path of the line but its time consuming when i have so many to do, hence the reason why i need a lisp routine that will automatically plot eastings, northings, levels multiple times.

 

Thankyou in advance.

0 Me gusta
Responder
251 Vistas
2 Respuestas
Respuestas (2)

CodeDing
Advisor
Advisor

@jaspal_sandhu1 ,

 

There are multiple posts about reading either Excel or, preferably, csv files. Once you have your data from your file, this function will create your cylinder on the current layer. Just pass your 2 points into it:

(defun 2P->Cylinder (p1 p2 / cylinderRadius)
  (setq cylinderRadius 5.0)
  (if (and (apply 'and (mapcar 'listp (list p1 p2)))
           (apply 'and (mapcar 'numberp (append p1 p2)))
      );and
    (command "_.CYLINDER" "non" p1 cylinderRadius "a" "non" p2)
  ;else
    (prompt "\n2P->Cylinder error: Bad point(s) provided.")
  );if
);defun

 

LM Read CSV

Useful Functions

ALx Functions

 

Hope that helps.

Best,

~DD

 

0 Me gusta

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

are you referring to boreholes?

If yes I would suggest to use Autodesk Civil 3D and it's plugin >>>Geotechnical Module<<<.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Me gusta