让你知道它在哪里
在注册表中,点击此处:
HKEY\U CURRENT\U USER/Software/autodsek/Acad//Acad xxx xxx/Profiles
选择一个配置文件,然后转到对话框,然后转到AllAnavDialogs
这是位置列表信息的存储位置。
我发现的问题是,如果密钥集为空,则不会显示下一个添加的密钥集
此外,当我从对话框中删除路径时,它在注册表中没有被删除
下面的代码需要错误捕捉,并根据您的需要进行调整
这是在AutoCAD 2004的windows XP Pro上完成的
我不确定更新的操作系统注册表是如何布置的
我对您的注册表中的错误或问题不承担任何责任
使用此软件的风险自负!!!!!!!!!
-
- ;;;call pllst using 2 arguments aug1 is the path to the location you want
- ;;; aug2 is the diaplay name that wiil show in the dialog box
- ;example: (pllst "C:\Program Files" "Program Files")
- ;;;NOTE: THIS NEEDS ALOT OF ERROR TRAPPING AND IT WILL WRITE TO THE REGISTRY
- ;;; THERE ARE STILL THINGS THAT CAN GO WRONG AND ANYTIME YOU PLAY IN THE REGISRTY
- ;;; YOU SHOULD BE VERY CAREFULL
- ;;; USE THIS AT YOU OWN RISK!!!!!!!!!!!!!!!!!
- (defun pllst (aug1 aug2 / prlst regkey nxtnum key1 key2 key3 ret1 ret2 ret3)
- (setq prlst (getprolst));_call to get profile list
- (setq regkey
- (strcat "HKEY_CURRENT_USER\"
- (vlax-product-key)
- "[url="file://profiles//"]\\Profiles\\[/url]"
- (nth 0 prlst);_THIS NEES TO BE CHANGED TO SUIT YOUR NEEDS AS WRITTEN IT WILL ONLY GET THE 1ST PROFILE
- "[url="file://dialogs//AllAnavDialogs"]\\Dialogs\\AllAnavDialogs[/url]"
- )
- );_setq gets the path to the reg key
- ;;;_ this will get the next number to be added to the places list
- (setq nxtnum
- (1+
- (atoi
- (vl-string-left-trim "PlacesOrder"
- (nth 2
- (vl-registry-descendents
- regkey
- "*"
- );_reg des list all keys
- );_nth
- );_str trim
- );_atoi
- );_1+
- );_setq
- (setq key1 (strcat "PlacesOrder" (itoa nxtnum)));_first key name
- (setq key2 (strcat "PlacesOrder" (itoa nxtnum)"Display"));_second key nake
- (setq key3 (strcat "PlacesOrder" (itoa nxtnum)"Ext"));_third key name
- (setq ret1(vl-registry-write regkey key1 aug1));_write key with path
- (setq ret2(vl-registry-write regkey key2 aug2));_write key with display name
- (setq ret3(vl-registry-write regkey key3 ));_write exit key wit no value
- );_defun
- ;;; GET A LIST OF PROFILES
- (defun getprolst(/ prolst)
- (vla-getallprofilenames
- (vla-get-profiles
- (vla-get-preferences
- (vlax-get-acad-object)
- )
- )
- 'prolst
- )
- (vlax-safearray->list prolst)
- );_defun
|