
Get the data you need to crate the layout in your drawing. Store the characteristics of the layout in a text file and read that to You would close the template without saving.Īll in all this is a messy process and you may find it simpler to create Then you would read the dataĬontained in the layout and recreate it in the current drawing. Would open it, read the information about the layout and then create an So look at the process as if the Template file were a drawing file.

The extension is the only difference between them. What is the command to insert the third layout from the template into my drawing as a new layout?Ī template file is a drawing file with an extension of DWT instead ofĭWG. So, for example, Template2.dwt has 3 layouts (T1, T2, T3). TemplateFileName = template_path & templateName

ThisDrawing.SetVariable "SDI", 1 'Single Document Interface or MDIĭim template_path As String 'path for templatesĭim templateName As String 'name of the templateĭim templateFileName As String 'full path and template name

So what I need to do is input a specific layout tab from the template as the new layout template in my drawing. I have templates that have multiple layouts in them. I have seen some code, but they are using the template name and that's about it (from what I can tell). What I need to do is create a function that will createa new layout tab from a template file on the network. I'm fairly new to VBA and learning from code I read from books and online.
