Problems with iLogic BendNote text

Problems with iLogic BendNote text

damjan_baraga
Enthusiast Enthusiast
211 Views
3 Replies
Message 1 of 4

Problems with iLogic BendNote text

damjan_baraga
Enthusiast
Enthusiast

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.

damjanbaraga_0-1695219636499.png

 

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

 

0 Likes
212 Views
3 Replies
Replies (3)
Message 2 of 4

A.Acheson
Mentor
Mentor

Hi @damjan_baraga 

 

I suggest you make an edit to the bend line text manually then use a loop of bend notes to detect your edited text and then retrieve formatted text to input box. There must be an error in how your implementing the font size overide. Alternatively select another text style with a different size and use that.  

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 3 of 4

damjan_baraga
Enthusiast
Enthusiast

Actually, the real letters are \Q. This is the first key on the keyboard.Is there anybody who already get the same problem?

0 Likes
Message 4 of 4

JelteDeJong
Mentor
Mentor

I just wonder why you want to change the text size. It would make more sense if you updated your text style for bend notes.

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.

EESignature


Blog: hjalte.nl - github.com

0 Likes