AnyCAD Rapid API 2024
Help you to create a better world!
载入中...
搜索中...
未找到
Application类 参考

Public 成员函数

Viewer GetActiveViewer ()
 
void SetActiveViewer (Viewer val)
 
boolean Initialize (Path baseDirectory, boolean useSync)
 
void Destroy ()
 
Viewer CreateView (int hwndHost, long width, long height)
 
Viewer CreateWindow3D (String title, long width, long height, boolean visible)
 
Document CreateDocument (String name)
 
Document GetActiveDocument ()
 
void SetActiveDocument (Document doc)
 
boolean ExecuteCommand (String name, String params)
 
boolean ExecuteCommand (String name)
 
boolean ExecuteCommand (String name, ParameterDict params)
 
String QueryCommand (String name, ParameterDict params)
 
String QueryCommand (String name, String params)
 
String QueryCommand (String name)
 
void ShowDocument (Document doc)
 
boolean ShowDocument (Document doc, ObjectId viewId)
 
boolean Input (String parameters)
 
boolean Input (ParameterDict params)
 
boolean ExecuteEditorAction (String name, ParameterDict params)
 
void AddEventListener (AppEventListener pListener)
 
void RemoveEventListener (AppEventListener pListener)
 
Vector2 GetDpiScale ()
 

静态 Public 成员函数

static Application Instance ()
 
static boolean InternalRegisterSdk (String a, String b, String d, String e, String f)
 

详细描述

<> 应用程序管理
全局唯一

成员函数说明

◆ AddEventListener()

void Application.AddEventListener ( AppEventListener pListener)

增加应用级别的事件监听器

参数
pListener监听器

◆ CreateDocument()

Document Application.CreateDocument ( String name)

创建文档。

参数
name文档名称
返回
返回文档对象

◆ CreateView()

Viewer Application.CreateView ( int hwndHost,
long width,
long height )

基于已有的窗口控件上创建三维显示视图

参数
hwndHostthe host window handle.
widththe width
heightthe height
返回
the viewer.

◆ CreateWindow3D()

Viewer Application.CreateWindow3D ( String title,
long width,
long height,
boolean visible )

创建一个独立的三维窗口.

参数
titlethe title
widththe width
heightthe height
visibleif visible.
返回

◆ Destroy()

void Application.Destroy ( )

释放资源

◆ ExecuteCommand() [1/2]

boolean Application.ExecuteCommand ( String name)

执行命令

参数
name命令名称

返回
是否执行成功

◆ ExecuteCommand() [2/2]

boolean Application.ExecuteCommand ( String name,
String params )

执行命令

参数
name命令名称
params与ParameterDict兼容的JSON对象字符串
返回
是否执行成功

◆ ExecuteEditorAction()

boolean Application.ExecuteEditorAction ( String name,
ParameterDict params )

执行Editor的子命令

参数
name命令名称
params参数
返回
是否成功

◆ GetActiveDocument()

Document Application.GetActiveDocument ( )

获取活动的文档

返回
文档

◆ GetDpiScale()

Vector2 Application.GetDpiScale ( )

获取显示器DPI缩放系数。

返回
缩放系数

◆ Initialize()

boolean Application.Initialize ( Path baseDirectory,
boolean useSync )

初始化。内部调用

参数
baseDirectory程序所在的路径
useSync是否启用数据同步
返回
true成功

◆ Input()

boolean Application.Input ( String parameters)

给当前的Editor输入参数

参数
parameters参数
返回
是否成功

◆ QueryCommand()

String Application.QueryCommand ( String name,
ParameterDict params )

查询

参数
name命令
params参数
返回
查询结果

◆ RemoveEventListener()

void Application.RemoveEventListener ( AppEventListener pListener)

移除监听器

参数
pListener监听器

◆ SetActiveDocument()

void Application.SetActiveDocument ( Document doc)

设置当前活动的文档

参数
doc文档对象

◆ ShowDocument() [1/2]

void Application.ShowDocument ( Document doc)

在当前Viewer中显示文档,文档被设置为活动文档。

参数
doc文档

◆ ShowDocument() [2/2]

boolean Application.ShowDocument ( Document doc,
ObjectId viewId )

显示指定的View

参数
doc文档
viewIdDbView的ID