How to identify parts that are having different properties applied in different Contexts?
How to identify parts that are having different properties applied in different Contexts?
(OP)
In an Assembly BOM, how could I distinguish the items which are having different values in different Contexts?
At assembly level it’s possible to apply values in Context to Component, Instance, Reference Set and Part. The problem is, the values entered at part level are over ridden by Assembly level Context=”Component” (by default), which gives undesired results in the BOM. How could I clearly see the driving context of each cell item of the BOM?
Ex: “Size” attribute entered at the part level is overridden by Assembly Property applied in context to “Component” (By Default). There could be some few parts with this unwanted behaviour (especially in a cloned design) and what is the best way to catch those culprits?
At assembly level it’s possible to apply values in Context to Component, Instance, Reference Set and Part. The problem is, the values entered at part level are over ridden by Assembly level Context=”Component” (by default), which gives undesired results in the BOM. How could I clearly see the driving context of each cell item of the BOM?
Ex: “Size” attribute entered at the part level is overridden by Assembly Property applied in context to “Component” (By Default). There could be some few parts with this unwanted behaviour (especially in a cloned design) and what is the best way to catch those culprits?
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V9.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks





RE: How to identify parts that are having different properties applied in different Contexts?
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.
RE: How to identify parts that are having different properties applied in different Contexts?
Some attributes get inherited by default (components inherit the part attributes and values by default) but I know of no attributes that get overridden by default. To override an attribute, you must supply a new value to an inherited attribute. To remove the "override" value, select the attribute and press the delete button*; the overridden value will disappear and it will return to the "inherited" status and value.
* the graphical "delete" button in the dialog, not the delete button on the keyboard.
www.nxjournaling.com
RE: How to identify parts that are having different properties applied in different Contexts?
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.
RE: How to identify parts that are having different properties applied in different Contexts?
The question is how to find those components with undesired values. John, I don’t think the method you suggest is a practical. (I’m not a fortune teller to identify the Components with problematic attributes by looking at the BOM :) )
Could we change the default = “Part”?
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V9.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks
RE: How to identify parts that are having different properties applied in different Contexts?
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V9.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks
RE: How to identify parts that are having different properties applied in different Contexts?
CODE
Option Strict Off Imports System Imports NXOpen Imports NXOpen.UF Imports NXOpen.Assemblies Module Module1 Public theSession As Session = Session.GetSession() Public ufs As UFSession = UFSession.GetUFSession() Public lw As ListingWindow = theSession.ListingWindow Sub Main() Dim workPart As Part = theSession.Parts.Work Dim dispPart As Part = theSession.Parts.Display lw.Open() lw.WriteLine("component attributes overriding the part attribute value:") lw.WriteLine("") Try Dim c As ComponentAssembly = dispPart.ComponentAssembly If Not IsNothing(c.RootComponent) Then reportComponentChildren(c.RootComponent, 0) Else '*** insert code to process piece part lw.WriteLine("Part has no components") End If Catch e As Exception theSession.ListingWindow.WriteLine("Failed: " & e.ToString) End Try lw.WriteLine("component processing complete") lw.Close() End Sub Sub reportComponentChildren(ByVal comp As Component, _ ByVal indent As Integer) For Each child As Component In comp.GetChildren() '*** insert code to process component or subassembly lw.WriteLine(New String(" ", indent * 2) & child.DisplayName()) Dim userAttInfo() As NXObject.AttributeInformation = child.GetUserAttributes For Each temp As NXObject.AttributeInformation In userAttInfo If IsAttributeOverridden(child, temp) Then lw.WriteLine(New String(" ", indent * 2) & "attribute title: " & temp.Title) End If Next lw.WriteLine("") reportComponentChildren(child, indent + 1) Next End Sub Function IsAttributeOverridden(ByVal theComp As Component, ByVal theAttribute As NXObject.AttributeInformation) As Boolean 'if "inherited" = false, the attribute may be original to the component or it is overridden 'if the component's parent (part) has the same attribute, it must be overridden 'otherwise it must be new to the component Dim thePart As Part = theComp.Prototype.OwningPart Dim isOverridden As Boolean = False If Not theAttribute.Inherited Then If theAttribute.Array Then isOverridden = thePart.HasUserAttribute(theAttribute.Title, theAttribute.Type, theAttribute.ArrayElementIndex) Else isOverridden = thePart.HasUserAttribute(theAttribute.Title, theAttribute.Type, -1) End If End If Return isOverridden End Function Public Function GetUnloadOption(ByVal dummy As String) As Integer Return Session.LibraryUnloadOption.Immediately End Function End Modulewww.nxjournaling.com
RE: How to identify parts that are having different properties applied in different Contexts?
May be I should consider an ER for this issue.
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V9.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks
RE: How to identify parts that are having different properties applied in different Contexts?
Michael Fernando (CSWE)
www.solidCADworks.com
Tool and Die Designer
Siemens NX V9.0 + PDW
SWX 2013 SP3.0 X64
PDMWorks 2013
Logopress3
FastForm Advance
FormatWorks