请问如何居中并高亮显示一个实体?
已知一个实体ObjectId,如何居中并高亮显示它? Zoom后,再SetImpliedSelection fsxm 发表于 2011-9-23 21:05 static/image/common/back.gifZoom后,再SetImpliedSelection
具体怎么操作啊,能不能给点代码参考下啊? 怎样用ZOOM将实体居中显示啊? 如何zoom见置顶帖kean专题! entity.Highlight(); //这个是实体对象的高亮显示
//entity 已知的实体对象
至于居中,我也不是很清楚。。。嘿嘿。。。。 谢谢大家,kean专题基本功能已实现.就是ZOOM后是全屏显示实体,如何让它显示是不改变当前的分辨率啊 WdPoint3d startPt = new WdPoint3d(Convert.ToDouble(pesValueRow.Cells.Value), Convert.ToDouble(pesValueRow.Cells.Value), 0);
WdPoint3d endPt = new WdPoint3d(Convert.ToDouble(pesValueRow.Cells.Value), Convert.ToDouble(pesValueRow.Cells.Value), 0);
string startPtStr = startPt.X.ToString() + "," + startPt.Y.ToString() + ",0";
string endPtStr = endPt.X.ToString() + "," + endPt.Y.ToString() + ",0";
//ThisDrawing.AcDoc.SendCommand("CMDECHO 0 ");
ThisDrawing.AcDoc.SendCommand("zoom w " + startPtStr + " " + endPtStr + " ");
//ThisDrawing.AcDoc.SendCommand("CMDECHO 1 "); SetImpliedSelection 是让对象处于选择状态 (Autodesk.AutoCAD.Interop.AcadApplicationClass as AcadApplicationClass).ZoomCenter(ptCenter.ToArray(), 1);
页:
[1]
2