The main use of Function:
MxDrawEntity::GetxDataLong2
Long a reading 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
GetxDataLong() {
var
selEnt = mxOcx.NewComObject(
"IMxDrawUiPrEntity"
);
selEnt.message =
"选择要读取扩展数据的对象"
;
if
(selEnt.go() != 1)
return
;
var
ent = selEnt.Entity();
if
(ent ==
null
)
return
;
var
val = ent.GetxDataLong2(
"ExDataName"
, 0);
if
(mxOcx.IsOk()) {
alert(val);
}
else
{
alert(
"没有扩展数!"
);
}
}
|