Jump to content

Paper Space in command line?


Maxelkat

Recommended Posts

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

If there's 3 pages, how do you get 4000 drawings? Are there changes to the drawings? Did you create pdfs or hard copies?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...