Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

C of G for Assembly Components 2

Status
Not open for further replies.

carlharr

Mechanical
Mar 20, 2012
389
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
 
Replies continue below

Recommended for you

Do you have the PMI tools? Could you use PMI Dimensions to show this on your assembly?
 
I would link attributes to your measurement expressions. This is made much easier in NX8 or later, but is possible in NX7.5.

Here are some other threads that may be of interest:
thread561-253382
thread561-318959
thread561-332899

www.nxjournaling.com
 
Hi Cowski,

The request in the link you've given (thread561-332899) 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
 
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
 
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.
 
As far as i know PMI -"Coordinate Note". is there in NX7.5 also.
kapil
 
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.
 
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
 
 http://files.engineering.com/getfile.aspx?folder=482938c3-f396-4331-99a5-118905fe8f31&file=coord-note.png
The line you want to change is:

Code:
ufs.Modl.AskMassProps3d(tagList, 1, AnalysisType.solidBody, AnalysisUnits.[highlight #FCE94F]poundsInches[/highlight], 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
 
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.
 
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
 
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

 
Hi Thomas, pushing the weight and C of G to excel is what we are trying to do, as described in thread561-332899 .

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
 
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
 
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.
 
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
 
carlharr said:
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...

www.nxjournaling.com
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor