Problems with batch exporting in NX 9.0
Problems with batch exporting in NX 9.0
(OP)
Hi All,
I have been trying to automate moving and translating files. I basically have all the code done and I'm using the "ug_inspect.exe -extract_all". I'm trying to export a whole assembly into one parasolid, and it seems like the only thing that is exporting is a body feature that is in the assembly itself.
I was wondering if anyone knows if there is a way to change this? Perhaps somewhere in NX's options? OR maybe in my code?
I have been trying to automate moving and translating files. I basically have all the code done and I'm using the "ug_inspect.exe -extract_all". I'm trying to export a whole assembly into one parasolid, and it seems like the only thing that is exporting is a body feature that is in the assembly itself.
I was wondering if anyone knows if there is a way to change this? Perhaps somewhere in NX's options? OR maybe in my code?
CODE --> batch
@ECHO on ECHO "%~1" SET "trufolder=%~1" SET "moddate=%DATE:~4,2%%DATE:~7,2%%DATE:~12,2%" SET "filename=%~n1" SET "shortname=%filename:~0,8%" SET "datefolder=D:\Quotations\Customer Files Recd\%shortname%\files recd %moddate%" MD "%datefolder%" CD /D C:\Program Files\Siemens\NX 9.0\UGII ug_inspect -extract_all "%trufolder%" "%trufolder%" move /-y "%trufolder%*.x_b" "%datefolder%\%filename%.x_b" start "%datefolder%\%filename%.x_b"





RE: Problems with batch exporting in NX 9.0
I don't think "ug_inspect" is up to the task. However, a journal could be made to open the assembly file, load the components, and export the assembly to a single parasolid file. With a few tweaks, such a journal could be made to work in 'batch' mode, where it is called with the command line utility 'run_journal'.
www.nxjournaling.com
RE: Problems with batch exporting in NX 9.0
RE: Problems with batch exporting in NX 9.0
RE: Problems with batch exporting in NX 9.0
www.nxjournaling.com
RE: Problems with batch exporting in NX 9.0
CODE --> vb
Option Strict Off Imports System Imports NXOpen Imports NXOpen.UF Imports NXOpenUI Imports NXOpen.Utilities Imports NXOpen.Annotations Module ChangeNoteWord Dim s As Session = Session.GetSession() dim lw as listingwindow = s.listingwindow Dim dp as part Dim wp as part Sub Main(args() as string) lw.open OpenPart(args(0)) Dim nc As NoteCollection = dp.Notes Dim notetext1 As String = "existing word" notetext1 = "COOL" Dim notetext2 As String = "new word" notetext2 = "TEST" Dim notestring() As String Dim nolines As Integer = 0 Dim found1 As Boolean = False Dim m1 As Session.UndoMarkId = s.SetUndoMark(Session.MarkVisibility.Visible, "M1") For Each a_note As Note In nc notestring = a_note.GetText() nolines = notestring.Length For i As Integer = 0 To nolines - 1 found1 = notestring(i).Contains(notetext1) If found1 = True Then notestring(i) = notestring(i).Replace(notetext1, notetext2) End If Next a_note.SetText(notestring) Next s.UpdateManager.DoUpdate(m1) Dim partSaveStatus1 As PartSaveStatus partSaveStatus1 = dp.SaveAs(("R:\Engineering\Program_Files\temp_file\temp.step")) partSaveStatus1.Dispose() End Sub sub OpenPart(byval thePart as string) Dim basePart1 As BasePart Dim partLoadStatus1 As PartLoadStatus basePart1 = s.Parts.OpenBaseDisplay(thePart, partLoadStatus1) dp = s.Parts.Display wp = s.parts.work partLoadStatus1.Dispose() End Sub Public Function GetUnloadOption(ByVal dummy As String) As Integer GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately End Function End Module