Message 1 of 4
Problems with iLogic BendNote text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I made rule from different iLogic rules.
It automatically puts note text on the bend line and then changes text to my language with proper height of letters.
Dim oDoc As DrawingDocument = ThisApplication.ActiveDocument Dim oSheet As Sheet = oDoc.ActiveSheet Dim oView As DrawingView Dim oCurve As DrawingCurve Dim oBendNote As BendNote For Each oSheet In oDoc.Sheets oSheet.Activate() For Each oNote As BendNote In oSheet.DrawingNotes.BendNotes oNote.Delete() Next Next sFSize1 = InputBox("Vnesi višino pisave v cm", "Višina pisave", "1") For Each oView In oSheet.DrawingViews For Each oCurve In oView.DrawingCurves If (oCurve.EdgeType = Inventor.DrawingEdgeTypeEnum.kBendDownEdge _ Or oCurve.EdgeType = Inventor.DrawingEdgeTypeEnum.kBendUpEdge) Then ' Create the bend note oBendNote = oSheet.DrawingNotes.BendNotes.Add(oCurve) If oBendNote.Text.Contains("DOWN") Then Dim oText = Replace(oBendNote.Text, "DOWN", "DOL") oBendNote.HideValue = True oBendNote.Text = oText End If If oBendNote.Text.Contains("UP") Then Dim oText = Replace(oBendNote.Text, "UP","GOR") oBendNote.HideValue = True oBendNote.Text = oText End If oBendNote.FormattedText = "<StyleOverride FontSize='" & sFSize1 & "'>" & oBendNote.Text & "</StyleOverride>" oBendNote.HideValue = True End If Next 'oCurve Next 'oView
But by changing text I get leathers IQ before text. I don't see where the problem is.
The rule works, if this line is put in comment, but then I can adjust the height of the letters.
oBendNote.FormattedText = "<StyleOverride FontSize='" & sFSize1 & "'>" & oBendNote.Text & "</StyleOverride>" oBendNote.HideValue = True