C of G for Assembly Components
C of G for Assembly Components
(OP)
Hi,
One of our Engineers has asked how we can display associatively the C of G information for components of an assembly, for use in a weight analysis spreadsheet.
I've added associative Body Measurements (using analysis > measure bodies) into the part navigator, as this puts a point at the component's c of g. But, I can't find a way to permanently display the co-ordinates of these points. I've tried attaching a measure to the point but it only gives the minimum distance to ABS, and also tried attaching an associative datum point on top of the c of g point, but co-ordinates don't display in the details panel.
Does anyone know how to permanently display the co-ordinate values for these points placed at component C of Gs, or any other better method to permanently show the C of G values for components of an assembly?
Thanks in advance, Carl
One of our Engineers has asked how we can display associatively the C of G information for components of an assembly, for use in a weight analysis spreadsheet.
I've added associative Body Measurements (using analysis > measure bodies) into the part navigator, as this puts a point at the component's c of g. But, I can't find a way to permanently display the co-ordinates of these points. I've tried attaching a measure to the point but it only gives the minimum distance to ABS, and also tried attaching an associative datum point on top of the c of g point, but co-ordinates don't display in the details panel.
Does anyone know how to permanently display the co-ordinate values for these points placed at component C of Gs, or any other better method to permanently show the C of G values for components of an assembly?
Thanks in advance, Carl
Regards, Carl
NX 7.5 with TC 8.3
www.jcb.com





RE: C of G for Assembly Components
RE: C of G for Assembly Components
Here are some other threads that may be of interest:
thread561-253382: Drafting Mass, Inertia, CG automatically
thread561-318959: Adding part weight to drawing
thread561-332899: NX 7.5 - Export assembly BOM with part COG's
www.nxjournaling.com
RE: C of G for Assembly Components
The request in the link you've given (thread561-332899: NX 7.5 - Export assembly BOM with part COG's) from MrLLH is exactly what we are trying to do.
I'll give the journal a try, will come back to you in a bit.
Carl
Regards, Carl
NX 7.5 with TC 8.3
www.jcb.com
RE: C of G for Assembly Components
That works very well, thank you!
Could you tell me how to change units from imperial to metric in the code?
Also, is there a way we can quickly and automatically remove all the COG_X, COG_Y and COG_Z component properties from the assembly once we've finished?
As they are unassociative, we'll need to take them back out once we've done with them, to prevent future errors.
Thanks again, Carl
Regards, Carl
NX 7.5 with TC 8.3
www.jcb.com
RE: C of G for Assembly Components
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: C of G for Assembly Components
It updates if i change the model. Model attached.
Regards,
Tomas
RE: C of G for Assembly Components
kapil
RE: C of G for Assembly Components
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: C of G for Assembly Components
( The option exists in the command finder...)
Regards,
Tomas
RE: C of G for Assembly Components
CODE
ufs.Modl.AskMassProps3d(tagList, 1, AnalysisType.solidBody, AnalysisUnits.poundsInches, 0.0375, AnalysisAccuracy.useAccuracy, dblAcc_Value, dblMass_Props, dblStats)change the highlighted portion to one of the values in the AnalysisUnits enumeration:
CODE
Enum AnalysisUnits As Integer poundsInches = 1 poundsFeet = 2 gramsCm = 3 kilogramMeter = 4 End EnumWith some more work, this journal can provide an automated, associative solution.
A measure body feature can be made for each component, and it can be compiled and registered with NX to run whenever a component is added to an assembly to keep it up to date.
I hesitate to put that much work into it though, because when you upgrade NX you may get the needed functionality OOTB, as Toost has demonstrated.
I'll write a secondary journal to delete the attributes when I get time and post it here.
www.nxjournaling.com
RE: C of G for Assembly Components
PMI -> Specialized -> Coordinate Note...
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: C of G for Assembly Components
Thank you for the help, unfortunately we don't have a PMI license, so while the method looks good I can't test it!
John, intetesting to hear that, I think it will be very useful to be able to locate component C of Gs OOTB.
Do you know which version of NX might contain this functionality?
Cowski, thanks again for the journal, I'll make the changes and send it to our Engineer to use.
Would be good if we could clear all these attributes from the assembly once complete, but in the meantime I'll just ask him to do it manually.
Thanks all for your help.
Regards, Carl
Regards, Carl
NX 7.5 with TC 8.3
www.jcb.com
RE: C of G for Assembly Components
I dare to say that the request is pretty unusual, Reading the cog from labels on screen seems very unpractical, i would have better understanding if you wanted to push everything to say Excel or similar.
NX also has the Weight Management option included in the advanced assemblies license, It could probably be enhanced in some ways to maybe manage this request.
Regards,
Tomas
RE: C of G for Assembly Components
I don't have PMI but presumably that's how it displays, on-screen as a mark-up?
In that case I agree, it's not really what we are looking for.
What we need is the information to be asscoiative, and displayed in the assembly navigator.
It looks like this may be possible in the future, but for now we will use the journal which does give us values ready to export to Excel.
Regards, Carl
Regards, Carl
NX 7.5 with TC 8.3
www.jcb.com
RE: C of G for Assembly Components
Run it on the assembly, it will check each component and delete the "COG_X", "COG_Y", and "COG_Z" attributes.
CODE
Option Strict Off Imports System Imports NXOpen Imports NXOpen.UF Imports NXOpen.Assemblies Module DeleteAttribute 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() Try Dim c As ComponentAssembly = dispPart.ComponentAssembly 'to process the work part rather than the display part, ' comment the previous line and uncomment the following line 'Dim c As ComponentAssembly = workPart.ComponentAssembly If Not IsNothing(c.RootComponent) Then '*** insert code to process 'root component' (assembly file) 'lw.WriteLine("Assembly: " & c.RootComponent.DisplayName) 'lw.WriteLine(" + Active Arrangement: " & c.ActiveArrangement.Name) '*** end of code to process root component 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("Deleting of COG attributes 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()) child.DeleteAttributeByTypeAndTitle(NXObject.AttributeType.Real, "COG_X") child.DeleteAttributeByTypeAndTitle(NXObject.AttributeType.Real, "COG_Y") child.DeleteAttributeByTypeAndTitle(NXObject.AttributeType.Real, "COG_Z") '*** end of code to process component or subassembly reportComponentChildren(child, indent + 1) Next End Sub '********************************************************** Public Function GetUnloadOption(ByVal dummy As String) As Integer Return Session.LibraryUnloadOption.Immediately End Function '********************************************************** End Modulewww.nxjournaling.com
RE: C of G for Assembly Components
This new capability, which will be in the 'next' version of NX (this is all that I'm allowed to say at the moment but if you're coming to Dallas for PLM Connections in June, you'll see it), is an additional tool found under the 'Analysis' menu pull-down. It will be a function where you can create a 'measurement' feature, along with the appropriate Expressions for the X,Y,Z values, of a Point relative to either Absolute or a referenced CSYS. This will be an Associative feature which will update the expression values if, in the case of the Absolute case, the point moves, or in the case of the referenced CSYS, if either the point or the CSYS moves. This will work in either a single piece part or in the context of an Assembly.
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: C of G for Assembly Components
Just ran this new journal, but NX replies 'Journal Execution Error' - 'no main found'.
Regards, Carl
Regards, Carl
NX 7.5 with TC 8.3
www.jcb.com
RE: C of G for Assembly Components
That's weird, I tested on NX 7.5 native with no problems. The error makes it sound like it cannot find the Sub Main(), which is clearly there...
I'll attach the journal file I used in my testing, see if you get the same error...
http://files.engineering.com/download.aspx?folder=...
www.nxjournaling.com
RE: C of G for Assembly Components
I noticed around NX 7.5 that a Point and Vector type showed up in the expression types; also some expression functions refer to a list as its input/output. However, support for these types (in 7.5 and 8) seems to be spotty at best (no way to extract X, Y, and Z values from a point, for instance); are these new functions extensions of these new types?
www.nxjournaling.com
RE: C of G for Assembly Components
The new function that I'm talking about is purely a 'read-only' type function, albeit fully associative, which extracts the X,Y,Z values of a point as expressions. These expressions will be then available for use in other expressions or features, no different than something like the Measurement Expressions which get created for items like Mass, Weight, etc when using the Analysis function 'Measure Body' today.
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: C of G for Assembly Components
I do have a question about the new functionality, but I'm struggling to write it down here in a way that makes sense.
I'll give it a go...
Presently, analysis - measure bodies will create an associative point at the CoG of a component.
But there isn't a way to display the co-ordinate locations for these points in the ANT.
Does the new functionality, creating expressions for location of this point, either:
1. exist as part of the measure bodies command
or 2. exist as a separate measurement in the part navigator, after the measure bodies command is done (to create the point)
The reason I ask is, we are trying to tie these values back to the CofG locations of specific component instances.
So for example, the ANT needs to look something like this:
NAME MASS COGX COGY COGZ
PARENT ASSEMBLY
COMPONENT_1 14.2 100.1 99.5 45.1
COMPONENT_2 02.1 41.1 47.1 10.1
COMPONENT_2 02.1 50.4 10.2 5.1
COMPONENT_3 10.4 78.9 98.4 41.1
... so that these 5 columns can be exported straight to Excel.
How will the new measurments be related back to components from which the CofG points originate?
Thanks, Carl
Regards, Carl
NX 7.5 with TC 8.3
www.jcb.com
RE: C of G for Assembly Components
Yours worked fine, I may have missed something when I did the copy and paste, its been a busy day!
Thank you very much for your help,
Regards Carl
Regards, Carl
NX 7.5 with TC 8.3
www.jcb.com
RE: C of G for Assembly Components
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: C of G for Assembly Components
Thank you for the explanation, I understand now that the new measurement ("point locator") is carried out separately to the "measure bodies" command.
However the most important question is, how do we relate this info back to the components, so that it can be displayed in the ANT?
Perhaps there's a way to create a component property at assembly level, that relates back to the new expression values?
Apologies if I'm going on about the ANT, but it is important because we're talking about assemblies with 100's of components.
As I understand it, all the "measure bodies" and new "point locator" features will be in the feature navigator. So, I'm imagining that we could rename these features to indicate the related component part number (and specific instance), in order to locate the info when required, but it would then still be a manual 'input values into excel' process. Of course its better than not having values at all, but it's still going to be pretty time consuming.
It's a shame CofG locations aren't stored automatically for all solid bodies, as a property along with weight, so that their "relative to work part ABS" location could always be displayed in the ANT!
Thank you for your help, regards Carl
Regards, Carl
NX 7.5 with TC 8.3
www.jcb.com
RE: C of G for Assembly Components
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: C of G for Assembly Components
Do you have the customer default : Analysis-Weight managment - Generate Weight data = on ?
If so, you should have the data you request available in Teamcenter.(!)
Select a partfile in NX, RMB the node in the Assembly navigator- Properties, Weight tab, verify that the weight has been calculated. and that the part has been saved to Teamcenter.
In teamcenter, find the same Item as the above, open the Item revision, select the model then RMB - Named References. In the list there should be an UGPART-MASSPR, select it and press Open button.
Now, from here you probably need help from a Teamcenter specialist to collect the data you need.
- Maybe there is existing functionality in the Structure Manager ?
Regards,
Tomas
RE: C of G for Assembly Components
Tomas, I've just looked and you're right, the mass and center info is stored in Teamcenter.
Presumably the CofG is relative to the component's own ABS co-ordinates but, it's good to see the info is there, perhaps this could be shown in the ANT of an assembly (relative to assembly ABS) in the future.
Or, we could link the expressions from the new point locator measurements back to the component properties in the assembly as John says...
All things I'll have to look at when we've upgraded.
In the meantime, I've just tested cowski's (sorry don't know your name) journals with our Engineer on the real assembly.
They are working fine and providing the info we need, so we'll be using them for now.
Thank you all for your help, regards Carl.
Regards, Carl
NX 7.5 with TC 8.3
www.jcb.com