Thanks Bryco, actually was able to get it working after what Jeff mentioned. I had to create the leader first, and then append the block afterwards. I am now stuck trying to get my dynamic block's attributes to show up properly. I saw a post here where gile had a neat SyncronizeAttributes module/function, but it doesn't appear as though I am using it correctly.
So a break down of what is happening, user enters construction note number, start point of leader, end point of leader, leader is created, block is inserted, command repeats until canceled... The issue I am at now is the fact that the construction note that the user enters does not actually show up until after the command is run a second time. So, please forgive me if my coding is sloppy or not commented. Thanks in advance as always.
Using _LeaderItm As Leader = New Leader()
Dim _NoteString As PromptStringOptions = New PromptStringOptions(vbLf & "Construction note number: ")
Dim _NoteStrRes As PromptResult = CurrentEd.GetString(_NoteString)
If _NoteStrRes.Status <> PromptStatus.OK Then Exit Do
Dim CurrentBlkTbl As BlockTable
CurrentBlkTbl = CurrentTrans.GetObject(CurrentDB.BlockTableId, OpenMode.ForRead)
Dim CurrentBlkTblRec As BlockTableRecord
CurrentBlkTblRec = CurrentTrans.GetObject(CurrentBlkTbl(BlockTableRecord.ModelSpace), OpenMode.ForWrite)
Dim _PntStartRes As PromptPointResult = CurrentEd.GetPoint(_PntStart)
If _PntStartRes.Status <> PromptStatus.OK Then Exit Do
_PntEnd.BasePoint = _PntStartRes.Value
Dim _PntEndRes As PromptPointResult = CurrentEd.GetPoint(_PntEnd)
If _PntEndRes.Status <> PromptStatus.OK Then Exit Do
Dim _RotMat As Matrix3d = CurrentEd.CurrentUserCoordinateSystem
Dim _BaseStartPnt As Point3d = _PntStartRes.Value.TransformBy(_RotMat)
Dim _BaseEndPnt As Point3d = _PntEndRes.Value.TransformBy(_RotMat)
Dim _BlkTbl As BlockTable = CurrentTrans.GetObject(CurrentDB.BlockTableId, OpenMode.ForRead)
Dim _BlkId = _BlkTbl(_BlkNameString)
Dim _BlkRef As BlockReference = New BlockReference(_BaseEndPnt, _BlkId)
_LeaderItm.AppendVertex(_BaseStartPnt)
_LeaderItm.AppendVertex(_BaseEndPnt)
_LeaderItm.HasArrowHead = True
CurrentBlkTblRec.AppendEntity(_LeaderItm)
CurrentTrans.AddNewlyCreatedDBObject(_LeaderItm, True)
CurrentBlkTblRec.AppendEntity(_BlkRef)
CurrentTrans.AddNewlyCreatedDBObject(_BlkRef, True)
'
_LeaderItm.Annotation = _BlkRef.ObjectId
Dim _DynBlkRef As BlockReference = DirectCast(CurrentTrans.GetObject(_BlkRef.ObjectId, OpenMode.ForWrite), BlockReference)
Dim _DynBlkTblRec As BlockTableRecord = DirectCast(CurrentTrans.GetObject(_DynBlkRef.DynamicBlockTableRecord, OpenMode.ForWrite), BlockTableRecord)
For Each _AttID As ObjectId In _DynBlkTblRec
Dim ent As DBObject = CurrentTrans.GetObject(_AttID, OpenMode.ForWrite)
If TypeOf ent Is AttributeDefinition Then
Dim AttDef As AttributeDefinition = ent
If AttDef.Tag = "NT" Then AttDef.TextString = _NoteStrRes.StringResult
_DynBlkTblRec.SynchronizeAttributes
End If
Next
_LeaderItm.EvaluateLeader()
CurrentTrans.Commit()
CurrentEd.Regen()
End Using