标签:database 详细 null mtab MTA cin dex bsp toe
IMxDrawDatabase::HandleToObject
给一个实体的句柄,返回实体的对象,具体详细如下:
参数 | 说明 |
---|---|
[in] BSTR handle |
实体的句柄 |
C#代码得到多线的端点,并成填充对象:
private void TestFill(String sHandle) { MxDrawDatabase database = (MxDrawDatabase)axMxDrawX1.GetDatabase(); MxDrawMcDbObject obj = database.HandleToObject(sHandle); if (obj == null ) return ; if (obj is MxDrawPolyline) { MxDrawPolyline poly = (MxDrawPolyline)obj; int i = 0; for (; i < poly.NumVerts; i++) { MxDrawPoint pt = (MxDrawPoint)poly.GetPointAt(i); double dBulge = poly.GetBulgeAt(i); if (i == 0) axMxDrawX1.PathMoveTo(pt.x, pt.y); else axMxDrawX1.PathLineToEx(pt.x, pt.y, 0.0, 0.0, dBulge); } if (i >= 3) { axMxDrawX1.PathMakeClosed(); axMxDrawX1.DrawPathToHatch(1.0); } } }
|
标签:database 详细 null mtab MTA cin dex bsp toe
原文地址:https://www.cnblogs.com/yzy0224/p/11137946.html