File

src/client/app/frameworks/apis/services/bime.annotation.service.ts

Description

批注操作类,完成批注的添加,删除,更新,展示
命名空间 :window.BIMe.view.BIMeAnnotation

Constructor

constructor(sectionService: SectionService, commandService: CommandService, commonService: CommonService, commentService: CommentService, resourceService: ResourceService, bimeEvent: BIMeEvent, jsonLoad: JsonLoadService, runTime: RuntimeService, annotationShowService: AnnotationShowService, projectViewpointLoaderService: ProjectViewpointLoaderService, widgetUtilityService: WidgetUtilityService, imageMarkupService: ImageMarkupService)

Methods

Public addAnnotation
addAnnotation(modelId: string, annotationName: string, viewId: string, annotationCategory: string, annotationDescription: string, position: any)

添加批注 返回Promise对象 调用添加批注前,需调用window.BIMe.view.BIMeAnnotation.getAnnotationPosition()得到批注位置

Parameters :
  • modelId

    模型Id

  • annotationName

    批注名称

  • viewId

    视图Id 当前批注挂载到那个视图下

  • annotationCategory

    批注类别

  • annotationDescription

    批注描述

  • position

    批注位置 {x:number, y:number, z:number}

Example :
    function addAnnotation() {
window.BIMe.view.BIMeAnnotation.getAnnotationPosition().then(function(position){
var modelId = 'xx';
var annotationName = 'xxx';
var viewId = 'xxx';
var annotationCategory = 'xxxx';
var annotationDescription = 'xxxx';
window.BIMe.view.BIMeAnnotation.addAnnotation(modelId, annotationName,viewId, annotationCategory,annotationDescription, position).then(function(annotation){
console.log(annotation);
});
});
}
Returns: any

批注的全部信息

Public updateAnnotation
updateAnnotation(annotationName: string, annotationCategory: string, annotationDescription: string)

更新批注 返回Promise对象 调用修改批注前,需调用window.bime.view.bimeAnnotation.editAnnotation()修改批注

Parameters :
  • annotationName

    批注名称

  • annotationCategory

    批注类别

  • annotationDescription

    批注描述

Example :
   function updateAnnotation() {
window.BIMe.view.BIMeAnnotation.editAnnotation().then(function(){
var annotationName = 'xxxxxx';
var annotationCategory = 'xxxx';
var annotationDescription = 'xxxx';
window.BIMe.view.BIMeAnnotation.updateAnnotation(annotationName, annotationCategory, annotationDescription).then(function(annotation){
console.log(annotation);
});
});
}
Returns: any

批注的全部信息

Public deleteAnnotation
deleteAnnotation(annotationId: string)

删除批注

Parameters :
  • annotationId

    批注Id

Example :
   function deleteAnnotation(annotationId) {
window.BIMe.view.BIMeAnnotation.deleteAnnotation(annotationId).then(function(annotationId){
console.log(annotationId);
})
}
Returns: any

成功返回批注Id

Public showAnnotation
showAnnotation(annotationId: string)

展示批注

Parameters :
  • annotationId

    批注Id

Example :
   function showAnnotation(annotationId) {
window.BIMe.view.BIMeAnnotation.showAnnotation(annotationId);
}
Returns: void
Public getAnnotationPosition
getAnnotationPosition()

创建批注位置 在添加批注之前调用此函数

Example :
   function getAnnotationPosition() {
window.BIMe.view.BIMeAnnotation.getAnnotationPosition().then(function(position){
console.log(position);
});
}
Returns: any

批注位置

Public editAnnotation
editAnnotation(annotationId: any)

编辑批注内容 调用此函数后必须调用window.bime.view.bimeAnnotation.updateAnnotation()

Parameters :
  • annotationId

    批注Id

Example :
    function editAnnotation() {
window.BIMe.view.BIMeAnnotation.editAnnotation(annotationId).then(function(){
console.log();
});
}
Returns: any

Properties

commandService
commandService: CommandService

results matching ""

    No results matching ""