MxDrawActivity.commandEvent
命令调用事件。
参数 | 说明 |
int iCommand | 命令ID,这个ID用户自已来取的,只要多个命令ID不重复就可以 |
代码实现如下:
public void commandEvent(int iCommand){标签:iCommand,调用,pt,sBlkName,getPoint,MxFunction,安卓版,isModifyed,CAD From: https://blog.51cto.com/u_10455293/5732392
if(iCommand == 103)
{
MxFunction.newFile();
Log.e("isModifyed",MxFunction.isModifyed() ? "Y" : "N");
MrxDbgUiPrPoint getPoint = new MrxDbgUiPrPoint();
getPoint.setMessage("点取图块插入点");
if(getPoint.go() != MrxDbgUiPrPoint.Status.kOk)
{
return;
}
McGePoint3d pt = getPoint.value();
String sFileName = MxFunction.getWorkDir() + "/tree.dwg";
String sBlkName = "tree";
MxLibDraw.insertBlock(sFileName,sBlkName);
MxLibDraw.drawBlockReference(pt.x,pt.y,sBlkName,0.3,0);
MxFunction.zoomAll();
Log.e("isModifyed",MxFunction.isModifyed() ? "Y" : "N");
}
}