myNewMLeadStyle.TextLeftAttachmentType = 1
myNewMLeadStyle.TextRightAttachmentType = 1
myNewMLeadStyle.TextAttachmentType = TextAttachmentType.AttachmentMiddleOfTop
Great solution thanks to all who contributed.
Update for entry points in acdb19.dll
<DllImport("acdb19.dll", CallingConvention:=CallingConvention.ThisCall, EntryPoint:="?setTextAttachmentType@AcDbMLeaderStyle@@QEAA?AW4ErrorStatus@Acad@@W4TextAttachmentType@1@W4LeaderDirectionType@1@@Z")> _ Private Shared Function setTextAttachmentType(ByVal AcDbMLeaderStylePtr As IntPtr, ByVal textAttachmentType As TextAttachmentType, ByVal leaderDirection As LeaderDirectionType) As ErrorStatus End Function <DllImport("acdb19.dll", CallingConvention:=CallingConvention.ThisCall, EntryPoint:="?textAttachmentType@AcDbMLeaderStyle@@QEBA?AW4TextAttachmentType@1@W4LeaderDirectionType@1@@Z")> _ Private Shared Function getTextAttachmentType(ByVal AcDbMLeaderStylePtr As IntPtr, ByVal leaderDirection As LeaderDirectionType) As TextAttachmentType End Function
dmcknight, THANKS!! This bit of code was the answer.
dose.SetTextAttachmentType(TextAttachmentType.AttachmentMiddleOfTop, LeaderDirectionType.LeftLeader);
dose.SetTextAttachmentType(TextAttachmentType.AttachmentMiddleOfTop, LeaderDirectionType.RightLeader);
@sonny3g wrote:dmcknight, THANKS!! This bit of code was the answer.
dose.SetTextAttachmentType(TextAttachmentType.AttachmentMiddleOfTop, LeaderDirectionType.LeftLeader);
dose.SetTextAttachmentType(TextAttachmentType.AttachmentMiddleOfTop, LeaderDirectionType.RightLeader);
You didn't see my reply in the other thread?
Yes I did, and I marked it as the solution to that thread.