SCaldeira Posted August 21, 2011 Share Posted August 21, 2011 Dear friends. I want to know how could using autolisp divide a drawing into equal parts (eg, 9, dividing the drawing in 3x3), 9 DWGs automatically creating a specific folder, and keeping the original coordinates, ie is re-inserted on a new new dwg , to bond perfectly. Note: no need to trim the division of the drawings. What matters to me is not to lose information. Thanks for the help. Sorry my bad english. ;-) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 21, 2011 Share Posted August 21, 2011 I would approach it in the following way: Get Extents of drawing Prompt for Number of Divisions (must be square integer, otherwise prompt for length of one side) Calculate coordinates for each window Obtain SelectionSet using Window/Crossing selection. WBlock objects in the Selection Set. Here is an example using the same approach to create separate drawings for each layer in a drawing. PS. Labelling your thread as 'Urgent' will not result in a quicker answer, usually such threads are even avoided by most members. Quote Link to comment Share on other sites More sharing options...
SCaldeira Posted August 21, 2011 Author Share Posted August 21, 2011 I understand what you mean. But the urgency is real. In times had a lisp that made it, but my computer broke and I lost the file. If anyone can help me I would be very grateful. Greetings. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 21, 2011 Share Posted August 21, 2011 This will allow you to quickly WBlock a selection: (defun c:wb ( / _uniquefile doc fnm ) (vl-load-com) (defun _uniquefile ( seed extn / i file ) (setq i 0) (while (findfile (setq file (strcat seed (itoa (setq i (1+ i))) extn)))) file ) (setq doc (vla-get-activedocument (vlax-get-acad-object)) fnm (strcat (getvar 'DWGPREFIX) (vl-filename-base (getvar 'DWGNAME)) "_") ) (while (ssget) (vla-wblock doc (_uniquefile fnm ".dwg") (vla-get-activeselectionset doc)) ) (princ) ) But that's as far as I'm prepared to take it on voluntary time. Quote Link to comment Share on other sites More sharing options...
SCaldeira Posted August 21, 2011 Author Share Posted August 21, 2011 Please do not repent to help someone. You just saved my day. Thank you. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 21, 2011 Share Posted August 21, 2011 You're welcome, glad it helps 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.