如何调用移动命令?
C#开发|冯美娟|2018-07-31 16:25
-
回答:
主要用到函数说明:
_DMxDrawX::SendStringToExecuteFun
把命令当着函数执行,可以传参数,详细说明如下:
参数 说明 IDispatch* pParam
命令参数,IMxDrawResbuf对象
pszExecute
命令名
c#代码实现如下:
MxDrawResbuf param = new MxDrawResbuf(); param.AddObjectId(axMxDrawX1.DrawBlockReference(point.x, point.y, "MyBlkName", 0.2, 0)); param.AddObjectId( axMxDrawX1.DrawBlockReference(point2.x, point2.y, "MyBlkName", 0.2, 0)); param.AddPoint(point); param.AddPoint(point2) axMxDrawX1.SendStringToExecuteFun("Move", param);