Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Part attribute locked 1

Status
Not open for further replies.

Herbymusic

Automotive
Nov 21, 2014
4
Hi everybody,

I want to delete a part attribute in NX9, but this is locked.
Are there any suggestions ?
 
Replies continue below

Recommended for you

I think you can only unlock it and get rid of it using a journal. You most likely also have to change your customer defualts to allow you to lock an attribute through a journal. It is a checkmark somewhere. Also someone from siemens posted a journal for locked attributes on the gtac site.
 
I recently heard a quote something along the lines of: "Before you tear down a fence, pause long enough to consider why it was put there in the first place".

www.nxjournaling.com
 
What attribute are we talking about? Is it one that was generated by the system such as Material after assigning a materiall or is this something that perhaps Teamcenter added to your part file? As cowski has alluded to, think before you act.

Now if it was one that you inadvertently locked yourself, locked Attributes can only be unlocked via NX Open code.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
It is an attribute that was created by a tool to generate geometry.
The tool is not installed anymore, the geometry was deleted, but there where lots of modifications meanwhile.
I do not want to recreate everything because of that attribute.
So it es really a clean up. The "fence" does not make sense anymore.
I will check the nxopen help.
Thank you.
 
A call to GTAC will help as well as they've had to intervene in situations like this before.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
Try this code:

Code:
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF

Module Unlock

    Private text As String
    Dim s As Session = Session.GetSession()
    Dim ufs As UFSession = UFSession.GetUFSession()

    Sub Main()

        Dim theSession As Session = Session.GetSession()
        Dim workPart As Part = theSession.Parts.Work
        Dim displayPart As Part = theSession.Parts.Display

        If workPart Is Nothing Then Return

        ' ----------------------------------------------
        '   Menu: File->Properties
        ' ----------------------------------------------
        Dim markId1 As Session.UndoMarkId
        markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Unlock")
        ' ----------------------------------------------
        Dim p As BasePart = workPart

        If Not SelectText() Then
            Return
        End If

        Try
            p.SetUserAttributeLock(text, NXObject.AttributeType.Any, False)
        Catch ex As Exception
        End Try


    End Sub

    Function SelectText() As Boolean

        Dim theSession As Session = Session.GetSession()
        Dim workPart As Part = theSession.Parts.Work
        Dim theUISession As UI = UI.GetUI
        Dim answer As String = ""

        text = InputBox("Digite a Propriedade para Unlock", "UNLOCK Properties", "")

        If text.Length <> 0 Then
            SelectText = True
        End If

    End Function

    Public Function GetUnloadOption(ByVal dummy As String) As Integer

        'Unloads the image when the NX session terminates
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination

    End Function

End Module

Gelson Z. Nicoletto
Eng. Supervisor
Mould Desing
Brazil
 
I have a part with locked attributes that are obsolete and couldn't delete them even though all references to them were removed. I didn't want to rebuild a complex set of relationships in a new file but just tried this routine and it worked great, thanks for sharing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor