Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Select Bundle with Journal NXOpen API

Status
Not open for further replies.

BBow

Mechanical
Oct 5, 2015
28
0
0
US
Is there a way, or code somebody already has to select bundles for different mach's inside of NX?

We have limited amount of mach 3 bundles, so our tool makers on the floor have had them taken away, but now they cannot use NX to pull part weights. We would like to be able to get an NXOpen program to run that would:
1. Select a Mach 3 bundle
2. Run a 'measure bodies'
3. Do a 'select all' in the NX window
4. Read the 'mass', and output to a listing window
5. Close the 'measure bodies' dialogue
6. Unselect the mach 3 bundle
 
Replies continue below

Recommended for you

Sadly I don't think it is possible to set bundle via NXOpen, the only way i know to do it through NX is via Gateyway -> File -> Utilities -> Select Bundles. But it would sure be nice with a quicker way of changing that.

What mach bundle are your tool makers running? Our lowest mach level is Mach 1 (Design) and the measure bodies tool is available there as well.

But if they are only getting weights from the assembly then the mass attribute should contain the same information (under the assumption you have NX configured to update weight on save, and the tool makers are using the model reference set). The component and total assembly weight is available in the assembly navigator via the weight column see the image below.

URL]
 
They are running a 1100 bundle (I think), maybe 1000. When we took away the 3100 from them 'measure bodies' went away, however I never thought about turning on the auto weight on save. That might suffice for what we need. Thanks for the idea! Do you notice any save/update performance losses when you do that? That is the one thing that happens when we have full assembly 'measure bodies' hanging out there, it slows all work in the model dramatically, however that's more dynamic than the 'update weight on save'. I'll definitely give it a try.
 
bbow: We have not noticed any performance issues with weight on save, thought we have other issues related to nx weight management but performance is not one of them.

cowski: No I do not think you need the adv assembly license to activate "update weight on save" but you do need that license to access other weight management functionality such as on the fly weight updates.

Weight properties and no adv assembly license.
URL]


Weight properties with adv assembly license, gives the possibility to update the mass without saving the part.
URL]
 
I have a similar problem with a mix of Mach 1 and Mach 3 licences and have been looking for ways to reduce Mach 3 usage. This journal will update the mass but only requires a Mach 1 licence to run it.

Code:
Option Strict Off
Imports System
Imports NXOpen

Module Module1

    Public s As Session = Session.GetSession()

    Sub Main()

        Dim workPart As Part = s.Parts.Work

        Dim objects2(0) As NXObject
        objects2(0) = workPart
        Dim massPropertiesBuilder1 As MassPropertiesBuilder
        massPropertiesBuilder1 = workPart.PropertiesManager.CreateMassPropertiesBuilder(objects2)

        massPropertiesBuilder1.UpdateNow()

    End Sub

    Public Function GetUnloadOption(ByVal dummy As String) As Integer

        'Unloads the image immediately after execution within NX
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately

    End Function

End Module


Mike Hyde
NX8.5 with TC9.1
Moving to NX10 with TC11.2
 
Petulf, after what you said about your Mach1 bundle being able to still perform 'measure bodies' I gave it a try this morning again, and it worked fine. I don't know what happened in the past when we tried it after taking away the Mach3 potential from the tool makers, but we had a couple issues and then from there just went on with the assumption it wasn't working. Now it is....... Not sure what happened but glad we don't have to worry about it.
Thanks for the help, and info.
 
Status
Not open for further replies.
Back
Top