ExtLine1EndPoint Example

Using Programming Languages other than VBA

Sub Example_ExtLine1EndPoint()
	' This example creates an angular dimension. It then changes
	' the location of the ExtLine1EndPoint.

	Dim dimObj As AcadDimAngular
	Dim angVert(0 To 2) As Double
	Dim FirstPoint(0 To 2) As Double
	Dim SecondPoint(0 To 2) As Double
	Dim TextPoint(0 To 2) As Double

	' Define the dimension
	angVert(0) = 0#: angVert(1) = 5#: angVert(2) = 0#
	FirstPoint(0) = 1#: FirstPoint(1) = 7#: FirstPoint(2) = 0#
	SecondPoint(0) = 1#: SecondPoint(1) = 3#: SecondPoint(2) = 0#
	TextPoint(0) = 3#: TextPoint(1) = 5#: TextPoint(2) = 0#

	' Create the angular dimension in model space
	Set dimObj = ThisDrawing.ModelSpace.AddDimAngular(angVert, FirstPoint, SecondPoint, TextPoint)
	ZoomAll
	MsgBox "The current value of ExtLine1EndPoint is " & dimObj.ExtLine1EndPoint(0) & ", " & dimObj.ExtLine1EndPoint(1) & ", " & dimObj.ExtLine1EndPoint(2), vbInformation, "ExtLine1EndPoint Example"

	' Change the endpoint of the first extension line
	SecondPoint(0) = 0: SecondPoint(1) = 3: SecondPoint(2) = 0
	dimObj.ExtLine1EndPoint = SecondPoint
	dimObj.Update

	' Return the endpoint of the first extension line
	' Note that the return value is a Variant
	Dim retPnt As Variant
	retPnt = dimObj.ExtLine1EndPoint
	MsgBox "The new value of ExtLine1EndPoint is " & dimObj.ExtLine1EndPoint(0) & ", " & dimObj.ExtLine1EndPoint(1) & ", " & dimObj.ExtLine1EndPoint(2), vbInformation, "ExtLine1EndPoint Example"
End Sub

 

   Comments?