wimal Posted March 31, 2012 Posted March 31, 2012 (setq tileset(ssadd));;create a selection set (command "divide"ent2 "B" "TILE" "Y" 300 ); block name is TILE (setq ent3 (entlast));entity tiles (setq tileset(ssadd ent3 tileset));adding entity to selection set (command "mirror" tileset""p1 p2"Y");mirrered I try to divide a line by a block named "TILE" and I need to that all blocks add to a selection set and mirror around points p1,p2. How can I add all blocks on that line to a selection set. Quote
pBe Posted March 31, 2012 Posted March 31, 2012 Sample code (defun c:sample (/ ent2 ent3 en p1 p2) (setq ent2 (car (entsel)) p1 (getpoint "\nPick first point:") p2 (getpoint p1 "\nPick next point:")) (setq tileset (ssadd)) [color=blue] (setq ent3 (entlast))[/color];<--- before divide (command "divide" ent2 "B" "TILE" "Y" 300 ) [color=blue] (if (setq en (entnext ent3)) (while en (ssadd en tileset) (setq en (entnext en) ) ) ) [/color] (command "mirror" tileset "" p1 p2 "Y") (princ) ) 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.