maahee Posted May 24 Posted May 24 (edited) (defun c:WD () (setq pt1 (getpoint "\nEnter start point: ")) (setq pt2 (getpoint pt1 "\nSelect second point: ")) (setq mahee (ssadd)) ; create blank / empty selection set (command "x" "rectangle" pt1 pt2) (ssadd (entlast) mahee) (command "_.offset" 0.05 mahee pt1 "") (setq ent (entlast)) (setq vertices '()) (while (not (null ent)) (setq vertex (cdr (assoc 10 (entget ent))) (if (not (null vertex)) (setq vertices (cons vertex vertices)) ) (setq ent (entnext ent)) ) (prin1 vertices) ) Save all point in list function of line, circle, polyline and rectangle other objects Edited May 24 by maahee Quote
BIGAL Posted May 24 Posted May 24 1st (command "rectangle" pt1 pt2) 2nd you need to look at objects as get vertices for plines, endpoints for lines, center point circle, start & end & center point for arc. (cond ((= arc ((= circle ((= Line ((= lwpolyline ) 3rd for pline (setq plent (entsel "\nPick rectang")) (if plent (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent)))))) (princ co-ord) What do you want to do with the points ask now rather than later. 1 Quote
BIGAL Posted May 25 Posted May 25 (edited) Are you using OSNAP ? It finds what you want, a shorthand type 0SMODE 47 it may be close to what you want. Else have no idea what you want. Edited May 25 by BIGAL Quote
maahee Posted May 28 Author Posted May 28 (edited) Thanks sir, Yes I use osnap on and off at starting and ending forgot to write in autolisp and I am try to without changing dimstyle, layer colour, text styles ect. of current autocad environment. Connect specific point with line and draw circles and this point use to create object like windows and door. Also using in inside the other autolisp Edited May 28 by maahee Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.