在CAD会话Lisp命令中切换配置文件?
我很想知道是否有命令或lisp允许我在编辑图纸时在实时cad会话中切换(我的自定义配置文件和公司的配置文件)?我知道我可以选择并选择选项卡,然后双击配置文件。只是看起来很乏味。
谢谢。
**** Hidden Message ***** ...还有这个...http://www.afralisp.net/visual-lisp/tutorials/profile-utilities.php (DEFUN C:CGP(/profile load # Choice)
(VL-load-com)
(DEFUN profile load(# profile name/# Profiles)
(setq
# Profiles
)(vla-get-Profiles(vla-get-preferences(vlax-get-acad-object)))
);_ setq
(或(eq # profile name(vla-get-active profile # Profiles))
(not(VL-catch-all-error-p
(VL-catch-all-apply
' vla-put-active profile
(list # Profiles # profile name)
);_ VL-catch-all-apply;_ VL-catch-all-error-p
);_ not
);_或
);_ defun
(init get 0 " profile 1 profile 2 dissolve))
(和(setq # Choice
(getk word
" \ n使用自定义选项加载
:"
);_ getk word
);_ setq
(cond
((eq # Choice " profile 1))
;;do stuff
(profile load " profile 1 ")
)
((eq # Choice " profile 2))
;;do stuff
(profile load " profile 2 ")
)
);_ cond
);_和
(printed
);_ defun
)
为我工作! 注意acad.lsp和acad.rx加载-我不确定它们在会话中切换配置文件时会重新加载。
您还需要为Acad20##Doc.lsp添加一个检查来定义AUTOLOAD函数,除了AcadDoc.lsp是适用的。 我发布了一个lisp,它也会进行一些配置文件切换。
链接:
希望它有帮助。
页:
[1]