Background
I have studied the documentation section B.14 about how to run cgx in batch mode. But I cannot figure out a problem.
I have this FBD file:
# Change file name to the job name you used.
read C:\Users\m3\AppData\Local\Temp\result-layer0-to-layer3.frd
capt "Layer 0 to 3"
# Data set number depends on how may things you saved!
ds 2 e 7
gonly off
rot y
frame
hcpy png right
gonly on
rot r 90
frame
hcpy png front
rot r 90
frame
hcpy png left
rot r 90
frame
hcpy png back
rot y
rot u 90
frame
hcpy png top
rot d 180
frame
hcpy png bottom
quit
Good case
When I run this FBD file like this, everything is fine:
cgx_STATIC.exe -b C:\Users\m3\AppData\Local\Temp\shot-710971079.fbd
The PNG files are stored next to CGX executable as expected:
And the CGX logs are:
on a Windows 10 machine, nodename ADMINISTRATOR, release 10, version 10.0 19041, machine 8664
The win HOME was detected:C:\Users\m3
parameters:3 arguments:2
GL_MAX_EVAL_ORDER:32, mesh threads:1
C:\Users\m3\AppData\Local\Temp\shot-710971079.fbd opened
reading file
# Change file name to the job name you used.
file:C:\Users\m3\AppData\Local\Temp\result-layer0-to-layer3.frd opened
reading frd format
MODEL NAME: record: 1UModel: 3D model Date: 2023-Sep-11 UTC
record: 1UUSER
record: 1UDATE 11.september.2023
record: 1UTIME 13:12:17
record: 1UHOST
record: 1UPGM CalculiX
record: 1UVERSION Version 2.20
record: 1UCOMPILETIME Sat Apr 1 21:09:13 2023
record: 1UDIR
record: 1UDBN
record: 1UMAT 1RESIN
record: 2C 2362 1
reading Nodes
2362 nodes reallocated
record: 3C 5651 1
reading Elements
5651 elements reallocated
record: 1PSTEP 1 1 1
record: 100CL 101 1.000000000 2362 0 1 1
reading Dataset No:1
gen lc[0] ncomps:4
ncomps:3 nvals:3
record: 1PSTEP 2 1 1
record: 100CL 101 1.000000000 2362 0 1 1
reading Dataset No:2
gen lc[1] ncomps:6
ncomps:6 nvals:6
record: 1PSTEP 3 1 1
record: 100CL 101 1.000000000 2362 0 1 1
reading Dataset No:3
gen lc[2] ncomps:1
ncomps:1 nvals:1
record: 9999
gtol calculated:8.495190e-05
ready
# Data set number depends on how may things you saved!
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
create right.png
ready
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
create front.png
ready
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
create left.png
ready
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
create back.png
ready
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
create top.png
ready
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
create bottom.png
ready
Bad case
But when running the CGX with the -bg
parameter to run it in batch mode:
cgx_STATIC.exe -bg C:\Users\m3\AppData\Local\Temp\shot-710971079.fbd
No PNG image is created. The CGX logs are:
on a Windows 10 machine, nodename ADMINISTRATOR, release 10, version 10.0 19041, machine 8664
The win HOME was detected:C:\Users\m3
parameters:3 arguments:2
C:\Users\m3\AppData\Local\Temp\shot-710971079.fbd opened
reading file
# Change file name to the job name you used.
file:C:\Users\m3\AppData\Local\Temp\result-layer0-to-layer3.frd opened
reading frd format
MODEL NAME: record: 1UModel: 3D model Date: 2023-Sep-11 UTC
record: 1UUSER
record: 1UDATE 11.september.2023
record: 1UTIME 13:12:17
record: 1UHOST
record: 1UPGM CalculiX
record: 1UVERSION Version 2.20
record: 1UCOMPILETIME Sat Apr 1 21:09:13 2023
record: 1UDIR
record: 1UDBN
record: 1UMAT 1RESIN
record: 2C 2362 1
reading Nodes
2362 nodes reallocated
record: 3C 5651 1
reading Elements
5651 elements reallocated
record: 1PSTEP 1 1 1
record: 100CL 101 1.000000000 2362 0 1 1
reading Dataset No:1
gen lc[0] ncomps:4
ncomps:3 nvals:3
record: 1PSTEP 2 1 1
record: 100CL 101 1.000000000 2362 0 1 1
reading Dataset No:2
gen lc[1] ncomps:6
ncomps:6 nvals:6
record: 1PSTEP 3 1 1
record: 100CL 101 1.000000000 2362 0 1 1
reading Dataset No:3
gen lc[2] ncomps:1
ncomps:1 nvals:1
record: 9999
gtol calculated:8.495190e-05
ready
# Data set number depends on how may things you saved!
2 L 101 1.000000 STRESS Mises
Extremal values from displayed mesh-entities:
max:1.165530e-03 at node:1790
min:0.000000e+00 at node:1
Question
I studied the documentation but I could not figure out why with -bg
parameter, CGX wonāt create the PNG files.
I have to run CGX in batch mode since Iām going to run it by another program to create the PNG files. I donāt want the user of the other program to observe the pop-up of the CGX graphic window.