Radu Iordache Posted March 5, 2023 Posted March 5, 2023 I would greatly appreciate help on creating a lisp that would do the following: 1. call the bpoly command probably (command "-bpoly") 2. wait for me to make all necessary clicks and create needed polylines till I exit the command probably this should work (found on another thread) (while (= 1 (getvar "cmdactive")) (command pause)) 3. add polylines created on step 2 to a new selection set here I have no idea Note that I also have other polylines in the drawing but I need in the selection set only the ones that were created on step 2 above. Thanks in advance! Quote
Steven P Posted March 5, 2023 Posted March 5, 2023 it's Sunday night here, need a little patience - see your other thread for an idea (https://www.cadtutor.net/forum/topic/77052-help-needed-to-modify-lisp-for-inserting-area-text-inside-polylines/) Quote
Steven P Posted March 5, 2023 Posted March 5, 2023 see ssadd for adding polylines to a selection set Quote
Radu Iordache Posted March 5, 2023 Author Posted March 5, 2023 (edited) @Steven P Thanks for the reply, I made this new topic because I think it summarizes better what the need is. Basically, what I miss is creating the selection set with the new polylines, the rest of the lisp that writes the areas will remain the same. I will check the idea in the older thread and then I will delete it. Edited March 5, 2023 by Radu Iordache Quote
marko_ribar Posted March 5, 2023 Posted March 5, 2023 (setq el (entlast)) (setq ss (ssadd)) ... DO PICKING WITH BPOLY ... FINISHED... (exit while loop) (while (setq el (entnext el)) (ssadd el ss) ) (sssetfirst nil ss) ;;; your selection set with newly created polylines/regions highlighted... 1 Quote
Radu Iordache Posted March 6, 2023 Author Posted March 6, 2023 20 hours ago, marko_ribar said: (setq el (entlast)) (setq ss (ssadd)) ... DO PICKING WITH BPOLY ... FINISHED... (exit while loop) (while (setq el (entnext el)) (ssadd el ss) ) (sssetfirst nil ss) ;;; your selection set with newly created polylines/regions highlighted... Worked like magic! Thank you very much! Quote
dan20047 Posted March 6, 2023 Posted March 6, 2023 watch for when the (entlast) entity is a polyline or block with attributes then entnext selects the subentity. This utility avoids that problem ;;; posted by roy_043 ;;; http://www.theswamp.org/index.php?topic=35626.msg408522#msg408522 (defun kg:GetLast ( / ent newEnt) (setq ent (entlast)) (while (setq newEnt (entnext ent)) (setq ent newEnt) ) ent ) 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.