AnyCAD Rapid API 2024
Help you to create a better world!
|
Public 成员函数 | |
ClassId | GetClassId () |
String | GetName () |
void | SetName (String val) |
ObjectId | GetId () |
void | SetId (ObjectId val) |
String | GetDocType () |
void | SetDocType (String val) |
EnumTextEncoding | GetTextEncoding () |
void | SetTextEncoding (EnumTextEncoding val) |
long | GetVersion () |
void | SetVersion (long val) |
boolean | GetUndoing () |
void | SetUndoing (boolean val) |
int | GetRegenerating () |
void | SetRegenerating (int val) |
String | GetFileName () |
void | SetFileName (String val) |
boolean | GetModified () |
void | SetModified (boolean val) |
String | GetThumbnailFileName () |
void | SetThumbnailFileName (String val) |
ObjectId | GetPartId () |
void | SetPartId (ObjectId val) |
ObjectId | Initialize (String viewName) |
void | SetActiveDbViewId (ObjectId dbViewId) |
ObjectId | GetActiveDbViewId () |
void | SetActiveSketchId (ObjectId sketchId) |
ObjectId | GetActiveSketchId () |
boolean | IsSubDocument () |
boolean | RemoveElement (ObjectId id) |
boolean | RemoveElementById (ObjectId id) |
boolean | RemoveElement (PickedId id) |
boolean | RemoveElementByPickId (PickedId id) |
void | NotifyElementChanged (ObjectId id, int flags) |
void | Select (PickedIdList ids, ObjectId viewId) |
void | SelectByIds (ObjectIdList ids, ObjectId viewId) |
void | Highlight (PickedIdList ids) |
void | HighlightByIds (ObjectIdList ids) |
ElementIterator | CreateElementIterator () |
Element | FindElement (ObjectId id) |
Element | FindElementById (ObjectId id) |
Element | FindElement (PickedId id, boolean leafFirst) |
Element | FindElement (PickedId id) |
Element | FindElementByPickId (PickedId id, boolean leafFirst) |
ElementTable | FindTable (String name) |
ElementTable | FindTableByName (String name) |
ElementTable | FindTable (ClassId classId) |
ElementTable | FindTableByClassId (ClassId classId) |
Element | Create (String className) |
void | EnableTransaction (boolean enabled) |
boolean | IsTransactionEnabled () |
boolean | IsPreviewing () |
boolean | CanUndo () |
boolean | CanRedo () |
void | Undo () |
void | Redo () |
void | ClearUndoList () |
PickedIdList | GetSelection () |
PickedIdList | GetHighlightion () |
void | MarkAtom (ObjectId id, long pid) |
ObjectIdSet | GetReference (ObjectId id) |
String | ResolveFilePath (String fileName) |
Public 成员函数 继承自 AObject | |
boolean | IsEqual (AObject other) |
静态 Public 成员函数 | |
static ClassId | GetStaticClassId () |
static Document | Cast (AObject obj) |
<>
管理各种需要被保存的内容,包括几何、材质、属性等;操作的支持Undo/Redo。
boolean Document.CanRedo | ( | ) |
是否可以Redo
boolean Document.CanUndo | ( | ) |
是否可以Undo
void Document.ClearUndoList | ( | ) |
手动清空Undo/Redo的历史列表。
Element Document.Create | ( | String | className | ) |
根据类名创建对象
className | 类型 |
ElementIterator Document.CreateElementIterator | ( | ) |
创建遍历文档的迭代器
void Document.EnableTransaction | ( | boolean | enabled | ) |
控制是否启用事务
enabled | true则启用 |
查找图元
id | ID |
leafFirst | 叶子节点优先。默认 |
ElementTable Document.FindTable | ( | String | name | ) |
根据名称查找Table
name | 名称。 |
PickedIdList Document.GetHighlightion | ( | ) |
获取高亮的对象
ObjectIdSet Document.GetReference | ( | ObjectId | id | ) |
获取被引用的Id集合
id | 对象ID |
PickedIdList Document.GetSelection | ( | ) |
获取选择集
void Document.Highlight | ( | PickedIdList | ids | ) |
高亮对象
ids | 对象ID |
ObjectId Document.Initialize | ( | String | viewName | ) |
初始化默认的文档对象
boolean Document.IsPreviewing | ( | ) |
判断是否在预览模式,即事务未完全提交,文档还处于不稳定状态。
boolean Document.IsSubDocument | ( | ) |
是否为子文档,被PartElement管理的
boolean Document.IsTransactionEnabled | ( | ) |
判断事务是否启用。
void Document.MarkAtom | ( | ObjectId | id, |
long | pid ) |
标记对象更改
id | ID |
pid | 属性ID |
void Document.NotifyElementChanged | ( | ObjectId | id, |
int | flags ) |
通知图元被修改了。由用户手动触发。
id | ID |
flags | 标识 |
void Document.Redo | ( | ) |
执行Redo操作
boolean Document.RemoveElement | ( | ObjectId | id | ) |
移除对象
id | ID |
boolean Document.RemoveElement | ( | PickedId | id | ) |
移除对象
id | ID |
String Document.ResolveFilePath | ( | String | fileName | ) |
根据文档的目录来查找文件的完整路径。
fileName | 文件名称 |
void Document.Select | ( | PickedIdList | ids, |
ObjectId | viewId ) |
选择对象
ids | 对象ID |
viewId | 触发选择的视图ID。 |
void Document.SetActiveDbViewId | ( | ObjectId | dbViewId | ) |
设置当前的DbView
dbViewId | DbView的ID |
void Document.SetActiveSketchId | ( | ObjectId | sketchId | ) |
设置当前的草图工作平面
sketchId | 草图平面的ID |
void Document.Undo | ( | ) |
执行Undo操作。