主要用到函数说明:
MxDrawXCustomFunction::Mx_SendStringToExecuteFun
把一个命令当着一个函数调用,不执行,详细说明如下:
参数 | 说明 | CString sCmaName | 命令名 | Param | 命令参数 |
例如: VB,在命令中,调用绘矩形命令函数,并得到绘制的矩形id.,该代码在命令事件中执行。
- Dim param As MxDrawResbuf
- Set param = New MxDrawResbuf
-
- param.AddString "Mx_Rectang"
- '是绘制矩形的线宽.这是命令参数。
- param.AddDouble 10
- MxDrawX1.CallEx "Mx_SendStringToExecuteFun", param
-
- '得到绘制的矩形id.
- Dim retparam As MxDrawResbuf
- Set retparam = MxDrawX1.Call("Mx_GetEntitysLastCmd", "")
-
-
- Dim i As Integer
- i = 1
- Do While i < retparam.Count
-
- MsgBox retparam.AtLong(i)
-
- i = i + 1
- Loop
复制代码
|