
Open a drawing that has several dimensions on it then run the journal. If you want an example, look at the creating QC number example on this site. Perhaps a custom form will allow the user to input some design parameters, then the program will perform some calculations and create new files as necessary. If your company creates custom widgets, you can design a custom application to help you with that.


If this is something you will be doing on a daily basis, you might want to create a journal so that it will be done at the click of a button.Įxporting files is just a simple example. You can use it to add new functionality to NX, or automate your processes.įor instance, if you need to export all the solid bodies from layer 1 to a datestamped file in a certain folder of your network drive, you could go to file -> export, select the bodies, name the file, and press OK. TheSession.DeleteUndoMark(markId1, Nothing)Ī journal allows you to programmatically control NX. TheSession.SetUndoMarkName(markId1, "Print") TheSession.DeleteUndoMark(markId2, Nothing) PrintBuilder1.PrinterText = "Bullzip PDF Printer" MarkId2 = theSession.SetUndoMark(, "Print") TheSession.SetUndoMarkName(markId1, "Print diálogo") MarkId1 = theSession.SetUndoMark(, "Start") ImageFile = sFilename & "-" & aanzicht & ".png" Public Function ExportImage(ByVal aanzicht As String) TheSession.DeleteUndoMark(markId2, null) PrintPDFBuilder1.Filename = displayPart_Name

MarkId2 = theSession.SetUndoMark(, "Export PDF") TheSession.SetUndoMarkName(markId1, "Export PDF") String displayPart_Name = displayPart_Path.Replace(".prt", ".pdf") (imageFile, image_format, background_color) ImageFile = sFilename & "-Layout" & ".png" Layout1 = ("VBLAYOUT", layoutDefinition1, True) LayoutDefinition1.SetView(1, 1, modelingView3) LayoutDefinition1.SetView(0, 1, modelingView2)ĭim modelingView3 As ModelingView = CType(("RIGHT"), ModelingView) LayoutDefinition1.SetView(1, 0, modelingView1)ĭim modelingView2 As ModelingView = CType(("TFR-ISO"), ModelingView) LayoutDefinition1.SetView(0, 0, modelingView0)ĭim modelingView1 As ModelingView = CType(("FRONT"), ModelingView) (4, layoutDefinition1)ĭim modelingView0 As ModelingView = CType(("TOP"), ModelingView) NErrs2 = (id1)ĭim layoutDefinition1 As LayoutDefinition 'If layout VBLAYOUT exists then delete it firstĭim layout99 As Layout = CType(("VBLAYOUT"), Layout) If Right(sFilename.ToLower, 4) = ".prt" Then sFilename = Left(sFilename, sFilename.Length - 4) Public background_color As UFDisp.BackgroundColor =

Public image_format As UFDisp.ImageFormat = Public openSession = UFSession.GetUFSession() Public theSession As Session = Session.GetSession() Because the photos are with wireframe view or can't be printed as a pdf file. The point is that I have done some test, but the journal dosen't work correctly. I want to create a journal for multiple photos geration and print them on a PDF file.
