Support file & folder paths in REGEDIT?

Support file & folder paths in REGEDIT?

gccdaemon
Collaborator Collaborator
4,911 Views
6 Replies
Message 1 of 7

Support file & folder paths in REGEDIT?

gccdaemon
Collaborator
Collaborator

O.k., So I'm about to delve into a routine to set support paths, templates, template paths, etc. and was planning on using the following to set paths for DGN mapping, Tool Pallete Paths, etc.

 

(setenv "SaveFilePath" (strcat "C:\\CAD Standards\\"))

 

I'm not sure what all the names are in quotes in (setenv but I happen to be looking at a profile (<<Default>>) in the Registry, specifically the general section. (for civil3d 2015)

 

[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R20.0\ACAD-E000:409\Profiles\<<Default>>\General]

 

Is this the location where the path and template locations are found from the Files Tab in Options?

Are these keys the names used in quotes in (setenv ?

 

Here is a list of what I'm trying to change:

 

Enterprise CUI

Custom Icon Location

Printer Config Search Path

Printer Description File Search Path

Plot Style Table Search Path

Drawing Template File Location

Sheet Set Template File Location

Default Template File Name for QNEW

Default Template for Page setup overrides

Tool Palettes File Locations

DNG Mapping Setups Location

Andrew Ingram
Civil 3D x64 2019
Win 10 x64 Pro
Intel Xeon E5-1620
32 GB Ram
0 Likes
Accepted solutions (1)
4,912 Views
6 Replies
Replies (6)
Message 2 of 7

Luís Augusto
Advocate
Advocate

By Lee Mac

 

Original: http://www.lee-mac.com/addremovesupportpaths.html

 

;; Add Support File Search Paths  -  Lee Mac
;; Adds a list of Support File Search Paths, excluding duplicates and invalid paths.
;; lst - [lst] list of paths to add, e.g. '("C:\\Folder1" "C:\\Folder2" ... )
;; Returns: [str] "ACAD" Environment String following modification

(defun LM:sfsp+ ( lst / str )
    (setenv "ACAD"
        (strcat (setq str (vl-string-right-trim ";" (getenv "ACAD"))) ";"
            (apply 'strcat
                (mapcar (function (lambda ( x ) (strcat x ";")))
                    (vl-remove-if
                        (function
                            (lambda ( x )
                                (or (vl-string-search (strcase x) (strcase str))
                                    (not (findfile x))
                                )
                            )
                        )
                        (mapcar
                            (function
                                (lambda ( x )
                                    (vl-string-right-trim "\\" (vl-string-translate "/" "\\" x))
                                )
                            )
                            lst
                        )
                    )
                )
            )
        )
    )
)

 

Example Function Call

 

(LM:sfsp+n '("C:\\Folder1" "C:\\Folder2" "C:\\Folder3") 0)

 

0 Likes
Message 3 of 7

gccdaemon
Collaborator
Collaborator

Yes, I have seen that, but that is for support folders only and doesn't include things like plotter and plot style folder locations. I mean to say that I am redirecting several default paths that would originally be located in the users Support folder. My routine is going to push CAD Standards from the server to a folder stored on their local drive. Then it's going to set those folders as the default paths / templates.

Andrew Ingram
Civil 3D x64 2019
Win 10 x64 Pro
Intel Xeon E5-1620
32 GB Ram
0 Likes
Message 4 of 7

scot-65
Advisor
Advisor
Investigate the section of registry that is aligned to the current profile.
Getvar 'CPROFILE should get you there as there can be different profiles loaded.

I would personally create a new profile, set it as current, perform a reset, and go into the files tab and declare paths that will catch your attention when you are scanning the registry. "C:/HOTDAMN/MyMenu/PenTables/"

In a previous release I was not able to use SETENV to a key that contained spaces or dots. I do not know about now (2014). VL* had to be used.

I think you are on the right tract with your questions.

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 5 of 7

gccdaemon
Collaborator
Collaborator

Well, I'm pretty sure this is where it's stored in the profile now, but not all of the paths under the files tab are stored in that location. I exported the profile to a .REG file and all the paths are stored as HEX, so this may be their solution to the punctuation problem.

 

You mentioned VLA, is there a list of VLA-PUT-* commands out there for each of the paths from the Files tab in Options?

Andrew Ingram
Civil 3D x64 2019
Win 10 x64 Pro
Intel Xeon E5-1620
32 GB Ram
0 Likes
Message 6 of 7

scot-65
Advisor
Advisor

I do not have exactly what you request, but I can set you in the right direction.

 

This function was supposed to set the screen menu height automatically when the editor is first opened.

It did not work while starting up, but works when the editor is ready for interaction, that is for R2007.

I am in R2014 now and have not tried it, but now I realize I might need to "VLA"ized the code in order

for it to work during the startup sequence(?).

 

A background: The screen menu has always grown in height by two pixels every time the editor is closed.

After a while it will completely collapse. This has been this way ever since the floating windows through

at least R2009. I do not know if this holds true for R2014.

 

 


(defun ADJ_SCREEN_MENU_HEIGHT ( / a n ) (if (and (= (getenv "ScreenMenu") "1") (/= (getvar "SCREENBOXES") 45) (setq n (strlen (setq a (vl-registry-read (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Profiles\\" (getvar "CPROFILE") "\\Drawing Window") "ScreenMenu.Position"))))) (progn (while (/= (substr a n 1) (chr 32)) (setq n (1- n))) (setenv "ScreenMenu" "0") (vl-registry-write (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Profiles\\" (getvar "CPROFILE") "\\Drawing Window") "ScreenMenu.Position" (strcat (substr a 1 n) "688")) ;<--pixel height (setenv "ScreenMenu" "1") (if (= (getvar "LOCKUI") 0) (setvar "LOCKUI" 1)) ;<--optional setting (setq a nil n nil) );progn );if (princ) );endADJ_SCREEN_MENU_HEIGHT

 

 

Here is a link to one person's vla list:

https://www.bricsys.com/bricscad/help/en_US/V14/DevRef/source/Lisp_vla.html

 

 

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

Message 7 of 7

gccdaemon
Collaborator
Collaborator
Accepted solution

That link was pretty helpful. I'm not sure what version that's current on, but I was able to use the following to get most of what I needed.

http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/complete-list-of-vl-vla-and-vlax-func...

 

Now to compile it all...lol.

Andrew Ingram
Civil 3D x64 2019
Win 10 x64 Pro
Intel Xeon E5-1620
32 GB Ram
0 Likes