×
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

C of G for Assembly Components
2

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



Regards, Carl
NX 7.5 with TC 8.3
www.jcb.com

RE: C of G for Assembly Components

Do you have the PMI tools? Could you use PMI Dimensions to show this on your assembly?

RE: C of G for Assembly Components

(OP)
Hello Cowski,

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

We're working on something which will be in the 'next' release of NX which might give you this capability, being able to provide the X.Y.Z values (as Expressions) of any point relative to either Absolute space or some referenced CSYS.

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

As far as i know PMI -"Coordinate Note". is there in NX7.5 also.
kapil

RE: C of G for Assembly Components

Yes, the PMI 'Coordinate Note' is in NX 7.5.

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

Thanks, I had NX85 on the screen when i did my first test, then started NX75 and thought that i saw the coordinate note button, but when i was about to create the note i couldn't find the option, and after reading the posts above i get even more confused... See attached image. I'm getting blind!
( The option exists in the command finder...)

Regards,
Tomas

RE: C of G for Assembly Components

The line you want to change is:

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 Enum 

With 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

You can get to the 'Coordinate Note' by using the menu trail or...

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

(OP)
Good morning everyone,

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

Carl , you are asking for multiple things here, the center of gravity can be calculated since ,... ( -Only John has been around long enough to know...) The Coordinate Note only displays the calculated values, It obviously exists in 7.5. Since the functionality does exist in a licensed module, i would be surprised if Siemens made it freeware.
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

(OP)
Hi Thomas, pushing the weight and C of G to excel is what we are trying to do, as described in thread561-332899: NX 7.5 - Export assembly BOM with part COG's .

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

Here's the code to clean up the COG attributes when you are done with them.
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 Module 

www.nxjournaling.com

RE: C of G for Assembly Components

What I described has nothing to do with PMI, it will be an enhancement to basic NX.

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

(OP)
Hi Cowski,

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

Quote (carlharr)

NX replies 'Journal Execution Error' - 'no main found'.

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

John,
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

Not really. Those are actually intended to be additional, expression-based schemes to help users imbed more 'parametric' content into their models. The idea is that any of the modern NX modeling features which requires that you reference either points or vectors, now have the option to use one of these expression-points or expression-vectors, which will allow users to directly manipulate these points and vectors using expressions rather than having to construct additional features simply to get a point or vector that you can parametrically update.

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

(OP)
John,

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

(OP)
Cowski,

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

There is NO direct relationship between this new function and the automatic C-of-G point which are now being created when performing an Associative Measure Body. Outside of this part file, the actual X,Y,Z values of this C-of-G point, relative to the detail Master model, would be meaningless as this C-of-G point is relative to ONLY the body until you place the part in some other environment, like as a Component in an Assembly. Now the location of that point may be of use to you but only in the context of that particular Assembly, however here is where this new function can play a role, that is by establishing a set of Expressions, again relative to this particular Assembly, of those C-of-G points relative to either the Absolute space of that Assembly or to some CSYS defined in the Assembly. This does not happen automatically, but all the tools will be there for the user to establish these relationships and the associative data (the X,Y,Z expressions) which will now be there for whatever use you need.

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

(OP)
Hi John,

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

Starting with NX 8.0 it's much easier now to link Expressions to an Attribute and these can then be included in the Columns of either the ANT or even a Parts List 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

Carl, If you have the Advanced assemblies license,
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

(OP)
Ah that's good thanks John, think I'll come back to this when we upgrade and have a look what we can do.

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

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