×
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

Display Attributes?

Display Attributes?

Display Attributes?

(OP)
My boss asked if it is possible to display the attributes of holes on the screen in modeling. For instance in modeling, to turn on a setting or something and all of the holes will display their attributes. M8, DIA 8 H6, DIA 10, etc.... or ,maybe even just their diameters.

To my knowledge there is no setting to do this, but I figured I would ask. Never know when I might be surprised.

RE: Display Attributes?

You have tried Right click the feature in the graphics- Show Dimension ?

Regards,
Tomas

RE: Display Attributes?

(OP)
hanks Tomas. I will admit, I didnt know you could do that. lol I will show him that in the morning. Though I asked for even the diameters, I never talked to him if that would be enough and I dont expect it to satisfy him, but maybe it will. Might be he will see it as a better than nothing kind of thing. lol

Thanks

RE: Display Attributes?

Hi,

After showing dimensions do a right clic on one dimension and select show as PMI.
If not the dimension doesn't after refresh F5.

Regards
Didier Psaltopoulos
http://www.psi-cad.fr

RE: Display Attributes?

I have a journal that looks for hole features in the model, renames one of the hole edges, and turns on object name display. After running the journal, all the holes are labeled in the graphics window. Something similar could be done with the hole size info. Note that the names would not be associative and if/when the hole size changes the journal would need to be re-run to update the display. Combining the journal with some menuscript might make for a fully automated solution...

www.nxjournaling.com

RE: Display Attributes?

(OP)
cowski, would I be able to get that from you? It might be worth a shot and possibly too late now as I think my boss went a different direction, but I would still like to see it and learn from it myself. See if I can make it work for the future when I get time.

RE: Display Attributes?

The code is below. It is really just some concept code that I was tinkering with a long time ago (i.e. it doesn't do any error checking and isn't useful by itself). When run it will look for hole features in the work part and rename all the edges of each hole feature "hole 1", "hole 2",... "hole n"; then it turns on name display in the work view. When you rotate the model around, each hole feature is labeled. It could be modified to pull attribute or expression info from the hole feature rather than applying a generic name. Here it is FWIW:

CODE

Option Strict Off
Imports System
Imports NXOpen

Module Module1

    Sub Main()

        Dim theSession As Session = Session.GetSession()
        Dim workPart As Part = theSession.Parts.Work
        'Dim lw As ListingWindow = theSession.ListingWindow
        'lw.Open()

        Const holeNamePrefix As String = "hole"
        Dim counter As Integer = 1

        For Each tempFeat As Features.Feature In workPart.Features

            If TypeOf (tempFeat) Is Features.HolePackage Then
                'lw.WriteLine("name: " & tempFeat.Name)
                'lw.WriteLine("timestamp: " & tempFeat.Timestamp)
                Dim theHole As Features.HolePackage = tempFeat
                'lw.WriteLine("num edges: " & theHole.GetEdges.Length.ToString)
                For Each tempEdge As Edge In theHole.GetEdges
                    tempEdge.SetName(holeNamePrefix & counter.ToString)
                Next
                counter += 1
            End If

            'lw.WriteLine("")
        Next

        'lw.Close()

        'turn on object names in the work view
        workPart.Preferences.NamesBorderVisualization.ObjectNameDisplay = Preferences.PartVisualizationNamesBorders.NameDisplay.WorkView

    End Sub


    Public Function GetUnloadOption(ByVal dummy As String) As Integer

        'Unloads the image immediately after execution within NX
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately

    End Function

End Module 

www.nxjournaling.com

RE: Display Attributes?

(OP)
Thanks cowski

Im looking forward to a chance to delve into it some. :)

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