RepCad Posted June 14, 2023 Posted June 14, 2023 (edited) Hello everyone, I'm using GetPoint in a loop to specify and I'm willing to disply a temporary point or mark on screen while user picking points on the polyline. (I mean do it without entmake or add point) Is it possible to implement it via AutoLisp ? I mean something like the attached image, suppose all the points are temporary and picking by users on the polyline. Edited June 14, 2023 by RepCad Quote
devitg Posted June 14, 2023 Posted June 14, 2023 (edited) @RepCad please upload dwg and lsp Maybe some GRread , Edited June 14, 2023 by devitg add note Quote
Tharwat Posted June 14, 2023 Posted June 14, 2023 Here is one way to use grdraw function to create temporary rubber band. (defun c:Test (/ ins lst tmp len) ;;----------------------------------------------------;; ;; Author : Tharwat Al Choufi ;; ;; website: https://autolispprograms.wordpress.com ;; ;;----------------------------------------------------;; (while (setq ins (getpoint "\nSpeicy point : ")) (setq len (* 0.5 (/ (getvar "VIEWSIZE") 10))) (foreach pt (setq lst (cons ins lst)) (setq tmp (* pi 0.25)) (grdraw (polar pt tmp len) (polar pt (setq tmp (+ pi tmp)) len) 1 0 ) (grdraw (polar pt (setq tmp (* (* pi 0.25) 3.0)) len) (polar pt (setq tmp (+ pi tmp)) len) 1 0 ) ) ) (redraw) (princ) ) 2 Quote
BIGAL Posted June 14, 2023 Posted June 14, 2023 You just need to add a "POINT" then (ssadd (entlast) ss) this makes a selection set of all the points, so at end just (command "erase" ss "") all gone. Hint (setvar 'pdmode 34) Quote
mhupp Posted June 15, 2023 Posted June 15, 2023 Don't know what your trying to do but if you want all points of a polyline you only need to pick the polyline itself. (setq poly (car (entsel "\nPick Polyline for point data"))) (setq cords (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget poly)))) Quote
BIGAL Posted June 15, 2023 Posted June 15, 2023 Part 2 of mhupp code (setvar 'pdmode 34) (foreach pt cords (command "point" pt) ) Quote
RepCad Posted June 15, 2023 Author Posted June 15, 2023 7 hours ago, Tharwat said: Here is one way to use grdraw function to create temporary rubber band. (defun c:Test (/ ins lst tmp len) ;;----------------------------------------------------;; ;; Author : Tharwat Al Choufi ;; ;; website: https://autolispprograms.wordpress.com ;; ;;----------------------------------------------------;; (while (setq ins (getpoint "\nSpeicy point : ")) (setq len (* 0.5 (/ (getvar "VIEWSIZE") 10))) (foreach pt (setq lst (cons ins lst)) (setq tmp (* pi 0.25)) (grdraw (polar pt tmp len) (polar pt (setq tmp (+ pi tmp)) len) 1 0 ) (grdraw (polar pt (setq tmp (* (* pi 0.25) 3.0)) len) (polar pt (setq tmp (+ pi tmp)) len) 1 0 ) ) ) (redraw) (princ) ) Nice idea, well done. Thank you so much @Tharwat Quote
Tharwat Posted June 15, 2023 Posted June 15, 2023 3 hours ago, RepCad said: Nice idea, well done. Thank you so much @Tharwat You're welcome anytime. 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.