Help me , I need LISP to make points at end of rectangels

Help me , I need LISP to make points at end of rectangels

Anonymous
Not applicable
1,433 Views
5 Replies
Message 1 of 6

Help me , I need LISP to make points at end of rectangels

Anonymous
Not applicable

Hi all ,

 

One of my job responsibilities is to give the building coordinates to the surveyors , So am using Coorn.Lsp 

it's very easy and very useful . But every time i have to put the points manually at the corners of the footings ( Rectangles+Poly-lines )

if any one have a LISP to make it automatically i will be thankful for him 

 

Regards all

 

 

0 Likes
1,434 Views
5 Replies
Replies (5)
Message 2 of 6

ВeekeeCZ
Consultant
Consultant

Try this one...

 

;; Alan J. Thompson, 04.15.10
;; Mods by BeekeeCZ, 2017-01-04

(defun c:PolylinePoints (/ ss)
  (and (setq ss (ssget '((0 . "LWPOLYLINE"))))
       ((lambda (i / l lst)
          (while (setq e (ssname ss (setq i (1+ i))))
            (foreach x (entget e)
              (and (eq 10 (car x))
                   (not (member (setq l (list (cadr x) (caddr x) (cdr (assoc 38 (entget e))))) lst))
                   (setq lst (cons l lst))
                   (entmakex (list '(0 . "POINT")
                                   (cons 10 l)))))))
         -1))
  (princ)
)

Original found HERE

0 Likes
Message 3 of 6

braudpat
Mentor
Mentor

 

Hello from France

 

Welcome to the Autodesk / AutoCAD Forums !

 

An other Lisp/VLisp routine "NOD-PL" from Bred (cadxp.com) 

which runs on ANY Plines 2D/3D ...

 

To load the Lisp/VLisp routine:  APPLOAD <Enter>

 

To run the routine:  NOD-PL <Enter>

 

 

And if you need the "same" to mark insertion of Blocks, I have "NOD-INS" !?

 

 

Happy New Year and THE HEALTH, Regards, Patrice

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 4 of 6

Kent1Cooper
Consultant
Consultant

Here is another, which works on 3D and "heavy" 2D Polylines as well as LightWeight ones.

Kent Cooper, AIA
0 Likes
Message 5 of 6

Anonymous
Not applicable

Ha ha ha ha

it's working

appreciate your help

best regards

 

0 Likes
Message 6 of 6

ahsattarian3
Enthusiast
Enthusiast

(defun c:plv ()
(setq ss (ssget '((0 . "*polyline"))))
(setq reg (ssadd))
(setq n (sslength ss))
(setq k -1)
(repeat n
(setq k (1+ k))
(setq s (ssname ss k))
(setq cl 1)
(cond ((vlax-curve-isclosed s) (setq cl 0)))
(setq m (+ (fix (vlax-curve-getendparam s)) cl))
(setq i -1)
(repeat m
(setq i (1+ i))
(command "_.point" "_none" (trans (vlax-curve-getpointatparam s i) 0 1))
(ssadd (entlast) reg)
)
)
(setq nam (strcat (menucmd "M=$(edtime,$(getvar,date),YYYYMODDHHMMSS)") (itoa (abs (getvar "millisecs")))))
(command "block" nam (getvar "viewctr") reg "" "insert" nam (getvar "viewctr") 1.0 1.0 0.0)
(princ)
)

0 Likes