×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Balloon ID Seach in Drafting

Balloon ID Seach in Drafting

Balloon ID Seach in Drafting

(OP)
Hi,

I am using NX6.0.2.8 MP7,
I have an Assembly contains nearly 1600 parts and the balloons Id(Call out) is created manualy by 'Id Symbol' for all the parts.
I need to search the "Balloon ID" by entering the balloon ID number and
I need to know, how many times it present in the same drawing sheet.
Is there any possibilities to do this? if any one has any utility please share it?

(Already i raised this query in GTAC,but No Solution)


Thanks in advance,
Suresh G


 

RE: Balloon ID Seach in Drafting

You'll need some sort of custom NX Open-based program to accomplish something like that.  

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.com/museum/

To an Engineer, the glass is twice as big as it needs to be.
 

RE: Balloon ID Seach in Drafting

I hope this will help to you. Only you must create an array to collect the different id symbols.
Imports System.Collections
Imports NXOpen
Imports NXOpen.Annotations
Imports NXOpen.UF

Public Class report_all_id_symbols
    ' class members
    Private Shared theSession As Session
    Private Shared theUI As UI
    Private Shared ufs As UFSession
    Private Shared lw As ListingWindow

    Public Shared Function Main(args As String()) As Integer
        theSession = Session.GetSession()
        theUI = UI.GetUI()
        ufs = UFSession.GetUFSession()
        lw = theSession.ListingWindow

        Try
            Dim idCol As IdSymbolCollection = theSession.Parts.Work.Annotations.IdSymbols
            Dim ids As IdSymbol
            Dim iEnum1 As IEnumerator = idCol.GetEnumerator()
            iEnum1.Reset()
            While iEnum1.MoveNext()
                ids = DirectCast(iEnum1.Current, IdSymbol)
                lw.Open()
                lw.WriteLine(vbLf & "Symbol: " & ids.Tag.ToString())

                Dim idsb As IdSymbolBuilder = idCol.CreateIdSymbolBuilder(ids)
                lw.WriteLine(" Text: " + idsb.UpperText)
                lw.WriteLine(" Origin: " & idsb.Origin.OriginPoint.ToString())

                Dim lb As LeaderBuilder = idsb.Leader
                Dim ldl As LeaderDataList = lb.Leaders
                lw.WriteLine(" Number of LeaderData: " + ldl.Length.ToString())
                For i As Integer = 0 To ldl.Length-1
                    Dim ld As LeaderData = ldl.FindItem(i)
                    lw.WriteLine(" LeaderData No." & i & ": " & ld.ToString())

                    lw.WriteLine("  Stub Size: " & ld.StubSize.ToString())
                    lw.WriteLine("  Stub Side: " & ld.StubSide.ToString())
                    ' Perpendicular as of NX7
                    ' lw.WriteLine("  Perpendicular: " + ld.Perpendicular.ToString());
                    lw.WriteLine("  Arrowhead: " & ld.Arrowhead.ToString())

                    Dim selection1 As DisplayableObject
                    Dim view1 As View
                    Dim point1 As Point3d
                    ld.Leader.GetValue(selection1, view1, point1)
                    lw.WriteLine("  Leader view: " & view1.Name)
                    lw.WriteLine("  Leader view type: " + view1.GetType().ToString())
                    lw.WriteLine("  Leader point: " & point1.ToString())

                    If( view1.GetType().ToString() <> "NXOpen.View" ) Then
                        Dim model_pt(2) As double
                        model_pt(0) = point1.X
                        model_pt(1) = point1.Y
                        model_pt(2) = point1.Z
                        Dim map_pt(1) As double

                        ufs.View.MapModelToDrawing(view1.Tag, model_pt, map_pt)
                        lw.WriteLine("  Mapped Leader point: X=" & map_pt(0).ToString() & " ,Y= " & map_pt(1).ToString() )
                    End If


                    lw.WriteLine("  Number of jogs: " & ld.Jogs.Size.ToString())
                    Dim jogs As SelectObject() = ld.Jogs.GetSelectObjectArray()
                    For Each jog As SelectObject In jogs
                        lw.WriteLine("  Jog: " & jog.ToString())
                        Dim selection2 As TaggedObject
                        Dim view2 As View
                        Dim point2 As Point3d
                        jog.GetValue(selection2, view2, point2)
                        lw.WriteLine("   Jog point: " & point2.ToString())
                    Next
                Next

                idsb.Destroy()

                lw.WriteLine(" Number of Associativities: " + ids.NumberOfAssociativities.ToString())
                For i As Integer = 1 To ids.NumberOfAssociativities
                    Dim assoc As Associativity = ids.GetAssociativity(i)
                    lw.WriteLine(" Assoc No." & i & ": " & assoc.ToString())
                    lw.WriteLine("  ObjectView : " + assoc.ObjectView.Name)

                    Dim obj As NXObject = assoc.FirstObject
                    If obj Is Nothing Then
                        lw.WriteLine("  FirstObject : null")
                    Else
                        lw.WriteLine("  FirstObject : " & obj.ToString())
                        lw.WriteLine("   Owning Part: " + obj.OwningPart.FullPath)
                        If obj.IsOccurrence Then
                            lw.WriteLine("   Owning Component: " + obj.OwningComponent.Name)
                        End If
                    End If
                Next
            End While
        Catch ex As NXOpen.NXException
            UI.GetUI().NXMessageBox.Show("Message", NXMessageBox.DialogType.[Error], ex.Message)
        End Try
        Return 0
    End Function

    Public Shared Function GetUnloadOption(arg As String) As Integer
        Return System.Convert.ToInt32(Session.LibraryUnloadOption.Immediately)
    End Function

End Class

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources