是的,但是你只需要做一次就可以了。这是我编写的设置例程,用于正确设置所有内容。欢迎您修改和使用。它具有设置模板路径所需的功能。
- (defun c:CES-Setup (/ #Files #Layout #Flag)
- (vl-load-com)
- (and
- (not
- (vl-catch-all-error-p
- (vl-catch-all-apply
- '(lambda ()
- (setq #Files (vla-get-files
- (vla-get-preferences (vlax-get-acad-object))
- ) ;_ vla-get-files
- #Layout (vla-get-activelayout
- (vla-get-activedocument (vlax-get-acad-object))
- ) ;_ vla-get-activelayout
- ) ;_ setq
- ;; *********************
- ;; ** AutoSave Path **
- ;; *********************
- (mapcar 'vl-mkdir (list "c:\\TEMP" "c:\\TEMP\\ACAD"))
- (vla-put-autosavepath #Files "c:\\TEMP\\ACAD")
- ;; ***************************
- ;; ** Printer Config Path **
- ;; ***************************
- (vla-put-PrinterConfigPath
- #Files
- "s:\\cadd standards\\Plotters"
- ) ;_ vla-put-PrinterConfigPath
- (vla-refreshplotdeviceinfo #Layout)
- ;; ***********************
- ;; ** Plotstyles Path **
- ;; ***********************
- (vla-put-printerstylesheetpath
- #Files
- "s:\\cadd standards\\Plotstyles"
- ) ;_ vla-put-printerstylesheetpath
- (vla-refreshplotdeviceinfo #Layout)
- ;; *********************
- ;; ** Template Path **
- ;; *********************
- (vla-put-TemplateDwgPath
- #Files
- "s:\\cadd standards\\Template"
- ) ;_ vla-put-TemplateDwgPath
- ;; *********************
- ;; ** QNew Template **
- ;; *********************
- (vla-put-QNewTemplateFile
- #Files
- "s:\\cadd standards\\Template\\CES_Template.dwt"
- ) ;_ vla-put-QNewTemplateFile
- ;; *********************
- ;; ** Support Paths **
- ;; *********************
- (vla-put-supportpath
- #Files
- (strcat ";s:\\cadd standards\\startup"
- ";s:\\cadd standards\\lisp"
- ";s:\\cadd standards\\linetypes"
- ";s:\\cadd standards\\fonts"
- ";s:\\cadd standards\\ces layers"
- ";"
- (vla-get-supportpath #Files)
- ) ;_ strcat
- ) ;_ vla-put-supportpath
- ;; ***************************
- ;; ** Tool Palettes Paths **
- ;; ***************************
- (vla-put-ToolPalettePath
- #Files
- (strcat "S:\\CADD Standards\\Toolpalette\\Palettes;"
- (vla-get-ToolPalettePath #Files)
- ) ;_ strcat
- ) ;_ vla-put-ToolPalettePath
- ) ;_ lambda
- ) ;_ vl-catch-all-apply
- ) ;_ vl-catch-all-error-p
- ) ;_ not
- (alert
- (strcat
- "AutoCAD has been setup for Capital Engineering & Surveying, Inc. Standards.\n\n"
- " Please restart AutoCAD."
- ) ;_ strcat
- ) ;_ alert
- ) ;_ and
- (princ)
- ) ;_ defun
- (alert "Type: "CES-SETUP" to run setup.")
- (princ)
|