Lisp for Multile points

Lisp for Multile points

Philip-John
Advocate Advocate
4,649 Views
6 Replies
Message 1 of 7

Lisp for Multile points

Philip-John
Advocate
Advocate

I need the following commands in a lisp format

DRAW>POINTS>MULTIPLE POINTS

 

Regards

Philip

0 Likes
Accepted solutions (1)
4,650 Views
6 Replies
Replies (6)
Message 2 of 7

dbhunia
Advisor
Advisor

Hi,

 

Try this.....

 

(defun c:MLP (/ pnt)
  (while (setq pnt (getpoint "\nSpecify a point: "))
    (command "point" pnt)
) (princ) )

 

Also check this.....

 

https://www.cadlinecommunity.co.uk/hc/en-us/articles/201965421-AutoCAD-2013-The-MULTIPLE-Command


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes
Message 3 of 7

Philip-John
Advocate
Advocate

Thanks for the lisp, but when i use it i am getting the command line like (see image acad  001)

I am able to insert one point even I paste values at command point

if I do manual command (DRAW>POINT>MULTIPLE POINT) getting the command line like (see image acd002)

I am able to insert multiple points by paste (at once) the coordinates values

 

0 Likes
Message 4 of 7

dbhunia
Advisor
Advisor

Hi

 

It's a string message only in command line......

 

If you continue with pick a piont on drawing it will place points on the picked position, until you press enter or escape.......

 

If you want the message in the command line like image ...002.png then change the line.....

 

(while (setq pnt (getpoint "\nSpecify a point: "))

 

With

 

(while (setq pnt (getpoint "\nPOINT Specify a point: "))

 

Another thing this code is only to place Multiple points as you asked. .....

 

Not for "Multiple" command, so it's behaviour is different........

 

If you want to use "Multiple" command....try this...

 

(defun c:MLP (/ pnt)
    (command "multiple" "point" "")
  (princ)
)

 

I am not in system so I am little confused ...... the command line might be.....

 

(command "multiple" "point" "") ; or
(command "multiple" "point") ; or
(command "multiple" point "") ; or
(command "multiple" point) ; or

 

Please check it I can tell you after 2hr......


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes
Message 5 of 7

Kent1Cooper
Consultant
Consultant
Accepted solution

@Philip-John wrote:

....

if I do manual command (DRAW>POINT>MULTIPLE POINT) getting the command line like (see image acd002)

I am able to insert multiple points by paste (at once) the coordinates values


 

What do you mean by "paste (at once) the coordinate values"?  Are you bringing in point-coordinate list variables  somehow?  Text-type comma-delimited coordinate strings?  Something else?  More than one  Point's worth at one time?

 

Since the ribbon-based Multiple Points thing requires ESCape to end it, and doesn't end with Enter/space as @dbhunia's suggestion will, you could get equivalent operation with something as simple as this:

 

(defun C:PM () (while T (command "_.POINT" pause)))

 

It doesn't show  the word POINT before the "Specify a point:" prompt as in your second image, but is that necessary?  And when you hit ESC, it tells you it's cancelled in the form of an error message rather than just *Cancel*, but that could be adjusted with additional code, and it's operationally no different.  Since I'm not sure what you mean by "paste (at once) the coordinate values," I couldn't say whether that command definition allows you to do that.

Kent Cooper, AIA
Message 6 of 7

Anonymous
Not applicable

If you have a csv file then there is lots of import points lisp out there, have a look at Lee-Mac.com as a start.

0 Likes
Message 7 of 7

Philip-John
Advocate
Advocate

Thanks kent1Cooper

It worked..

Thanks again

0 Likes