hzh2000 发表于 2009-7-28 11:07:00

[求助]点坐标转换

<p>其实就是在图纸空间的一个视口上(非激活进入)点选一点,如何得到这点在模型空间WCS真实坐标?</p><p>trans函数看的不明白,不知道后面的参数应该是几?</p>

fjfhgdwfn 发表于 2009-7-28 15:47:00

<p>Public Sub VPCoords(vp As AcadPViewport, LL, ur)</p><p>&nbsp;&nbsp;&nbsp; Dim min, max, oldMode As Boolean<br/>&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp; vp.GetBoundingBox min, max<br/>&nbsp;&nbsp;&nbsp; oldMode = ThisDrawing.MSpace<br/>&nbsp;&nbsp;&nbsp; ThisDrawing.MSpace = True<br/>&nbsp;&nbsp;&nbsp; LL = ThisDrawing.Utility.TranslateCoordinates(min, acPaperSpaceDCS, acDisplayDCS, False)<br/>&nbsp;&nbsp;&nbsp; ur = ThisDrawing.Utility.TranslateCoordinates(max, acPaperSpaceDCS, acDisplayDCS, False)<br/>&nbsp;&nbsp;&nbsp; ThisDrawing.MSpace = oldMode<br/>&nbsp;&nbsp;&nbsp; <br/>End Sub</p><p>请参照这个</p>
页: [1]
查看完整版本: [求助]点坐标转换