View Full Version : finding the angle between3points- using AcadDim3PointAngular
cheater
19-11-2004, 02:08 PM
how can i find the angle between 3 points
i tried this code but it didnt works i must get the degree and put that text to drawing...
Dim x As AcadDim3PointAngular
Point1(0) = 0: Point1(1) = 0: Point1(2) = 0
Point2(0) = 0: Point2(1) = 4: Point2(2) = 0
Point3(0) = 0: Point3(1) = 0: Point3(2) = 4
Set x = ThisDrawing.ModelSpace.AddDim3PointAngular(Point2, Point1, Point3, Point2)
hendie
19-11-2004, 03:54 PM
if you check the help it says:
Creates an angular dimension for an arc, two lines, or a circle.
Signature
RetVal = object.AddDimAngular(AngleVertex, FirstEndPoint, SecondEndPoint, TextPoint)
Object
ModelSpace Collection, PaperSpace Collection, Block
The object or objects this method applies to.
AngleVertex
Variant (three-element array of doubles); input-only
The 3D WCS coordinates specifying the center of the circle or arc, or the common vertex between the two dimensioned lines.
FirstEndPoint
Variant (three-element array of doubles); input-only
The 3D WCS coordinates specifying the point through which the first extension line passes.
SecondEndPoint
Variant (three-element array of doubles); input-only
The 3D WCS coordinates specifying the point through which the second extension line passes.
TextPoint
Variant (three-element array of doubles); input-only
The 3D WCS coordinates specifying the point at which the dimension text is to be displayed.
RetVal
DimAngular object
The newly created angular dimension.
Remarks
The AngleVertex is the center of the circle or arc, or the common vertex between the two lines being dimensioned. FirstEndPoint and SecondEndPoint are the points through which the two extension lines pass.
The AngleVertex can be the same as one of the angle endpoints. If you need extension lines, they will be added automatically. The endpoints provided are used as origin points for the extension lines.
you can't feed it a list of points.
if you have the points, why not draw two lines. add the dim, then delete the lines ?
cheater
20-11-2004, 10:53 PM
Dim Point1(0 To 2), Point2(0 To 2), Point3(0 To 2) As Integer
Dim angle As AcadDimAngular
Dim line1, line2 As AcadLine
Point1(0) = 0: Point1(1) = 0: Point1(2) = 0
Point2(0) = 0: Point2(1) = 4: Point2(2) = 0
Point3(0) = 0: Point3(1) = 0: Point3(2) = 4
Set angle = ThisDrawing.ModelSpace.AddDimAngular(Point1, Point2, Point3, Point1)
this code gives "object was erased" error message????
or i added these lines for drawing lines but it didnt worked....
'Set line1 = ThisDrawing.ModelSpace.AddLine(Point1, Point2)
'Set line2 = ThisDrawing.ModelSpace.AddLine(Point1, Point3)
So nothing changed...
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.