Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations 3DDave on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Attributes?

Status
Not open for further replies.

Kenja824

Automotive
Nov 5, 2014
958
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.
 
Replies continue below

Recommended for you

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

Regards,
Tomas

 
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
 
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
 
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
 
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.
 
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
 
Thanks cowski

Im looking forward to a chance to delve into it some. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor