priyanka_mehta Posted August 28, 2009 Posted August 28, 2009 Hi all, I need to create an aligned dimension. The startpoint for this dimension could be anywhere on polyline/arc/line etc.. but the endpoint for this is perpendicular from the start point. I tried this code, but later realized getpoint cannot find relatively perpendicular points. Dim dimStyle As AcadDimStyle Dim dimObj As AcadDimAligned Dim Point1 As Variant Dim Point2 As Variant Dim Loc(0 To 2) As Double Set dimStyle = ThisDrawing.DimStyles.Add("MyDim") Point1 = ThisDrawing.Utility.GetPoint(, "Pick Point 1: ") Point2 = ThisDrawing.Utility.GetPoint(, "Pick Point 2: ") x = (Point1(0) + Point2(0)) / 2 y = (Point1(1) + Point2(1)) / 2 Loc(0) = x Loc(1) = y Loc(2) = 0 Set dimObj = ThisDrawing.ModelSpace.AddDimAligned(Point1, Point2, Loc) Thanks in advance, Priyanka Quote
SEANT Posted August 28, 2009 Posted August 28, 2009 How about this: Point1 = ThisDrawing.Utility.GetPoint(, "Pick Point 1: ") ThisDrawing.SetVariable "LastPoint", Point1 Point2 = ThisDrawing.Utility.GetPoint(, "Pick Point 2: ") Quote
priyanka_mehta Posted August 31, 2009 Author Posted August 31, 2009 Hey thanks a lot Seant, I tried your line of code and somehow got to this idea too. Point1 = ThisDrawing.Utility.GetPoint(,"Pick Point 1: ") Point2 = ThisDrawing.Utility.GetPoint(Point1 ,"Pick Point 2: ") Thanks a lot, Regards, Priyanka Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.