代码
//当前已保存的用户坐标系坐标点到世界坐标系的转换
Sub Example_TranslateCoordinates()
    
Set ucsObj = ThisDrawing.ActiveUCS '得到当前坐标系
    
    
' Have the user enter a point
    Dim pointWCS As Variant
    pointWCS 
= ThisDrawing.Utility.GetPoint(, "Enter a point to translate:")
    
    
' Translate the point into UCS coordinates
    Dim pointUCS As Variant
    pointUCS 
= ThisDrawing.Utility.TranslateCoordinates(pointWCS, acWorld, acUCS, False)
    
    
' Display the coordinates of the point
    MsgBox "The point has the following coordinates:" & vbCrLf & _
            
"WCS: " & pointWCS(0& "" & pointWCS(1& "" & pointWCS(2& vbCrLf & _
            
"UCS: " & pointUCS(0& "" & pointUCS(1& "" & pointUCS(2), , "TranslateCoordinates Example"

End Sub

 

 

相关文章:

  • 2021-10-14
  • 2021-09-03
  • 2022-12-23
  • 2021-11-27
  • 2021-12-27
  • 2021-06-28
  • 2022-01-14
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2021-11-30
相关资源
相似解决方案