CAD use SetxDataLong write data (web version)

The main use of Function:

 

MxDrawEntity::SetxDataLong

 

Write a long extension data, as detailed below:

 

parameter Explanation

[in] BSTR val

String value

szAppName

Extended data Name

nite

The value of the location

 

js code to achieve the following:

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function  SetxDataLong(){
     var  selEnt = mxOcx.NewComObject( "IMxDrawUiPrEntity" );
     selEnt.message =  "选择要写扩展数据的对象" ;
     if  (selEnt.go() != 1)
         return ;
     var  ent = selEnt.Entity();
     if  (ent ==  null )
         return ;
     if  (ent.SetxDataLong( "ExDataName" , 0, 123456)) {
         alert( "写扩展数据成功" );
     }
     else  {
         alert( "写扩展数据失败" );
     }
}

Guess you like

Origin www.cnblogs.com/yzy0224/p/11022110.html