Maxelkat Posted July 28, 2011 Share Posted July 28, 2011 I have generated a batch of several thousand drawings, and then realised that my 'Page 3' paper space is positioned over page 2 in the model! Is there a way that I can tell 'Page 3' to change position to co-ordinates of my choosing, using only script, so that I can write a batch program to change them all? My only other option is to correct the error in the master drawing and generate all the thousands of drawings again, which is why I'm keen to explore alternatives! Elliott Quote Link to comment Share on other sites More sharing options...
Organic Posted July 28, 2011 Share Posted July 28, 2011 Perhaps you can upload a file to show exactly what the problem is and how it should be. Quote Link to comment Share on other sites More sharing options...
Maxelkat Posted July 29, 2011 Author Share Posted July 29, 2011 Here you go Dink. It has three pages, but unfortunately the layouts 'Page 2' and 'Page 3' both display page 2. WD-SXAH-806D-2B-DT.dwg Quote Link to comment Share on other sites More sharing options...
christillis Posted July 29, 2011 Share Posted July 29, 2011 Hmm, you need something that will go into the MS of each Page 3 and -p X distance down. That's quite tricky I'd say...I hate to say (and I'd hate to be you), but you might do best to start doing them manually. I know it's a thousand, but I would reckon to be able to do one file correction every 15-30 seconds depending on computer speed. That's 4 per minute best case and 1000 done in...gulp....4 hours'ish. I've never been hot at scripts, but that would save this time, but as it's not straight forward, you might end up spending twice the 'manual time' in avoiding a computer overload (opening too many drawings at one time). Good luck and hope someone comes along and helps you better! Quote Link to comment Share on other sites More sharing options...
ReMark Posted July 29, 2011 Share Posted July 29, 2011 If the OP went the script method I think each drawing would be opened, edited, saved then closed in turn via the script. It would be extremely foolhardy to open 1,000 drawings and then start to edit each in turn. Quote Link to comment Share on other sites More sharing options...
christillis Posted July 29, 2011 Share Posted July 29, 2011 If the OP went the script method I think each drawing would be opened, edited, saved then closed in turn via the script. It would be extremely foolhardy to open 1,000 drawings and then start to edit each in turn. Hmm, fair point, I should have thought of that...but I'm no scriptor! Quote Link to comment Share on other sites More sharing options...
Maxelkat Posted July 29, 2011 Author Share Posted July 29, 2011 Thanks for trying. I'll remake the drawings from the master. It's not as bad as going into each drawing and changing them manually, but instead a long procedure of copying, bulk renaming, and performing various batch routines. There are 4,368 drawings altogether, but should take me only a couple of days to remake (with a lot of that as waiting time). Quote Link to comment Share on other sites More sharing options...
christillis Posted July 29, 2011 Share Posted July 29, 2011 Thanks for trying. I'll remake the drawings from the master. It's not as bad as going into each drawing and changing them manually, but instead a long procedure of copying, bulk renaming, and performing various batch routines. There are 4,368 drawings altogether, but should take me only a couple of days to remake (with a lot of that as waiting time). You're welcome. it's times like this that you could really do with around 4368 people to help you - one file each! Quote Link to comment Share on other sites More sharing options...
qball Posted July 29, 2011 Share Posted July 29, 2011 If there's 3 pages, how do you get 4000 drawings? Are there changes to the drawings? Did you create pdfs or hard copies? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 30, 2011 Share Posted July 30, 2011 This may help if you unlock view port you can pick a co-ord pt in window then zoom c then at a scale which will reset the viewports view at a new point at correct scale (command "_.mspace" "_.zoom" "_center" pt scale) use (setvar "ctab" layouttab3) first and put this in a script you will be suprised how fast a script works. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted July 30, 2011 Share Posted July 30, 2011 I'm posting from an iPhone, so without looking at your drawing... And going from memory... Pseudo code: (defun c:FOO ( / oldCtab) (and (setq oldCtab (getvar 'ctab)) (setvar 'ctab "<Page3>")) ;;<-- check for viewport lock (command "._mspace") (command "._pan" "_p" '(0 0 0) <dist>) (command "._pspace") (setvar 'ctab oldCtab) (princ)) No *error* checking provided. This code assumes a specific, consistent distance from view 2 to view 3. HTH Quote Link to comment Share on other sites More sharing options...
Maxelkat Posted August 1, 2011 Author Share Posted August 1, 2011 Thanks guys. I couldn't get the scripts to work, but I've already re-generated them from the master drawing anyway. Quote Link to comment Share on other sites More sharing options...
Maxelkat Posted August 1, 2011 Author Share Posted August 1, 2011 If there's 3 pages, how do you get 4000 drawings? Are there changes to the drawings? Did you create pdfs or hard copies? Each of the drawings have three pages. I start off with one drawing, and split into into 21 different drawings, by copying, renaming (with Bulk Rename Utility) and using scripts to go in and replace various blocks, change text and alter values of user variables (there are some diesel expressions in the drawing which use these). Then each of the 21 gets copied 8 times, and various things happen to them. Then the 168 (21 x 8 ) drawings get split into two sets. Finally the 336 drawings are split into 13 sets. So I end up with 4368 drawings, representing every possible combination of the variants. Unfortunately, any errors in the original 'master' drawing will appear in all the generated drawings! Quote Link to comment Share on other sites More sharing options...
BlackBox Posted August 1, 2011 Share Posted August 1, 2011 Unfortunately, any errors in the original 'master' drawing will appear in all the generated drawings! Sounds like the perfect reason to use XREFs in your 'master'... :wink: 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.