- Sub AddAndChgDim()
- Dim pnt1, pnt2, pnt3
- Dim d As AcadDimRotated
- Dim txt As String
- pnt1 = ThisDrawing.Utility.GetPoint(, vbCr & "第一点:")
- pnt2 = ThisDrawing.Utility.GetPoint(pnt1, vbCr & "第二点:")
- pnt3 = ThisDrawing.Utility.GetPoint(, vbCr & "文字位置:")
- Set d = ThisDrawing.ModelSpace.AddDimRotated(pnt1, pnt2, pnt3, 0)
- txt = ThisDrawing.Utility.GetString(0, vbCr & "替换的文字:")
- d.TextOverride = txt
- End Sub
|