Vlisplisp功能模块目录(8)

2019-03-16 22:32

'ExportProfile

strName

strFilename

)

T

)

(princ \

)

)

(princ (strcat \ )

)

)

) )

;;25.6 [功能] 输出配置文件

;; NOTES: Export an existing profile to a new external .ARG file

;; 示例: (MJ:ProfileExportX \

(defun MJ:ProfileExportX (pName ARGfile)

(cond

((MJ:ProfileExists-p pName)

(vlax-invoke-method

(MJ:Profiles)

'ExportProfile

pName

ARGfile

(vlax-make-variant 1 :vlax-vbBoolean)

;; == TRUE

)

)

(T (princ \ ) )

;;25.7 [功能] 输入配置文件

;; ARGS: profile-name(string), arg-file(string)

;; 示例: (MJ:ProfileImport \

;; VBA equivalent: ;;

;; ThisDrawing.Application.preferences._ ;;

;; Profiles.ImportProfile _ ;;

;; strProfileToImport, strARGFileSource, True

(defun MJ:ProfileImport (pName ARGfile)

(cond

((findfile ARGfile)

(vlax-invoke-method

;; (vlax-get-property (MJ:AcadPrefs) \

'ImportProfile

pName

ARGfile

(vlax-make-variant 1 :vlax-vbBoolean)

;; == TRUE

)

) ;

(T (princ \

) )

;;25.8 [功能] 复制配置文件

;; 示例: (MJ:ProfileCopy pName newName)

(defun MJ:ProfileCopy (Name1 Name2)

(cond

((and

(MJ:ProfileExists-p Name1)

(not (MJ:ProfileExists-p Name2))

)

(vlax-invoke-method

(MJ:Profiles)

'CopyProfile

Name1

Name2

)

) ;

((not (MJ:ProfileExists-p Name1))

(princ \

) ;

((MJ:ProfileExists-p Name2)

(princ \

) ) )

;;25.9 [功能] 重命名配置文件

;; 示例: (MJ:ProfileRename oldName newName)

(defun MJ:ProfileRename (oldName newName)

(cond

((and

(MJ:ProfileExists-p oldName)

(not (MJ:ProfileExists-p newName))

)

(vlax-invoke-method

(MJ:Profiles)

'RenameProfile

oldName

newName

)

)

(T (princ))

;; add your error handling here? ) )

;;25.10 [功能] 删除配置文件

;; 示例: (MJ:ProfileDelete \

(defun MJ:ProfileDelete (pName)

(vlax-invoke-method

(vlax-get-property (MJ:AcadPrefs) \

'DeleteProfile

pName ) )

;;25.11 [功能] 配置文件是否存在

;; 示例: (if (MJ:ProfileExists-p \

(defun MJ:ProfileExists-p (pName)

(member (strcase pName) (mapcar 'strcase (MJ:ProfileList)))


Vlisplisp功能模块目录(8).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:烧饼罐市场前景预测及投资规划分析报告(目录)

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: