grouch19 Posted August 28, 2008 Share Posted August 28, 2008 Does anyone know if it is possible to insert multiple DWG's into one drawing? I have about 125 files i need to insert together. I used to write a script for it but it is getting a little tedious to have to type out and edit the entire script when there are so many files to insert Cheers Quote Link to comment Share on other sites More sharing options...
grouch19 Posted August 29, 2008 Author Share Posted August 29, 2008 i meant to say in the first line "can you insert multiple DWG's automatically. Without a script is the general thing im looking for! Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 29, 2008 Share Posted August 29, 2008 Serach the vba lisp forum there is probably an answer there to read entire directories, make a list then insert. Moderator maybe move ? Quote Link to comment Share on other sites More sharing options...
Dipali Posted August 29, 2008 Share Posted August 29, 2008 Try this, It may work. First x-ref all the drawings. in xref>attach dialoguebox, you can select multiple sheets holding 'ctrl'. after attching them as an xref, you can select all in xref manager & use bind/insert option. (make sure to have insbase approprate for all the files so that they come in proper location in your main file) Quote Link to comment Share on other sites More sharing options...
dbroada Posted August 29, 2008 Share Posted August 29, 2008 assuming that you want to insert the same 125 blocks into a set of drawings in the same place I would make a single file with all your blocks in place and then insert that file already exploded - still a script but a lot less tedious. Quote Link to comment Share on other sites More sharing options...
grouch19 Posted August 29, 2008 Author Share Posted August 29, 2008 ok then! Well its friday night now so i wil try these out on Monday morning! Thanks guys! Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 30, 2008 Share Posted August 30, 2008 would this work, or are you wanting all the blocks placed at the same insertion point? (defun c:insertblks (/ d doc lst pt pt1 dir) (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))) (if (and (setq dir (vl-filename-directory (getfiled "Select a DWG" (getvar 'dwgprefix) "dwg" ) ) (setq lst (vl-directory-files dir "*.dwg")) (setq pt1 (getpoint "\nSelect point for first block: ")) (setq d (distance (getpoint pt1 "\nSelect distance to space blocks: ") pt1 ) ) ) (foreach b lst (vla-insertblock (if (= (getvar 'cvport) 1) (vla-get-paperspace doc) (vla-get-modelspace doc) ) (vlax-3d-point (setq pt1 (polar pt1 0.0 d))) (strcat dir "\\" b) 1 1 1 0.0 ) ) ) (princ) ) 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.