Jump to content

layout tabs in vba or lisp


Jack_O'neill

Recommended Posts

Hello! first of all, let me say thanks to all who post answers to questions in the forums. Your help is much appreciated.

 

What I am trying to do will take some explanation, so please bear with me. I've been backwards and forwards in the forums looking piece together a way to do this but just can't wrap my brain around it. I'm sure someone has done something similar to this before.

 

We draw in model space, and put our titleblocks in paper space. There will be anywhere from 5 to 25 of these pages (sometimes more, depending). Each page is drawn inside a rectangle that's on a non printing layer. This rectangle then has an attribute object in the lower left corner that serves as a page number (again on a non printing layer). We make a layout tab for each of these sheets that has the titleblock and an x-ref that has some proprietary information in it. Or rather, the template has one layout already set up and I copy it how ever many times I need for that drawing. I edit that attribute to the page number I want, and then fill out a similar attribute in the title block and name the layout tab for that sheet number (100, 101, 102, etc).

 

What I would like to do is have VBA or LISP look at how many of these sheets exist in model space, edit the attribute block for me sequentially starting with a number i choose, copy the existing layout tab that many times and name them with the same number, and edit the attribute block in the paperspace titleblock with the same page numbers. Finally, I'd like for it to do a zoom window from paper space based on the rectangle in model space I mentioned earlier on each page.

 

One of the guys in one of the other forums tried to help me with this, but he never did quite understand what I wanted. I didn't want to impose on his time further. I really appreciate what he did, and he did get close, but I am so rusty on LISP that I never could quite tweak in what he did. Feel free to contact me directly for more information.

 

Any help or guidance will be appreciated. Thanks in advance.

Link to comment
Share on other sites

I probably didn't explain it very well. See if the attachment helps. It's a zip file that contains 3 drawings. Drawing1 is an example of what I would start out with. Drawing 2 is what I'd like to end up with, and Xref.dwg is nothing more than the blue text in the titleblocks in Drawing2. The cyan colored objects in model space are of no importance, they are only there to imply that there would be drawing objects inside the rectangles that represent the pages.

 

Please feel free to contact me here or directly with any questions or comments.

 

I really appreciate your help. Maybe by looking at the drawings and reading the original post you can see where I'm trying to go.

TEST.zip

Link to comment
Share on other sites

Hey Jack, this might help

 

 

Thanks...I'll take a look through that this weekend. Lots of information in that thread. I appreciate it.

Link to comment
Share on other sites

BTW, where in Arkansas?

 

 

I'm in Springdale, way up in the NW corner. If that doesn't ring any bells, I'm about 10 miles north of Fayetteville. If you follow college sports, that's the home of the Razorbacks.

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