CAD绘制二维码(网页版)

js中实现代码说明:


//新建一个COM组件对象 参数为COM组件类名
var getPt = mxOcx.NewComObject("IMxDrawUiPrPoint");
getPt.message = "点取插入点";
if (getPt.go() != 1) {
    return;
}
var pos = getPt.value();
if (pos == null)
    return;
//新建一个COM组件对象 参数为COM组件类名
var qrCode = mxOcx.NewEntity("IMxDrawQrCode");
//返回二维码文本
qrCode.Text = txt;
//中心点
qrCode.Center = pos;
//二维码缩放比例
qrCode.Scale = 20;
//二维码旋转角度
qrCode.Rotation = 30 * 3.1415925 / 180.0;
//绘实体 参数为实体对象
mxOcx.DrawEntity(qrCode);

posted on 2019-06-19 09:44  梦想CAD控件  阅读(1185)  评论(0)    收藏  举报

导航