QNEW: variable ??

Discussion in 'AutoCAD' started by jclaidler, Jul 27, 2004.

  1. jclaidler

    jclaidler Guest

    What variable controls the QNEW template file ??
     
    jclaidler, Jul 27, 2004
    #1
  2. jclaidler

    jclaidler Guest

    found it... qnewtemplate
     
    jclaidler, Jul 27, 2004
    #2
  3. It can be set in Options > Files Tab> Template Settings > Default Template File Name for QNEW
     
    Allen Johnson, Jul 27, 2004
    #3
  4. ;;; Return the drawing template file used by QNEW
    ;;; (ax:GetQnewPath)
    (defun ax:GetQnewPath (/ prof key)
    (setq prof (vla-get-ActiveProfile (vla-get-profiles (vla-get-preferences
    (vlax-get-Acad-Object)))))
    (setq key (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Profiles\\"
    prof "\\General"))
    (vl-registry-read key "QnewTemplate")
    )

    ;;; Set the drawing template file used by QNEW
    ;;; ax:SetQnewPath("M:\\CAD\\ACADISO.DWT")
    (defun ax:SetQnewPath (QnewPath / prof key)
    (setq prof (vla-get-ActiveProfile (vla-get-profiles (vla-get-preferences
    (vlax-get-Acad-Object)))))
    (setq key (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Profiles\\"
    prof "\\General"))
    (vl-registry-write key "QnewTemplate" QnewPath)
    )

    ;; Gets current template
    (getenv "QnewTemplate")
    "c:\\my files\\templates\\qnew.dwt"

    and

    ;; Sets a different template
    (setenv "QnewTemplate" "c:\\my files\\templates\\qnew.dwt")


    --
    Best Regards, Jimmy Bergmark
    CAD and Database Developer Manager at www.pharmadule-emtunga.com
    Take a look at
    JTB FlexReport (FLEXlm report tool) - www.jtbworld.com/jtbflexreport
    SmartPurger (Purges automatically) - www.jtbworld.com/?/smartpurger.htm
    or download some freeware at www.jtbworld.com
    More on AutoCAD 2005;
    www.jtbworld.com/autocad2005.htm
     
    Jimmy Bergmark, Jul 27, 2004
    #4
  5. jclaidler

    jclaidler Guest

    thanks... I already figured out this option:

    (setenv "QnewTemplate" "c:\\my files\\templates\\qnew.dwt")
     
    jclaidler, Jul 27, 2004
    #5
  6. jclaidler

    kevindlbell Guest

    Hi,

    I tried the SetQnewPath lisp program below - it run OK but doesn't change the QNEW template location (i.e. doesn't work).

    I am using 2005 Architectural Desktop - has the location of the variable which hold the QNEW template file location changes.

    (I think so - a quick look through the registry seems to show that the location doesn't match the LISP)

    Any one have an updates QNEW path lisp that you can post?
     
    kevindlbell, Oct 21, 2004
    #6
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.