Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm trying to change the color of my newly created note in the following code. But it will not change,. I've tried numerous separate approaches and it really seems like the code should work but the black text remains.
Dim oDwgDoc As Document = ThisApplication.ActiveDocument Dim oSheet As Sheet = oDwgDoc.Sheets.Item(1) Dim oGeneralNotes As GeneralNotes = oSheet.DrawingNotes.GeneralNotes Dim oTG As TransientGeometry = ThisApplication.TransientGeometry oFontSize1 = 1 * 2.54 '2.54 coverts to inches oText1 = "OBSOLETE" Dim oBorder As Border = oSheet.Border Dim oTitleBlock As TitleBlock = oSheet.TitleBlock Dim oPlacementPoint1 As Point2d xrev2 = oBorder.RangeBox.MinPoint.X + 3 yrev2 = oBorder.RangeBox.MaxPoint.Y - 1 oPlacementPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(xrev2, yrev2) Dim sFormattedText As String = "<StyleOverride FontSize ='" & oFontSize1 & "'>" & oText1 & "</StyleOverride>" oGeneralNote = oGeneralNotes.AddFitted(oPlacementPoint1, sFormattedText) oGeneralNote.Rotation = -0.785398 Dim red As Color = ThisApplication.TransientObjects.CreateColor(255, 0, 0) 'Red oGeneralNote.Color = red
Solved! Go to Solution.