01-30-2020
10:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
01-30-2020
10:34 AM
i changed your code a bit. try this:
Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument
Dim s As String
s = "<Property Document='model' PropertySet='Design Tracking Properties' Property='Appearance' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='72'>APPEARANCE</Property>"
Dim curve As DrawingCurve
curve = oDoc.SelectSet.Item(1).Parent
Dim oGI1 As GeometryIntent
oGI1 = oDoc.ActiveSheet.CreateGeometryIntent(curve, PointIntentEnum.kCenterPointIntent)
Dim pt As Point2d
pt = ThisApplication.TransientGeometry.CreatePoint2d
pt.X = oGI1.PointOnSheet.X + 3
pt.Y = oGI1.PointOnSheet.Y + 3
Dim oObjCol As ObjectCollection
oObjCol = ThisApplication.TransientObjects.CreateObjectCollection
oObjCol.Add(pt)
oObjCol.Add(oGI1)
Dim oLN As LeaderNote
' create a LeaderNote.
oLN = oDoc.ActiveSheet.DrawingNotes.LeaderNotes.Add(oObjCol, "efadva")
oLN.FormattedText = si did have some with your formated string. so i changed it to show the Appearance iProperty. You probaly need something else. there for this rule that will shows the formated string of an leader that you need to select.
Dim test As LeaderNote = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingNoteFilter, "") MsgBox(test.FormattedText)
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com