[i]want to get a length from two points selected on screen and save the result to avalue in an attribute i have the code but am not sure how to pass the length value to the attribute . can anyone help[/i] Sub GetLength()     Dim tenstart As Variant     Dim tenend As Variant ' Get the points from the user     tenstart = ThisDrawing.Utility.GetPoint _                 (, vbCrLf & "select start of tendon: ")     tenend = ThisDrawing.Utility.GetPoint _                 (tenstart, vbCrLf & "select end of tendon: ") ' Calculate the distance between point1 and point2     Dim x As Double, y As Double, z As Double     Dim length As Double     x = tenstart(0) - tenend(0)     y = tenstart(1) - tenend(1)     z = tenstart(2) - tenend(2)     length = Sqr((Sqr((x ^ 2) + (y ^ 2)) ^ 2) + (z ^ 2)) End Sub    Dim attributeObj As AcadAttribute     Dim height As Double     Dim mode As Long     Dim prompt As String     Dim insertionPoint(0 To 2) As Double     Dim tag As String     Dim value As String height = 250     mode = acAttributeModeInvisible     prompt = "tendon Length"     insertionPoint(0) = 5     insertionPoint(1) = 5     insertionPoint(2) = 0     tag = "length"     value = "length" ' i want to place length here     Set attributeObj = blockObj.AddAttribute(height, mode, _                           prompt, insertionPoint, tag, value)