×
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

Inherit dimension settings from costumer defaults (journal)

Inherit dimension settings from costumer defaults (journal)

Inherit dimension settings from costumer defaults (journal)

(OP)
I have a journal that inherits settings from costumer defaults. The problem is that it doesn’t retain tolerances and fits.
How to make it read the tolerance (fit) value and assign it to the dimension once again.
Here’s the code:

CODE

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.Drawings
Imports NXOpen.UF

Module reset_all_views_and_dim_to_customer_defaults

    Dim theSession As Session = Session.GetSession()
    Dim theUFSession As UFSession = UFSession.GetUFSession()

    Sub Main()

        Dim workPart As Part = theSession.Parts.Work
        For Each myDim As Annotations.Dimension In workPart.Dimensions

            Dim objects1(0) As NXOpen.DisplayableObject
            objects1(0) = myDim
            Dim editSettingsBuilder1 As Annotations.EditSettingsBuilder
            editSettingsBuilder1 = workPart.SettingsManager.CreateAnnotationEditSettingsBuilder(objects1)
            editSettingsBuilder1.InheritSettingsFromCustomerDefault()
            Dim nXObject1 As NXObject
            nXObject1 = editSettingsBuilder1.Commit()
            editSettingsBuilder1.Destroy()
        Next

    End Sub


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

End Module 

RE: Inherit dimension settings from costumer defaults (journal)

I would suggest collecting the tolerance type, tolerance values, appended text, and any other dimension style settings that you would like to save then reapply the values after inheriting the customer default settings. The dimension settings can be queried through various builders; for example, you can get the tolerance type from the {edit settings builder}.AnnotationStyle.DimesionStyle.ToleranceType.

www.nxjournaling.com

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