明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1004|回复: 1

如何用getpoint命令获取ucs下的点坐标

[复制链接]
发表于 2014-9-17 16:16:06 | 显示全部楼层 |阅读模式
如题,ActiveDocument.Utility.GetPoint命令获取的都是wcs坐标,不知道有没其他方法可获取ucs的坐标?
发表于 2014-9-17 19:58:20 | 显示全部楼层

    returnPnt = acadAPP.ActiveDocument.Utility.GetPoint(, "请拾取原点")
   

    acadAPP.ActiveDocument.Utility.GetEntity returnOb0j, basePnt0, "拾取中桩桩号"
    If returnOb0j.ObjectName = "AcDbText" Then
        Dim str0GC As Double
                str0GC = CDbl(returnOb0j.TextString)
        returnOb0j.Color = acBlue
    End If
   
    acadAPP.ActiveDocument.Utility.GetEntity returnObj, basePnt1, "拾取中桩高程"
    If returnObj.ObjectName = "AcDbText" Then
        Dim strGC As Double
        strGC = CDbl(returnObj.TextString)
        returnObj.Color = acRed
    End If



    origin(0) = returnPnt(0): origin(1) = returnPnt(1): origin(2) = 0
    xAxisPnt(0) = origin(0) + 1: xAxisPnt(1) = origin(1): xAxisPnt(2) = 0
    yAxisPnt(0) = origin(0): yAxisPnt(1) = origin(1) + 1: yAxisPnt(2) = 0

    Set ucsOBJ = acadAPP.ActiveDocument.UserCoordinateSystems.Add(origin, xAxisPnt, yAxisPnt, "NewUcs1")
    acadAPP.ActiveDocument.ActiveUCS = ucsOBJ
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-25 11:03 , Processed in 0.146096 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表