In addition

Discussion in 'AutoCAD' started by Bryan Thomson, Nov 5, 2004.

  1. Now that I can add directories to the support file search path thanks to the
    people on this board. Is there a way to change the pathing for other
    variables in the options box. Mainly the paths for the printers stuff.
    Printer Configuration search path, printer description file search path, and
    plot style table search path. Again thanks in advance.

    Bryan
     
    Bryan Thomson, Nov 5, 2004
    #1
  2. Bryan Thomson

    Jeff Mishler Guest

    Well, maybe this will help out a little more.......using VLA you can get/set
    these paths rather easily:

    (setq acad (vlax-get-acad-object)
    prefs (vla-get-preferences acad)
    F_prefs (vla-get-files prefs)
    )

    Then, using the (vlax-dump-object) function we can see which files are
    stored where as well as the values:

    ; IAcadPreferencesFiles: This object contains the options from the Files tab
    on the Options dialog
    ; Property values:
    ; AltFontFile = "simplex.shx"
    ; AltTabletMenuFile = ""
    ; Application (RO) = #<VLA-OBJECT IAcadApplication 00a8a730>
    ; AutoSavePath = "C:\\DOCUME~1\\Master\\LOCALS~1\\Temp\\"
    ; ConfigFile (RO) = "C:\\Program Files\\Land Desktop 3\\acad2002.cfg"
    ; CustomDictionary = "C:\\Program Files\\Common Files\\Autodesk
    Shared\\sample.cus"
    ; DefaultInternetURL = "http://www.autodesk.com/products/landdesk"
    ; DriversPath = "C:\\Program Files\\Land Desktop 3\\drv"
    ; FontFileMap = "C:\\Program Files\\Common Files\\Autodesk
    Shared\\acad.fmp"
    ; HelpFilePath = "C:\\Program Files\\Land Desktop 3\\help\\acad.chm"
    ; LicenseServer (RO) = ""
    ; LogFilePath = "c:\\land projects 3\\"
    ; MainDictionary = "enu"
    ; MenuFile = "C:\\Program Files\\Land Desktop 3\\Support\\acad"
    ; ObjectARXPath = ""
    ; PostScriptPrologFile = ""
    ; PrinterConfigPath = "C:\\Program Files\\Land Desktop 3\\plotters"
    ; PrinterDescPath = "C:\\Program Files\\Land Desktop 3\\drv"
    ; PrinterStyleSheetPath = "C:\\Program Files\\Land Desktop 3\\Plot Styles"
    ; PrintFile = "."
    ; PrintSpoolerPath = "C:\\DOCUME~1\\Master\\LOCALS~1\\Temp\\"
    ; PrintSpoolExecutable = ""
    ; SupportPath = "C:\\Program Files\\Common Files\\Autodesk
    Shared\\;C:\\Program Files\\Land Desktop 3\\Support;C:\\Program Files\\Land
    Desktop 3\\Fonts;C:\\Program Files\\Land Desktop 3\\Help;C:\\Program
    Files\\Common Files\\Autodesk Shared\\GIS\\ImportExport\\1.0;C:\\Program
    Files\\Land Desktop 3\\Express;C:\\Base Maps\\Jeffs Test Files;C:\\Base
    Maps\\Jeffs Test Files\\Test Lisp;C:\\Program Files\\SuperPurge;C:\\Program
    Files\\Land Desktop 3\\Support\\Internet Lisp"
    ; TempFilePath = "C:\\DOCUME~1\\Master\\LOCALS~1\\Temp\\"
    ; TemplateDwgPath = "C:\\Program Files\\Land Desktop 3\\template"
    ; TempXrefPath = "C:\\DOCUME~1\\Master\\LOCALS~1\\Temp\\"
    ; TextEditor = "Internal"
    ; TextureMapPath = "C:\\Program Files\\Land Desktop 3\\textures"
    ; WorkspacePath = "C:\\Program Files\\Land Desktop 3\\Data Links"


    Now you can use (vla-set-whicheverproperty F_pefs "this path")

    HTH,
     
    Jeff Mishler, Nov 5, 2004
    #2
  3. Ok the information I seeing here is right what Im looking for but I know
    absolutly nothing about VLA while this may be a simple task its a little
    over my head for right now. Would there be and easy way to explain this a
    little further so I may understand more. Sorry for my lack of knowlege in
    this but Im trying to learn this stuff. Thanks again for you help

    Bryan
     
    Bryan Thomson, Nov 5, 2004
    #3
  4. Bryan Thomson

    Jeff Mishler Guest

    OK, I'll try. Here's an example of how to obtain all of the Printer related
    paths, as well as the support path that you want to change in a previous
    post:
    Code:
    (defun get_file_prefs ( / acad prefs f_prefs printerconfigpath
    printerdescpath printerstylesheetpath
    printfile supportpath)
    ;;first make sure we can use vl- functions
    (vl-load-com)
    ;;now get the acad application
    (setq acad (vlax-get-acad-object))
    ;;now get the application preferences,
    ;;these are mostly stored in the registry
    (setq prefs (vla-get-preferences acad))
    ;;now get the Files preferences, these are the same as those
    ;;shown in the Files Tab under Options
    (setq f_prefs (vla-get-files prefs))
    ;;now get the existing individual preferences
    (setq PrinterConfigPath (vla-get-PrinterConfigPath f_prefs)
    PrinterDescPath (vla-get-PrinterDescPath f_prefs)
    PrinterStyleSheetPath (vla-get-PrinterStyleSheetPath f_prefs)
    PrintFile (vla-get-PrintFile f_prefs)
    SupportPath (vla-get-SupportPath f_prefs)
    )
    ;;now change one of them
    (setq SupportPath (strcat SupportPath ";C:\\Path2Add"))
    (vla-put-SupportPath f_prefs SupportPath)
    ;;change any others in the same way, using the vla-put-
    ;;such as (vla-put-PrintFile f_prefs "myPlotFileName.plt")
    
    ;;now release the objects, we're all done
    (mapcar 'vlax-release-object (list f_prefs prefs acad))
    ;;exit
    (princ)
    )
    
    If you copy/paste this into the VLIDE it should be a little easier to
    read.......
    If this still confuses you, well, just ask some questions......we'll get ya
    going eventually
     
    Jeff Mishler, Nov 6, 2004
    #4
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.