Jump to content

How to user VBA to Add Viewport,Title Block,import page setup then zoom to fit


oldguy

Recommended Posts

My company just got a new software that could generate AutoCAD drawings. but they are all in Model space. So I am trying to automate the process of adding Layout, add viewport, import page setup then zoom to fit the drawing.

We are going to have 3000 or so drawings. This would greatly help us...

 

I think someone should have already done this, this is kind of common to people...

 

Thanks!

Link to comment
Share on other sites

Maybe consider installing a trial of AutoCAD 2010 and using Action Recorder. That sounds like the best way. Granted I am not too familiar with action recorder, but from what I have used of it, you can record the process once, and then "play" the recorded macro over and over.

Link to comment
Share on other sites

We haven't upgraded yet, even though we have it, but in 2009, there is a decent walkthrough in the Help file. I did a quick search to see if there was anything on CADtutor, but nothing popped out at me. I have messed with the command a bit, so I will help however I can.

Link to comment
Share on other sites

tried it, the action recorder is pretty much junk...

it will not read any inputs on the dialog. I guess I need to do all of them at the command or something, but it seems hard to import page setup from all command line. I guess I just go back using VBA then...

If I can run everything in command line, it is easy to use VBA to send all commands and accomplish that also, so the action recorder didn't do me any good...

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