Jump to content

Button macro to setup paperspace


Grigs

Recommended Posts

Our template for AutoCAD has several page setups for various different sizes. I was looking into making button macros that would automate this. So basically there would be a button, say for 24"x36", that when pressed would automatically use the predefined pagesetup for 24"x36". Can anyone help me out? I'm not looking to do any error checking or importing of page layouts.

Link to comment
Share on other sites

you can create a Custom Command and add it to a menu or toolbar. for my setup it looks like this:

 

^C^CDel_Pagesetups;^C^C.-PSETUPIN "//Some_Network_Location/Settings A1.dwg" "*"

 

in the example above are some important parts to understand.

 

^C^CDel_Pagesetups; ~ this part initiates the command to delete current page setups (leave this out if you have no need of it)

 

^C^.-PSETUPIN "//Some_Network_Location/Settings A1.dwg ~ this part loads Pagesetups from a drawing file you have created as a template. in this template drawing you must have created the pagesetups

 

"*" ~ this part tells it to load all of the pagesetups from the drawing "Settings A1.dwg"

 

to make the custom command use the "create a new command" button seen below:

 

Custom%20Command.png

 

once the custom command is created you can then drag the new command from the command list (the list found below the new custom command button) drag it from there up into the toolbar or menu you wish to add it to. Hit the apply button at the bottom of the Customize user Interface Dialog Box to apply this change to your model.

 

Hope this helps

Cheers,

Andy.

Link to comment
Share on other sites

Thanks for the reply Andy. The issue is I already have the page setups in the drawings. What I need is a button that will force a page setup when a tool button is pushed.

Link to comment
Share on other sites

And for some reason I can't get the path to the template correct. I have tried "T://path/drawing.dwg", "//path/drawing.dwg", "T:\\path\drawing.dwg" but none work

Link to comment
Share on other sites

If you use a mapped Drive such as T: then you will need to use the following format:

 

^C^CDel_Pagesetups;^C^C.-PSETUPIN "T:/network location/plot settings A1.dwg" "*"

 

if you use UNC path names then you need to use:

^C^CDel_Pagesetups;^C^C.-PSETUPIN "//server name/path/more path/still more/Plot Settings A1.dwg" "*"

 

UNC path names take away the requirement for mapping the "t:" drive correctly (from your example)

 

does that work for you now?

Andy.

Link to comment
Share on other sites

The T: drive is our network drive. I modified the script and it works great. Now I just need to figure out how to force one of those page setups to paper space.

Link to comment
Share on other sites

That is an option. I chose to go with one template with multiple page setups mostly for ease and less cluttered. Most of the people I work with can't even bother to go into the page setup and choose a setup. So having multiple templates might confuse them even more. I have created a custom ribbon for all the stuff we use at our work. I figured placing some buttons that automated the page setup (just click the '22' button to setup a 22"x34" sheet) would hopefully make it easier.

Link to comment
Share on other sites

So five templates will confuse people? Or having five Page Setups in one file will confuse people? I dunno, just seems like you could do what you're doing by having it fine tuned. This is how I've always done it.

 

It can be confusing to have some "magic" custom button that is not a standard option in AutoCAD, too. And new hires... how will they know about that magic button unless someone shows them?

 

Fine tune the templates and you're good to go in my book. :)

Link to comment
Share on other sites

5 templates would confuse them. And sometimes we get into a project and have to change paper size. Then people would have to figure out that. To me it's just easier to have them all defined on one template. Also, it's easier to do a publish and import the page setups when they are all in one spot. And as for new hires, we have all this explained in our CAD manual.

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