Select Bundle with Journal NXOpen API
Select Bundle with Journal NXOpen API
(OP)
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
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





RE: Select Bundle with Journal NXOpen API
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.
RE: Select Bundle with Journal NXOpen API
RE: Select Bundle with Journal NXOpen API
www.nxjournaling.com
RE: Select Bundle with Journal NXOpen API
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.
Weight properties with adv assembly license, gives the possibility to update the mass without saving the part.
RE: Select Bundle with Journal NXOpen API
RE: Select Bundle with Journal NXOpen API
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 ModuleMike Hyde
www.astonmartin.com
NX8.5 with TC9.1
Moving to NX10 with TC11.2
RE: Select Bundle with Journal NXOpen API
Thanks for the help, and info.