AnyCAD Rapid API 2024
Help you to create a better world!
载入中...
搜索中...
未找到
Document类 参考
类 Document 继承关系图:
AObject

Public 成员函数

ClassId GetClassId ()
 
String GetName ()
 
void SetName (String val)
 
ObjectId GetActiveDbViewId ()
 
ObjectId GetId ()
 
void SetId (ObjectId val)
 
ObjectId GetLastestSketchId ()
 
void SetLastestSketchId (ObjectId val)
 
String GetDocType ()
 
void SetDocType (String val)
 
ObjectId GetPropertyId ()
 
void SetPropertyId (ObjectId val)
 
EnumTextEncoding GetTextEncoding ()
 
void SetTextEncoding (EnumTextEncoding val)
 
long GetVersion ()
 
void SetVersion (long val)
 
ObjectId GetFamilyId ()
 
void SetFamilyId (ObjectId 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)
 
void SetActiveSketchId (ObjectId sketchId)
 
ObjectId GetActiveSketchId ()
 
boolean IsSubDocument ()
 
boolean RemoveElement (ObjectId id)
 
boolean RemoveElement (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 FindElement (PickedId id, boolean leafFirst)
 
Element FindElement (PickedId id)
 
ElementTable FindTable (String name)
 
ElementTable FindTable (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。

成员函数说明

◆ CanRedo()

boolean Document.CanRedo ( )

是否可以Redo

返回
true则可以

◆ CanUndo()

boolean Document.CanUndo ( )

是否可以Undo

返回
true则可以

◆ ClearUndoList()

void Document.ClearUndoList ( )

手动清空Undo/Redo的历史列表。

◆ Create()

Element Document.Create ( String className)

根据类名创建对象

参数
className类型
返回
对象

◆ CreateElementIterator()

ElementIterator Document.CreateElementIterator ( )

创建遍历文档的迭代器

返回
迭代器

◆ EnableTransaction()

void Document.EnableTransaction ( boolean enabled)

控制是否启用事务

参数
enabledtrue则启用

◆ FindElement() [1/3]

Element Document.FindElement ( ObjectId id)

根据ID查找图元

参数
idID
返回
图元

◆ FindElement() [2/3]

Element Document.FindElement ( PickedId id)

查找图元

参数
idID

返回
对象

◆ FindElement() [3/3]

Element Document.FindElement ( PickedId id,
boolean leafFirst )

查找图元

参数
idID
leafFirst叶子节点优先。默认
返回
对象

◆ FindTable()

ElementTable Document.FindTable ( String name)

根据名称查找Table

参数
name名称。
返回
指针。

◆ GetClassId()

ClassId Document.GetClassId ( )

获取对象的类型信息

返回
类信息

重载 AObject .

◆ GetHighlightion()

PickedIdList Document.GetHighlightion ( )

获取高亮的对象

返回
高亮的对象ID

◆ GetReference()

ObjectIdSet Document.GetReference ( ObjectId id)

获取被引用的Id集合

参数
id对象ID
返回
引用id的集合。

◆ GetSelection()

PickedIdList Document.GetSelection ( )

获取选择集

返回
高亮的对象ID

◆ GetStaticClassId()

static ClassId Document.GetStaticClassId ( )
static

获取类信息

返回

重载 AObject .

◆ Highlight()

void Document.Highlight ( PickedIdList ids)

高亮对象

参数
ids对象ID

◆ Initialize()

ObjectId Document.Initialize ( String viewName)

初始化默认的文档对象

返回
返回视图对象ID

◆ IsPreviewing()

boolean Document.IsPreviewing ( )

判断是否在预览模式,即事务未完全提交,文档还处于不稳定状态。

返回
true则还在预览模式

◆ IsSubDocument()

boolean Document.IsSubDocument ( )

是否为子文档,被PartElement管理的

返回
true 为子文档。

◆ IsTransactionEnabled()

boolean Document.IsTransactionEnabled ( )

判断事务是否启用。

返回
true则被启用

◆ MarkAtom()

void Document.MarkAtom ( ObjectId id,
long pid )

标记对象更改

参数
idID
pid属性ID

◆ NotifyElementChanged()

void Document.NotifyElementChanged ( ObjectId id,
int flags )

通知图元被修改了。由用户手动触发。

参数
idID
flags标识

◆ Redo()

void Document.Redo ( )

执行Redo操作

◆ RemoveElement()

boolean Document.RemoveElement ( ObjectId id)

移除对象

参数
idID
返回
是否成功

◆ ResolveFilePath()

String Document.ResolveFilePath ( String fileName)

根据文档的目录来查找文件的完整路径。

参数
fileName文件名称
返回
空则未找到

◆ Select()

void Document.Select ( PickedIdList ids,
ObjectId viewId )

选择对象

参数
ids对象ID
viewId触发选择的视图ID。

◆ SetActiveDbViewId()

void Document.SetActiveDbViewId ( ObjectId dbViewId)

设置当前的DbView

参数
dbViewIdDbView的ID

◆ SetActiveSketchId()

void Document.SetActiveSketchId ( ObjectId sketchId)

设置当前的草图工作平面

参数
sketchId草图平面的ID

◆ Undo()

void Document.Undo ( )

执行Undo操作。