Exporting JPEG without Interactive Session

Does anyone know how to export an image without having a interactive session open? I'm trying to create an export by just calling a journal from the command line, no NX GUI open. I can export a *.jt file like this, hoping there is a way to do the same for a image also. Preferably in vb.

Thanks!

No, there must be a GUI displayed to export an image. When NX is run in batch mode (command line, no GUI); it conserves memory by not keeping track of what would be displayed to the user. As such, there is no information to export to an image file.

Thanks, I saw a post on the Siemens site (https://community.sw.siemens.com/s/question/0D54O000061xH1H/create-image...) about "UF_DISP_batch_shade" which looks like a function in a C library, thought there might be something like that in vb also. Apparently the UF_DISP_batch_shade can export an image in batch mode.

You might be in luck. The .BatchShade and .BatchShadeOptions methods are the .net wrappers for the corresponding C functions. I don't currently have any example code for these methods.

So it looks like it might work. Worked on a simple model, but with a large model it crashed. Basically I used the below:

Dim cwd1 As String = CurDir()
Dim FilePathOut As String
FilePathOut = cwd1 + "\outputJPEG.jpg"

'fit part to view
workPart.ModelingViews.WorkView.Fit()

'capture image for jpeg and write to file
Dim X_size As Int32 = 640
Dim Y_size As Int32 = 640

ufSession.Disp.BatchShade(FilePathOut, X_size, Y_size, UFDisp.ShadeMethod.Preview)

If I played with the last argument (e.g., ~.Preview vs ~.somethingelse) it seemed to get further before crashing. The model it crashed on is pretty horrible (big and messy), but I can export that model using the GUI so not sure what the issue is.