Text Style Customization - Text Inside Two Circles.

Text Style Customization - Text Inside Two Circles.

Anonymous
Not applicable
558 Views
5 Replies
Message 1 of 6

Text Style Customization - Text Inside Two Circles.

Anonymous
Not applicable

Dear Friends;

I have a style question.

Can we create a style that takes texts inside 2 circles in Inventor?

 

Orientation 1.JPG

I want to make the drawing up more like the below.

So i try to make a style for my nozzle texts. I want them inside two circles like below.

Orientation 2.JPG

I searched the text styles but couldn't find what i wanted.

Any ideas if i can customize this style?

 

Best Regards;

0 Likes
559 Views
5 Replies
Replies (5)
Message 2 of 6

JelteDeJong
Mentor
Mentor

I dont know how you could alter a text style in the way you want. But you can make a sketched symbol. It is not as a convenient but it does the job. I created (and attached) an example file with a sketched symbol.

To create a new text place the sketched symbol. It will prompt you for the text you want inside the circles. Then you will need to add a leader.

AddLeader.png

 

 

 

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

Message 3 of 6

Anonymous
Not applicable

Thank you for the contribution.

I am trying to develop a drawing automation template.

I can get all of these nozzle tags(texts) from another program imported automatically. So i am trying to create a style or an Ilogic macro to make them inside two circles.

0 Likes
Message 4 of 6

JelteDeJong
Mentor
Mentor

Its possible to add the sketched symbol with a leader. Have a look at this code:

Sub Main()
        Dim doc As DrawingDocument = ThisDoc.Document
        Dim sheet As Sheet = doc.ActiveSheet

        Dim curve As DrawingCurveSegment = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingCurveSegmentFilter, "")

        Dim p1 As Point2d = ThisApplication.TransientGeometry.CreatePoint2d(10, 10)
        Dim p2 As Point2d = curve.StartPoint

        placeNozzleText(sheet, p1, p2, "L1")
    End Sub

    Public Sub placeNozzleText(sheet As Sheet, p1 As Point2d, p2 As Point2d, text As String) 'view As DrawingView, 
        Dim doc As DrawingDocument = sheet.Parent
        Dim inv As Application = doc.Parent
        Dim symbolDdef As SketchedSymbolDefinition = doc.SketchedSymbolDefinitions.Item("nozzle text symbol")

        Dim promptStrings(0) As String
        promptStrings(0) = text
        Dim newSymbol As SketchedSymbol = sheet.SketchedSymbols.Add(symbolDdef, p1, 0, 1, promptStrings)

        Try
            Dim objColletion As ObjectCollection = inv.TransientObjects.CreateObjectCollection()
            objColletion.Add(p1)
            objColletion.Add(p2)
            newSymbol.Leader.AddLeader(objColletion)
        Catch ex As Exception
            MsgBox("Exception was thrown while placing leader. (this can happen if p2 is not a failid point. (like the startpoint of an edge)")
        End Try

    End Sub

Add the rule to the example in my last post.

Add a view.

Run the rule.

Select an edge.

 

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
Message 5 of 6

Anonymous
Not applicable

I had error attached when i tried the code.

 

0 Likes
Message 6 of 6

JelteDeJong
Mentor
Mentor

The error messages does not say much. (like so many times wit inventor exception messages.) So i have to guess what is going wrong. I forgot to metion that you need to add the sketched symbol from the file that i did attached earler (and dont change its name). did you add it?

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