Cancel
Showing results for 
Search instead for 
Did you mean: 

balloons without stubs (possibly using VB)

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hi

 

I've been trying to find a way to edit mulitiple balloons on a drawing to  change the leader type from plain to withour stub however it doesn't appear posisble, so I recorded the attached journal using advanced filtereing techniques I managed to select all the parts list item ID balloons on a drawing and change the stub lenght from 5 to 0 however it appaears that the journal records the symbol label so when I tried to run the journal on another drawing, it wouldn't work. I'd be grateful for any ideas/assistance.

 

Cheers

 

Si.

7 REPLIES

Re: balloons without stubs (possibly using VB)

Valued Contributor
Valued Contributor

 

 

 

Hi,

 

I am not sure if I understand the issue correctly. If no - sorry for spamming. I would say you can do the following:

1. Select 'Detail Filtering'

 

detail_filtering.png

 

2. In 'Types' tab select 'Symbol'.

3. Switch to 'Detailed Types' -> select 'Baloon' and click 'Close'.

4. Now your filter is set to select baloons only. Press Ctrl+A to select all the baloons on current page (only current page balloons can be selected Smiley Sad ).

5. RMB on one of the highlighted balloons and pick settings.

6.  In Line/Arrow->Arrow Line->Stub you can change the stub length for all the balloons.

 

regards

 

WZ

 

 

 

Re: balloons without stubs (possibly using VB)

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer
Yes, I have got this captured in a journal but it will not work on different drawings as it captures the unique label for each balloon symbol. Thanks anyway.

Re: balloons without stubs (possibly using VB)

@Si_Wright Here is a simple journal which does only what you did.  I say this because you should also change the type of leader.

 

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.Utilities
Imports NXOpen.Annotations
Imports NXOpen.Assemblies

Module ChangeIDSymbols1
    Dim s As Session = Session.GetSession()
    Dim workPart As Part = s.Parts.Work
    Sub Main()

        Dim idcol As IdSymbolCollection = s.Parts.Work.Annotations.IdSymbols
        For Each obj As IdSymbol In idcol
            Dim objects1(0) As NXOpen.DisplayableObject
            objects1(0) = obj
            Dim editSettingsBuilder1 As NXOpen.Annotations.EditSettingsBuilder = Nothing
            editSettingsBuilder1 = workPart.SettingsManager.CreateAnnotationEditSettingsBuilder(objects1)
            editSettingsBuilder1.AnnotationStyle.LineArrowStyle.StubLength = 0.0
            Dim nXObject1 As NXOpen.NXObject = Nothing
            nXObject1 = editSettingsBuilder1.Commit()
            editSettingsBuilder1.Destroy()
        Next

    End Sub

    Public Function GetUnloadOption(ByVal dummy As String) As Integer
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
    End Function

End Module

 

Frank Swinkles

Re: balloons without stubs (possibly using VB)

Phenom
Phenom

Hi @FrankSwinks1,

If I want in the journal change the leader type in without stub...like 

leaderData2.TerminatorType = NXOpen.Annotations.LeaderData.LeaderType.PlainWithoutStub, how the code line must be built ?

Thank you...

Using NX11 and NX1847
RuleDesigner PDM

Re: balloons without stubs (possibly using VB)

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

That's awsome Frank! Thanks so much Smiley Happy

Re: balloons without stubs (possibly using VB)

Here is another journal that changes the leader type.

 

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.Utilities
Imports NXOpen.Annotations
Imports NXOpen.Assemblies

Module ChangeIDSymbols2
    Dim s As Session = Session.GetSession()
    Dim workPart As Part = s.Parts.Work
    Sub Main()

        Dim idcol As IdSymbolCollection = s.Parts.Work.Annotations.IdSymbols
        For Each obj As IdSymbol In idcol
            Dim idSymbolBuilder1 As NXOpen.Annotations.IdSymbolBuilder = Nothing
            idSymbolBuilder1 = workPart.Annotations.IdSymbols.CreateIdSymbolBuilder(obj)
            Dim taggedObject1 As NXOpen.TaggedObject = Nothing
            taggedObject1 = idSymbolBuilder1.Leader.Leaders.FindItem(0)
            Dim leaderData1 As NXOpen.Annotations.LeaderData = CType(taggedObject1, NXOpen.Annotations.LeaderData)
            leaderData1.TerminatorType = NXOpen.Annotations.LeaderData.LeaderType.PlainWithoutStub
            leaderData1.StubSize = 0.0
            Dim nXObject1 As NXOpen.NXObject = Nothing
            nXObject1 = idSymbolBuilder1.Commit()
            idSymbolBuilder1.Destroy()
        Next

    End Sub

    Public Function GetUnloadOption(ByVal dummy As String) As Integer
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
    End Function

End Module

Frank Swinkels

 

Re: balloons without stubs (possibly using VB)

Phenom
Phenom

Hi @FrankSwinks1,

good works. Works fine.

Thank you...

Using NX11 and NX1847
RuleDesigner PDM