Depending on which space you are in (model or layout) or in a block, you would add it too that object eg thisdrawing.modelspace.addDimAligned (extLine1Point, ExtLine2Point, TextPosition)
"Everybody is ignorant, only on different subjects." — Will Rogers