taner Posted April 22, 2009 Share Posted April 22, 2009 Dear Sirs. I would like to ask a queation, how to copy the subentity of a block without exploading the block? Thanks very much. Quote Link to comment Share on other sites More sharing options...
stevsmith Posted April 22, 2009 Share Posted April 22, 2009 Open the block editor and use a simple cut and paste into a new drawing perhaps? Quote Link to comment Share on other sites More sharing options...
jammie Posted April 22, 2009 Share Posted April 22, 2009 Hi taner If the express tools are installed try NCOPY From the menu Express > Block > Copy Nested Objects Quote Link to comment Share on other sites More sharing options...
taner Posted April 22, 2009 Author Share Posted April 22, 2009 thanks! I wonder if there is anthoer way ,how about using vla method? Quote Link to comment Share on other sites More sharing options...
ASMI Posted April 22, 2009 Share Posted April 22, 2009 vla-CopyObjects method. Here in post #7 example of copy objects from MInsert block to Model Space http://www.cadtutor.net/forum/showthread.php?t=20429 Quote Link to comment Share on other sites More sharing options...
wizman Posted April 22, 2009 Share Posted April 22, 2009 Please try: (defun c:test (/ basept ent ent_data) (vl-load-com) (setq ent_data (entget (car (setq ent (nentsel))))) (setq basept (cdr (assoc 10 (entget (car (last ent)))))) (vla-TransformBy (vlax-ename->vla-object (entmakex ent_data) ) ;_ vlax-ename->vla-object (vlax-tmatrix (list (list 1. 0. 0. (car basept)) (list 0. 1. 0. (cadr basept)) (list 0. 0. 1. (caddr basept)) (list 0. 0. 0. 1.) ) ;_ list ) ;_ vlax-tmatrix ) ;_ vla-TransformBy ) ;_ defun Quote Link to comment Share on other sites More sharing options...
taner Posted April 23, 2009 Author Share Posted April 23, 2009 (defun copy-fmblk (/ e el newent new-entlst) (while (and (setq e (nentselp "\n选择块内实体: ")) (= (length e) 4) ) (setq el (entget (car e))) (setq newent (entmakex el)) (vla-transformby (vlax-ename->vla-object newent) (vlax-tmatrix (caddr e) ) ) (setq new-entlst (cons newent new-entlst)) ) new-entlst ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 23, 2009 Share Posted April 23, 2009 That looks like a similar (if not nigh identical) method to Wizmans Quote Link to comment Share on other sites More sharing options...
wizman Posted April 23, 2009 Share Posted April 23, 2009 i tested taners version, allows multiple selection and ok also for nested blocks, but needs some extra coding for scaled(uniform/non-uniform) blocks. Quote Link to comment Share on other sites More sharing options...
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.