zintonio Posted September 12, 2010 Author Share Posted September 12, 2010 Many thanks for reply. You are right. I was distracted. I try the following, seems to work but obviously i have to put all the dwgs into the same foder of the new dwg. (defun c:main ( / name path prefix i nr ) (setq prefix (getvar "dwgprefix")) ; In this point i want to put a shell window that let me to choose the file to insert in. (setq i 0) (repeat 2 (setq i (1+ i)) (setq nr (cond ((> i 99) 0) ((> i 9) 1) (t 2) ) ) (setq name "A") (repeat nr (setq name (strcat name "0")) ) (setq name (strcat name (itoa i))) (setq path (strcat prefix name)) (command "_-LAYER" "_M" name "") (command "-insert" path "0,0" "1" "1" "0") ; in this point I have to: 1. explode the block; 2. select the whole exploded; 3. put it into the layer "name" (princ (strcat " " name)) ) ) Thanks a lot Quote Link to comment Share on other sites More sharing options...
zintonio Posted September 12, 2010 Author Share Posted September 12, 2010 Many thanks for reply. You are right. I was distracted. I try the following, seems to work but obviously i have to put all the dwgs into the same foder of the new dwg. (defun c:main ( / name path prefix i nr ) (setq prefix (getvar "dwgprefix")) ; In this point i want to put a shell window that let me to choose the file to insert in. (setq i 0) (repeat 2 (setq i (1+ i)) (setq nr (cond ((> i 99) 0) ((> i 9) 1) (t 2) ) ) (setq name "A") (repeat nr (setq name (strcat name "0")) ) (setq name (strcat name (itoa i))) (setq path (strcat prefix name)) (command "_-LAYER" "_M" name "") (command "-insert" path "0,0" "1" "1" "0") ; in this point I have to: 1. explode the block; 2. select the whole exploded; 3. put it into the layer "name" (princ (strcat " " name)) ) ) Quote Link to comment Share on other sites More sharing options...
fuccaro Posted September 14, 2010 Share Posted September 14, 2010 If you are familiar with Lisp, try to explore the GETFILED command. 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.