Name from template-file in MECHANICAL(!) 2005 with vba?

Discussion in 'AutoCAD' started by Hartmut Callies, Nov 12, 2004.

  1. Hello,
    lot of preferences in AutoCAD (dialog-box "options") I can read/write
    with VBA (for example: Application.Preferences.System.SingleDocumentMode =
    False).

    I have Mechanical 2005. There is in the dialog-box "options" also the "AM:
    Norm" preferences tab
    with a textbox to setting the template-file.
    How can I read the name from this template-file in the text-box with vba?

    Thanks.

    Hartmut Callies
     
    Hartmut Callies, Nov 12, 2004
    #1
  2. Hartmut Callies

    Kevin Terry Guest

    Dim mcApp As McadApplication
    Set mcApp =
    ThisDrawing.Application.GetInterfaceObject("Mcad.Application")
    mcApp.ActiveDocument.SetVariable "variablenamehere"

    do a search under the mechanical help for 'system variables' to find exactly
    what variable name you need to change (note this code is for mechanical
    desktop so you might need to change syntax slightly for acadm)

    Kevin
     
    Kevin Terry, Nov 12, 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.