|
AnyCAD Rapid API 2026
Help you to create a better world!
|
管理各种需要被保存的内容,包括几何、材质、属性等;操作的支持Undo/Redo。 更多...
Public 成员函数 | |
| Document (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| 仅供内部使用 | |
| override 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) |
| uint | GetVersion () |
| void | SetVersion (uint val) |
| bool | GetUndoing () |
| void | SetUndoing (bool val) |
| int | GetRegenerating () |
| void | SetRegenerating (int val) |
| string | GetFileName () |
| void | SetFileName (string val) |
| bool | GetModified () |
| void | SetModified (bool val) |
| string | GetThumbnailFileName () |
| void | SetThumbnailFileName (string val) |
| StringList | GetTags () |
| void | SetTags (StringList val) |
| ObjectId | GetExternalDocumentId () |
| void | SetExternalDocumentId (ObjectId val) |
| bool | GetSelectionLocked () |
| void | SetSelectionLocked (bool val) |
| bool | GetPreviewEffectLocked () |
| void | SetPreviewEffectLocked (bool val) |
| ObjectId | Initialize (string viewName) |
| 初始化默认的文档对象 | |
| void | SetActiveDbViewId (ObjectId dbViewId) |
| 设置当前的DbView | |
| ObjectId | GetActiveDbViewId () |
| void | SetMainDbViewId (ObjectId dbViewId) |
| 设置主视图ID | |
| ObjectId | GetMainDbViewId () |
| void | SetActiveSketchId (ObjectId sketchId) |
| 设置当前的草图工作平面 | |
| ObjectId | GetActiveSketchId () |
| void | SetActiveSpaceId (ObjectId spaceId) |
| ObjectId | GetActiveSpaceId () |
| void | CloseActiveWorkspace () |
| ObjectId | GetActiveWorkspaceId () |
| void | SetActivePartId (ObjectId partId) |
| 设置当前的零件 | |
| ObjectId | GetActivePartId () |
| void | SetActiveAssemblyId (ObjectId assemblyId) |
| 设置当前的装配体 | |
| ObjectId | GetActiveAssemblyId () |
| void | SetActiveAnalysisId (ObjectId analysisId) |
| 设置当前的分析实例 | |
| ObjectId | GetActiveAnalysisId () |
| bool | IsSubDocument () |
| 是否为子文档,被ExternalDocument管理的 | |
| bool | RemoveElement (ObjectId id) |
| 移除对象 | |
| bool | RemoveElementById (ObjectId id) |
| bool | RemoveElement (PickedId id) |
| 移除对象 | |
| bool | RemoveElementByPickId (PickedId id) |
| bool | Contains (ObjectId id) |
| Id是否存在 | |
| void | NotifyElementChanged (ObjectId id, int flags) |
| 通知图元被修改了。由用户手动触发。 | |
| void | Select (PickedIdList ids, ObjectId viewId) |
| 选择对象 | |
| void | SelectByIds (ObjectIdList ids, ObjectId viewId) |
| void | ClearSelection (ObjectId viewId) |
| void | Highlight (PickedIdList ids) |
| 高亮对象 | |
| void | HighlightByIds (ObjectIdList ids) |
| ElementIterator | CreateElementIterator () |
| 创建遍历文档的迭代器 | |
| Element | FindElement (ObjectId id) |
| 根据ID查找图元 | |
| Element | FindElementById (ObjectId id) |
| Element | FindElement (PickedId id, bool leafFirst) |
| 查找图元 | |
| Element | FindElement (PickedId id) |
| 查找图元 | |
| Element | FindElementByPickId (PickedId id, bool leafFirst) |
| ElementTable | FindTable (string name) |
| 根据名称查找Table | |
| ElementTable | FindTableByName (string name) |
| ElementTable | FindTable (ClassId classId) |
| ElementTable | FindTableByClassId (ClassId classId) |
| Element | Create (string className) |
| 根据类名创建对象 | |
| void | EnableTransaction (bool enabled) |
| 控制是否启用事务 | |
| bool | IsTransactionEnabled () |
| 判断事务是否启用。 | |
| bool | IsPreviewing () |
| 判断是否在预览模式,即事务未完全提交,文档还处于不稳定状态。 | |
| bool | CanUndo () |
| 是否可以Undo | |
| bool | CanRedo () |
| 是否可以Redo | |
| void | Undo () |
| 执行Undo操作。 | |
| void | Redo () |
| 执行Redo操作 | |
| void | ClearUndoList () |
| 手动清空Undo/Redo的历史列表。 | |
| PickedIdList | GetSelection () |
| 获取选择集 | |
| ObjectIdSet | GetSelectionIds () |
| 获取选择集的ID集合 | |
| PickedIdList | GetHighlightion () |
| 获取高亮的对象 | |
| void | MarkAtom (ObjectId id, uint pid) |
| 标记对象更改 | |
| void | UnmarkAtom (ObjectId id, uint pid) |
| ObjectIdSet | GetReference (ObjectId id) |
| 获取被引用的Id集合 | |
| string | ResolveFilePath (string fileName) |
| 根据文档的目录来查找文件的完整路径。 | |
Public 成员函数 继承自 AnyCAD.Foundation.AObject | |
| AObject (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| 仅供内部使用 | |
| void | Dispose () |
| virtual bool | IsEqual (AObject other) |
| 对象是否相同,或同一个对象 | |
静态 Public 成员函数 | |
| static new ClassId | GetStaticClassId () |
| static Document | Cast (AObject obj) |
静态 Public 成员函数 继承自 AnyCAD.Foundation.AObject | |
| static ClassId | GetStaticClassId () |
| 获取类信息 | |
管理各种需要被保存的内容,包括几何、材质、属性等;操作的支持Undo/Redo。
Group: DataManage
| bool AnyCAD.Foundation.Document.CanRedo | ( | ) |
是否可以Redo
| bool AnyCAD.Foundation.Document.CanUndo | ( | ) |
是否可以Undo
| bool AnyCAD.Foundation.Document.Contains | ( | ObjectId | id | ) |
Id是否存在
| id | Id |
| Element AnyCAD.Foundation.Document.Create | ( | string | className | ) |
根据类名创建对象
| className | 类型 |
| ElementIterator AnyCAD.Foundation.Document.CreateElementIterator | ( | ) |
创建遍历文档的迭代器
| void AnyCAD.Foundation.Document.EnableTransaction | ( | bool | enabled | ) |
控制是否启用事务
| enabled | true则启用 |
查找图元
| id | ID |
| leafFirst | 叶子节点优先。默认 |
| ElementTable AnyCAD.Foundation.Document.FindTable | ( | string | name | ) |
根据名称查找Table
| name | 名称。 |
|
virtual |
| PickedIdList AnyCAD.Foundation.Document.GetHighlightion | ( | ) |
获取高亮的对象
| ObjectIdSet AnyCAD.Foundation.Document.GetReference | ( | ObjectId | id | ) |
获取被引用的Id集合
| id | 对象ID |
| PickedIdList AnyCAD.Foundation.Document.GetSelection | ( | ) |
获取选择集
| ObjectIdSet AnyCAD.Foundation.Document.GetSelectionIds | ( | ) |
获取选择集的ID集合
| void AnyCAD.Foundation.Document.Highlight | ( | PickedIdList | ids | ) |
高亮对象
| ids | 对象ID |
| ObjectId AnyCAD.Foundation.Document.Initialize | ( | string | viewName | ) |
初始化默认的文档对象
| bool AnyCAD.Foundation.Document.IsPreviewing | ( | ) |
判断是否在预览模式,即事务未完全提交,文档还处于不稳定状态。
| bool AnyCAD.Foundation.Document.IsSubDocument | ( | ) |
是否为子文档,被ExternalDocument管理的
| bool AnyCAD.Foundation.Document.IsTransactionEnabled | ( | ) |
判断事务是否启用。
| void AnyCAD.Foundation.Document.MarkAtom | ( | ObjectId | id, |
| uint | pid ) |
标记对象更改
| id | ID |
| pid | 属性ID |
| void AnyCAD.Foundation.Document.NotifyElementChanged | ( | ObjectId | id, |
| int | flags ) |
通知图元被修改了。由用户手动触发。
| id | ID |
| flags | 标识 |
| bool AnyCAD.Foundation.Document.RemoveElement | ( | ObjectId | id | ) |
移除对象
| id | ID |
| bool AnyCAD.Foundation.Document.RemoveElement | ( | PickedId | id | ) |
移除对象
| id | ID |
| string AnyCAD.Foundation.Document.ResolveFilePath | ( | string | fileName | ) |
根据文档的目录来查找文件的完整路径。
| fileName | 文件名称 |
| void AnyCAD.Foundation.Document.Select | ( | PickedIdList | ids, |
| ObjectId | viewId ) |
选择对象
| ids | 对象ID |
| viewId | 触发选择的视图ID。 |
| void AnyCAD.Foundation.Document.SetActiveAnalysisId | ( | ObjectId | analysisId | ) |
设置当前的分析实例
| analysisId | 分析实例的Id |
| void AnyCAD.Foundation.Document.SetActiveAssemblyId | ( | ObjectId | assemblyId | ) |
设置当前的装配体
| assemblyId | 装配体的ID |
| void AnyCAD.Foundation.Document.SetActiveDbViewId | ( | ObjectId | dbViewId | ) |
设置当前的DbView
| dbViewId | DbView的ID |
| void AnyCAD.Foundation.Document.SetActivePartId | ( | ObjectId | partId | ) |
设置当前的零件
| partId | 零件的ID |
| void AnyCAD.Foundation.Document.SetActiveSketchId | ( | ObjectId | sketchId | ) |
设置当前的草图工作平面
| sketchId | 草图平面的ID |
| void AnyCAD.Foundation.Document.SetMainDbViewId | ( | ObjectId | dbViewId | ) |
设置主视图ID
| dbViewId | DbView Id |