Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I'm trying to use iLogic to add the linked model property "description" to my leader text. However, this code does not work for me. Any ideas on how to fix it? This code works great for changing view labels.
If ThisApplication.ActiveDocumentType <> kDrawingDocumentObject Then MessageBox.Show("This rule only works in a drawing document.", "Change Leader Text",MessageBoxButtons.OK,MessageBoxIcon.Error) Return End If Dim oDoc As DrawingDocument oDoc = ThisApplication.ActiveDocument Dim oLeaderNote As LeaderNote saveOriginalText = False addDescription = False Question = MessageBox.Show("Overwrite existing leader text?", "Change Leader Text",MessageBoxButtons.YesNoCancel,MessageBoxIcon.Question,MessageBoxDefaultButton.Button1) Select Case Question: Case vbYes saveOriginalText = False Case vbNo saveOriginalText = True Case vbCancel Return End Select 'define model property values oDescription = "<Property Document='model' PropertySet='Design Tracking Properties' Property='Description'>DESCRIPTION</Property>" For Each oLeaderNote In oDoc.ActiveSheet.DrawingNotes 'saves the original text originalText = oLeaderNote.FormattedText oLeaderNote.FormattedText = oDescription 'adds original beginning to end of label text if applicable If saveOriginalText = True Then oLeaderNote.FormattedText = oLeaderNote.FormattedText & vbCr & originalText End If Next
Solved! Go to Solution.