Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use VBA in AutoCAD to add layout template

Status
Not open for further replies.

jrice174

Civil/Environmental
Nov 8, 2004
129
I can easily add a layout to an AutoCAD drawing with

ThisDrawing.Layouts.Add "Sheet1"

But what I really need to do is add a Layout From Template. Does anybody have any idea how to do that?
 
Replies continue below

Recommended for you

I'm not clear if this is what you want

Sub Example_New()
' This example creates a new drawing based on the template ansi-a.dwt.
' Note: The path to the template file is included with its name. Adjust
' this path for your installation location before running this example.

Dim templateFileName As String
templateFileName = "c:\AutoCAD\template\ansi-a.dwt"

ThisDrawing.New templateFileName

End Sub
 
You're great! It worked wonderfully. I also had to set the SDI variable to 1 and it worked great. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor