0 Members and 1 Guest are viewing this topic.
Sub Example_AddDimRotated() ' This example creates a rotated dimension in model space. Dim dimObj As AcadDimRotated Dim point1(0 To 2) As Double Dim point2(0 To 2) As Double Dim location(0 To 2) As Double Dim rotAngle As Double ' Define the dimension point1(0) = 0#: point1(1) = 0#: point1(2) = 0# 'Use CODE to Find out where the Second POINT should go point2(0) = 5#: point2(1) = 5#: point2(2) = 0# location(0) = 0#: location(1) = 5#: location(2) = 0# rotAngle = 0 '(or the angle you want) rotAngle = rotAngle * 3.141592 / 180# ' covert to Radians ' Create the rotated dimension in model space Set dimObj = ThisDrawing.ModelSpace.AddDimRotated(point1, point2, location, rotAngle) ZoomAllEnd Sub