close函数是否可以更改CAD文件名?
帮助里提示:object.Close( [, FileName]) ObjectDocument, Documents
The document to close. SaveChangesVariant; input-only; optional
(Not applicable when called from Documents collection.)
Specifies if the drawing is to be saved or not. TRUE: Save the drawing. FALSE: Do not save the drawing. FileName
String; input-only; optional
(Not applicable when called from Documents collection.)
The name to assign to the drawing. If no name is provided when saving a drawing for the first time, the drawing will be saved using the VBA project information: ThisDrawing.Path\ThisDrawing.Name.
FileName参数应该是CAD文档保存的名字,这样应该是可以为CAD文件改名吧?
这个如果想使用怎么操作?改了好多次都不成功。
另外,不知道在VBA里面实现CAD改名有没有什么更方便的做法?我现在是另存为,然后在调lisp删除之前的文件,有可能会不成功。
没太明白你的需求,改名当然用saveas了
也可以在drawing关闭后用Name As改名
ok,解决了,saveas + kill可以实现改名了。
页:
[1]