ProjectApi

工程相关API

Deprecated:
  • - 即将废弃
See:

Members

static EManipulatorType :number

操作类型

Properties:
Name Type Description
EManipulatorMove number

平移

EManipulatorRotate number

旋转

EManipulatorScale number

缩放

EManipulatorNone number

static EProjKey :string

工程属性key

Properties:
Name Type Description
pa_position string

位置属性

pa_floormap string

cim工程的工程属性中映射BIM工程的楼层对应JSON

static ESelectType :number

工程选择模式

Properties:
Name Type Description
selfloor number

切层

selComp number

选择构件

Methods

static closeLinkedProject(funcRet)

关闭关联的工程

Parameters:
Name Type Description
funcRet closeLinkedProjectCallback

static getAllProjInfoList(funcRet) → {void}

获取所有已加载的工程信息列表

Parameters:
Name Type Description
funcRet getAllProjInfoListCallback
Returns:
void
Example
var jsonObj = {};
getAllProjInfoList(function(jsonObj){
...
});

static getBimProjectComponents(projId, funcRet) → {void}

获取工程所有bim构件信息

Parameters:
Name Type Description
projId string

bim工程id

funcRet getBimProjectComponentsCallback
Returns:
void

static getBimProjectComponetsByCimFloor(projId, floorId-, funcRet) → {void}

根据cim楼层id获取bim构件信息

Parameters:
Name Type Description
projId string

bim工程id

floorId- string

cim楼层id

funcRet getBimProjectComponetsByCimFloorCallback
Returns:
void

static getBimProjectList(projId, funcRet) → {void}

根据已打开构件子cim工程Id获取关联bim工程Id列表

Parameters:
Name Type Description
projId string

工程id

funcRet getBimProjectListCallback
Returns:
void

static getLinkedProjectForOpening(funcRet) → {void}

获取打开构件关联工程信息

Parameters:
Name Type Description
funcRet getLinkedProjectForOpeningCallback
Returns:
void
Example
var jsonObj = {};
getLinkedProjectForOpening(function(jsonObj){
...
});

static getProjectAttr(projId, attrKey, funcRet) → {void}

获取工程属性

Parameters:
Name Type Description
projId string

工程id

attrKey EProjKey

属性key

funcRet getProjectAttrCallback
Returns:
void

static getProjectCimFloors(projId, funcRet) → {void}

获取已打开子工程关联bim工程的楼层信息

Parameters:
Name Type Description
projId string

bim工程id

funcRet getProjectCimFloorsCallback
Returns:
void

static getProjectInfo(projId, funcRet) → {void}

根据工程id获取工程信息

Parameters:
Name Type Description
projId string

工程id

funcRet getProjectInfoCallback
Returns:
void
Example
var jsonObj = {};
getProjectInfo(function(jsonObj){
...
});

static getProjectPropTempDes(projId, funcRet) → {void}

获取工程描述

Parameters:
Name Type Description
projId string

工程id

funcRet getProjectPropTempDesCallBack
Returns:
void

static getSelType(funcRet) → {void}

获取当前切层/选择构件模式

Parameters:
Name Type Description
funcRet getSelTypeCallBack
Returns:
void

static isBimModelProject(projId, funcRet) → {void}

判断工程是否为Bim工程

Parameters:
Name Type Description
projId string

工程id

funcRet isBimModelProjectCallBack
Returns:
void

static isCimProject(projId, funcRet) → {void}

判断工程是否为Cim工程

Parameters:
Name Type Description
projId string

工程id

funcRet isCimProjectCallBack
Returns:
void

static openLinkedProjectByComp(compId, funcRet)

打开构件关联的工程

Parameters:
Name Type Description
compId string

构件id

funcRet openLinkedProjectByCompCallback

static resetProjectStatus() → {void}

恢复当前工程默认状态

Returns:
void

static saveProject(projId, funcRet) → {void}

保存工程

Parameters:
Name Type Description
projId string

工程Id

funcRet saveProjectCallback
Returns:
void

static setProjectAttr(projId, attrKey, attrVal) → {void}

设置工程属性

Parameters:
Name Type Description
projId string

工程id

attrKey EProjKey

属性key

attrVal string

属性value

Returns:
void

static setSelType(type) → {void}

设置切层/选择构件模式

Parameters:
Name Type Description
type ESelectType

选择模式

Returns:
void

static setValidManipulatorType(type) → {void}

设置操作模式

Parameters:
Name Type Description
type EManipulatorType

操作模式

Returns:
void
Example
setValidManipulatorType(EManipulatorType.EManipulatorMove);

Type Definitions

closeLinkedProjectCallback(returnValue)

closeLinkedProject回调函数

Parameters:
Name Type Description
returnValue Boolean

操作结果

getAllProjInfoListCallback(returnValue)

getAllProjInfoList回调函数

Parameters:
Name Type Description
returnValue Array.<JSON>

工程信息JSON数组
JSON格式
[{
projId:string,
projType:string,
projName:string,
pos:{x:double, y: double, z:double}
}];

getBimProjectComponentsCallback(returnValue)

getBimProjectComponents回调函数

Parameters:
Name Type Description
returnValue Array.<JSON>

所有bim构件信息
格式如下
[
{
guid:string, //构件Guid
cimProjGuid:string//cim工程id
bimGuid:string, //构件的bim句柄
mainCompGuid:string, //主构件bim句柄
projGuid: string, //构件所属工程Guid
zhuanye:string, //构件专业
floor:string, //构件所在的bim楼层
cimFloor:string, //cim对应楼层
dalei:string, //构件大类
xiaolei:string, //构件小类
name:string //构件名称
}
]

getBimProjectComponetsByCimFloorCallback(returnValue)

getBimProjectComponetsByCimFloor

Parameters:
Name Type Description
returnValue Array.<JSON>

bim构件信息
格式如下
[
{
guid:string, //构件Guid
cimProjGuid:string//cim工程id
bimGuid:string, //构件的bim句柄
mainCompGuid:string, //主构件bim句柄
projGuid: string, //构件所属工程Guid
zhuanye:string, //构件专业
floor:string, //构件所在的bim楼层
cimFloor:string, //cim对应楼层
dalei:string, //构件大类
xiaolei:string, //构件小类
name:string //构件名称
}
]

getBimProjectListCallback(returnValue)

getBimProjectList回调函数

Parameters:
Name Type Description
returnValue Array.<string>

关联BIM工程Id

getLinkedProjectForOpeningCallback(returnValue)

getLinkedProjectForOpening回调函数

Parameters:
Name Type Description
returnValue JSON

工程信息JSON对象列表
JSON格式
{
projId:string,
projType:string,
projName:string,
pos:{x:double, y: double, z:double}
};

getProjectAttrCallback(returnValue)

getProjectAttr回调函数

Parameters:
Name Type Description
returnValue string

工程属性值

getProjectCimFloorsCallback(returnValue)

getProjectCimFloors回调函数

Parameters:
Name Type Description
returnValue Array.<string>

楼层id(从下往上有序排列)

getProjectInfoCallback(returnValue)

GetProjectInfo

Parameters:
Name Type Description
returnValue JSON

工程信息
JSON格式
{
projId:string,
projType:string,
projName:string,
pos:{x:double, y: double, z:double}
};

getProjectPropTempDesCallBack(returnValue)

getProjectPropTempDes回调函数

Parameters:
Name Type Description
returnValue JSON

工程描述信息
格式如下
[
{
name:string, //名称
sysName:string, //该名称下包含的类型
child:[this] //自包含子节点
}
]

getSelTypeCallBack(returnValue)

getSelType回调函数

Parameters:
Name Type Description
returnValue ESelectType

当前切层/选择构件模式

isBimModelProjectCallBack(returnValue)

isBimModelProject回调函数

Parameters:
Name Type Description
returnValue Boolean

是否为Bim工程

isCimProjectCallBack(returnValue)

isSubCimProject回调函数

Parameters:
Name Type Description
returnValue Boolean

是否为Cim工程

openLinkedProjectByCompCallback()

openLinkedProjectByComp回调函数

Parameters:
Type Description
Boolean

操作结果

saveProjectCallback(returnValue)

saveProject回调函数

Parameters:
Name Type Description
returnValue Boolean

操作结果