坐標型尺寸標注用來標注零部件上某點相對于原點的垂直距離,創(chuàng)建坐標型尺寸標注對象用AddDimOrdinate方法,語法格式如下。
RetVal=object.AddDimOrdinate(DefinitionPoint,LeaderEndPoint,UseXAxis)
下面的代碼創(chuàng)建一個坐標型尺寸標注。
Private Sub Command1_Click()
Dim dimobj As AcadDimOrdinate
Dim definingpoint(0 To 2) As Double
Dim leaderendpoint(0 To 2) As Double
Dim usexaxis As Boolean
definingpoint(0) = 12#: definingpoint(1) = 8#: definingpoint(2) = 0#
leaderendpoint(0) = 20#: leaderendpoint(1) = 13#: leaderendpoint(2) = 0#
usexaxis = False
Set dimobj = acadapp.ActiveDocument.ModelSpace.AddDimOrdinate(definingpoint, leaderendpoint, usexaxis)
ZoomExtents
End Sub