Community
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.
Solved by norman.yuan. 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
Can't find what you're looking for? Ask the community or share your knowledge.