×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

adding a layout tab per template with VBA

adding a layout tab per template with VBA

adding a layout tab per template with VBA

(OP)
I'm trying to add a layout tab to a drawing from a template.
I've already got it to create the drawing from a template
as shown below, but how do I add more layout tabs with the same template?

Here is what I have to create the drawing from the template

ThisDrawing.SetVariable "SDI", 1  'Single Document Interface or MDI
Dim templateFileName As String
templateFileName = "K:\CAD\CAD Features\Templates\TB-STANDARD.dwt"
ThisDrawing.New templateFileName
ThisDrawing.SetVariable "SDI", 0
Pt1(0) = 0: Pt1(1) = 0
ThisDrawing.ActiveLayout = ThisDrawing.Layouts("STANDARD TITLEBLOCK")

and I know that I can add a layout using

Set objLayout = ThisDrawing.Layouts.Add(LayoutName)

I just can't quite get the whole thing together to add the layout with the template.

Any help would be appreciated.   THANKS
 

RE: adding a layout tab per template with VBA

From the top toolbar choose "INSERT"<
From the pulldown, choose "LAYOUT"<
From the flyout, choose "NEW LAYOUT"<.

I pulled a torpedo level out of the bag and put it on the frame rail and the senior year intern engineering student exclaimed "Ooo...what is that?!".

RE: adding a layout tab per template with VBA

Also, from the command line, type "LAYOUT"<
At the command line, type "N"<
Then type the name for the new layout.

I pulled a torpedo level out of the bag and put it on the frame rail and the senior year intern engineering student exclaimed "Ooo...what is that?!".

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources