Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to change the existing content of a leader note with the content I specify by clicking. Can anyone help me?
Solved! Go to Solution.
I want to change the existing content of a leader note with the content I specify by clicking. Can anyone help me?
Solved! Go to Solution.
To clarify, are you talking a "Leader" entity, or "MLeader"? Assume it is MLeader, you can simply reach AcadMLeader.TextString property:
Option Explicit
Public Sub GetMLeaderContent()
Dim pt As Variant
Dim ent As AcadEntity
Dim mleader As AcadMLeader
Dim leaderText As String
On Error Resume Next
ThisDrawing.Utility.GetEntity ent, pt, vbCr & "Select a MLeader object:"
If ent Is Nothing Then Exit Sub
If TypeOf ent Is AcadMLeader Then
Set mleader = ent
leaderText = mleader.TextString
MsgBox "MLeader's content: " & leaderText
Else
MsgBox "No an MLeader object!"
End If
End Sub