CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ANSYS Meshing & Geometry (
-   -   [ICEM] Replay control - save picture (

zboud March 16, 2010 10:18

Replay control - save picture

Is there a command to save a picture using ICEM's replay control? Recording the "save picture" process does not add any line to the script, and I found no topic with "picture" in it in the programmer's guide...


Anorky March 16, 2010 12:30

ic_print args

there is an option, use:

f.e to print a jpeg file:

ic_print format "jpeg" jpeg_quality "100" test.jpeg

or look for print or ic_print in the programmer manual for more options, it's under the "Miscellaneous Mesh Editor Functions" heading.

Good luck

zboud March 16, 2010 14:05

Thanks. Now I just need to find the commands to set the parametric fitted view :)

Anorky March 17, 2010 14:35

You mean to get the same image everytime?

I think you can find that under the arguments of the ic_print command in the manual.

zboud March 17, 2010 16:41

I was meaning isometric view...sorry about that.


ic_print args
Write hardcopy or image file output. The arguments are:
format form: one of: ps ppmx tiffgif jpegrgb win
generate_new generate a new filename based on the outfile argument
invert on : swap black and white
jpeg_qualityqual : the quality factor for JPEG, between 0 and 100
landscape on: if 1 then swap the X and Y axes
outfile filename: the file to create (without the suffix which is automatically added)
ps_color opt: either color, gray, or mono
ps_direct on: if 1 then write a vector-based ps output, otherwise do raster
ps_frame on: if 1 draw a frame around the ps output
ps_label text: the label to put at the bottom right of the postscript output
ps_title text: the title to put at the top of the postscript output
scale val: scale factor
send_to_printeron: if 1 then the postscript file will be printed using lp
Seems like it's not in the function's arguments. And I found no replay function to tell Icem "view the mesh from there" or "set the isometric view and fit it"...

Anorky March 18, 2010 03:36


I have been thinking on this and I actually haven't found yet how to do this...
May be ic_view is the solution, although I only managed to set it to one view.

ic_view home

If you figure out how to define the home view you're problem is solved I think...

good luck

zboud March 18, 2010 08:21

Yeah, I did not find anything either, besides this function. I think the "home" view could be modified but I don't know where.

Right now I use CFX-Pre to get a picture of my mesh, but the result is not so good.

Thanks for your help! :)

Anorky March 18, 2010 09:16

you're welcome, if I find a solution I will let you know

PSYMN March 20, 2010 22:04

There may be a way, but I don't know what it is either.

How about just rotate it to the right direction... SO fit to home and then rotate to 1 1 1 right?

Here is a sample script of something else, that might help give you some ideas...

global tdv_current_viewer
set rotate_angleX 1
set rotate_angleY 2
set turns 5

set angleX [expr ($rotate_angleX * 3.14159) / 180]
set angleY [expr ($rotate_angleY * 3.14159) / 180]

for {set cur_angle 0} {$cur_angle < [expr 360 * $turns]} {set cur_angle [expr $cur_angle + $rotate_angleX]} {
tdv_rotate_axis $tdv_current_viewer 0 1 0 $angleY
#tdv_rotate_axis $tdv_current_viewer 1 0 0 $angleX
tdv_trans_update $tdv_current_viewer

Will Anderson August 20, 2010 03:37

The command
doesn't work when ICEM is run in batch mode (no GUI).

Does anybody have a work around? How to generate hardcopies in postscript from ICEM sessions which are run in batch mode?

PSYMN October 5, 2010 18:35

Needs the image to be displayed before it can be captured...
Hello Will, I see you found this post... Long ago.

Yes, the image capture requires the image to be displayed and therefore can not be done in batch without the GUI...

however, if you run your script with -script instead of -batch, it will launch the GUI and can take images...

ayush June 28, 2011 00:44

Replay File query
Is there a way to save a replay file from within a replay file ?

alicefer November 16, 2014 17:29


How can I take a photo of a project using tetra mesh in icemcfd?

rafacerq June 16, 2016 14:33

I'm trying to use this "ic_print" in my TCL script, but I it is not working.

How can I make this function to work? The manual is a bit vague...

Does anyone have a example to share?

All times are GMT -4. The time now is 11:40.