PDA

View Full Version : Using AutoCAD 2007 VBA to load & use Page Setups.


muckmail
24-01-2007, 04:57 PM
Can VBA be use to load page setups form a template drawing on
a fixed drive (Example drive c) then take one of the loaded page setups and make it the default current setup for a drawing. If this could be done
maybe it would be possable to set a batch routine that would
make a page setup for a group of drawings current. If I know how to
do the load and set a page setup to current in 2007 VBA, I think I
might be able to do in batch.
thank you,

Eddie
04-02-2007, 09:34 PM
Page setups can be imported via VBA..I hvae this facility in a custome batch plotter I wrote in VBA.

muckmail
05-02-2007, 01:12 AM
How does code get the page setups form another drawing. Is there
code to do that.
thank you,

Eddie
07-02-2007, 02:57 AM
I use sendcommand to achieve this.

ThisDrawing.SendCommand "-psetupin" & vbCr
ThisDrawing.SendCommand "PAth to your drawing" & vbCr
ThisDrawing.SendCommand "*" & vbCr
:D

muckmail
14-02-2007, 05:55 PM
what if I have more than one page setup in a single drawing file. Is there a way to get a piticular setup name in a drawing?
thank you,

muckmail
14-02-2007, 08:01 PM
ThisDrawing.SendCommand "-psetupin" & vbCr forces the page setup dialog
box. I am looking for code that could be placed in a batch rountine. Is there
a way to get the particular page setup form a drawing on a users hard drive by just using vb code only. Code that does not use prompts but allows the
programmer code to pick name the drawing and pagesetup name in the drawing.

thank you,