Anuncios

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

CodeDing
en respuesta a: jaspal_sandhu1

@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