Opening Custom Template

Discussion in 'AutoCAD' started by Irfan, Jan 22, 2004.

  1. Irfan

    Irfan Guest

    hi,

    how can i open a custom template, or in other words when acad is started
    through VB, it should
    start myTemplate.dwt instead of acadiso.dwt.

    TIA
    irfan
     
    Irfan, Jan 22, 2004
    #1
  2. Irfan

    Ed Jobe Guest

    Public Sub NewDwg(TemplateName As String)
    'Creates a new drawing using name of template

    ' different process for SDI and MDI modes
    With AcadApplication
    If .Preferences.System.SingleDocumentMode = True Then
    ThisDrawing.New TemplateName
    Else
    'Use the application object.
    'ThisDrawing object will not be
    'available when all docs are closed.
    .Documents.Add TemplateName
    End If
    End With

    End Sub

    Public Sub NewEngr()
    'call different versions of this sub
    'from your menu
    NewDwg "_engineering.dwt"
    End Sub

    Public Sub NewArch()
    NewDwg "_architect.dwt"
    End Sub
     
    Ed Jobe, Jan 22, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.