CAD use GetxDataDouble read data (web version)

The main use of Function:

 

MxDrawEntity::GetxDataDouble2

 

Reading a Double extension data as detailed below:

 

parameter Explanation

[in] LONG lItem

The value of the location

[out, retval] BSTR* pRet

Returns the value of the variable

szAppName

Extended data Name

 

js code to achieve the following:

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function  GetxDataDouble() {
     var  selEnt = mxOcx.NewComObject( "IMxDrawUiPrEntity" );
 
     selEnt.message =  "选择要读取扩展数据的对象" ;
     if  (selEnt.go() != 1)
         return ;
 
     var  ent = selEnt.Entity();
     if  (ent ==  null )
         return ;
 
     var  val = ent.GetxDataDouble2( "ExDataName" , 0);
     if  (mxOcx.IsOk()) {
         alert(val);
     }
     else  {
         alert( "没有扩展数!" );
     }
 
}

Guess you like

Origin www.cnblogs.com/yzy0224/p/11022026.html
Recommended