I have got my move routine to work great. I didn't have to use scrips at all. All of your comments really helped me to see the solution. Here's the code if you're curious.
- (setq SelMain(ssget))(setq SelBlock(ssadd))(setq SelNoblock(ssadd))(setq ctr 0)(while (< ctr (sslength SelMain)) (setq Ent(ssname SelMain ctr)) (setq EntData(entget Ent)) (if (assoc 66 EntData) (setq SelBlock(ssadd Ent SelBlock)) (setq SelNoblock(ssadd Ent SelNoblock)) ) (setq ctr(+ ctr 1)))(if (/= (sslength SelNoBlock) 0) (progn (setq TrackerPointData (entmake '((0 . "POINT")(8 . "TRACKER")(10 0.0 0.0 0.0)))) (setq TrackerPoint (entlast)) (setq pnt1 (cdr(assoc 10 TrackerPointData))) (setq SelNoblock(ssadd TrackerPoint SelNoblock)) (sssetfirst nil SelNoblock) (c:kti_archt_move) (setq TrackerPointData (entget TrackerPoint)) (setq pnt2 (cdr(assoc 10 TrackerPointData))) (entdel TrackerPoint) (command "_.purge" "LA" "TRACKER" "N") (if (/= (sslength SelBlock) 0) (command "._move" SelBlock "" pnt1 pnt2) ) ) (progn (sssetfirst nil SelBlock) (command "._move" "p" "") ))
I basically create a temporary point to extract location info to move the block objects.
Now I will tweak the code for my copy routine. Thanks guys! |