! TITLE: create_image.mac (MANAGEMENT) ! ! ! OBJECTIVE: ! ! This sub-macro creates a graphics image file of the currently displayed ! ANSYS graphics window. ! ! COMMAND SYNTAX: ! ! ! (1) (2) (3) (4) ! CREATE_IMAGE, imgtyp, orient, revrs, colr ! ! ! ARGUMENTS: ! ! (1) imgtyp = image format type: Valid inputs are: ! ! 'pscr' - encapsulated postscript (EPS) ! ! 'tiff' - tagged image file format (default) ! ! 'epsi' - encapsulated postscript with TIFF preview ! ! 'bmp' - bitmap ( PC only ) ! ! 'wmf' - windows metafile format ( PC only ) ! ! 'emf' - enhanced metafile format ( PC only ) ! ! 'jpeg' - Joint Photographic Expert Group format ! ! (2) orient = image orientation on the page ! ! 0 = landscape (default) ! ! 1 = portrait ! ! (3) revrs = reverse video background ( print background ) ! ! 0 = reverse video background ( white vackground ) (default) ! ! 1 = normal ( black background ) ! ! (4) colr = color of image ! ! 0 = color print ( at specified color depth ) (default) ! ! 1 = black and white ! ! 2 = greyscale ! ! ! DESCRIPTION: ! ! This macro creates a graphics file of the current output window in the ! specified graphics format. If the image is a TIFF or EPS format, then ! it compresses the file. The ANSYS /UI commmand is used to perform this ! function. ! ! ! ! *get,prkey_,active,0,prkey /nopr ! /replot ! imgtyp_=arg1 orient_=arg2 revrs_=arg3 colr_=arg4 ! *get,imgptyp_,parm,imgtyp_,type ! *if,imgptyp_,eq,0,then imgtyp_='tiff' *endif ! *if,orient_,eq,0,then orient_='landscape' *elseif,orient_,eq,1,then orient_='portrait' *else orient_='portrait' *endif ! *if,revrs_,eq,0,then revrs_='reverse' *elseif,revrs_,eq,1,then revrs_='norm' *else revrs_='norm' *endif ! *if,colr_,eq,0,then colr_='color' *elseif,colr_,eq,1,then colr_='mono' *elseif,colr_,eq,2,then colr_='grey' *else colr_='color' *endif ! /ui,copy,save,%imgtyp_%,graph,%colr_%,%revrs_%,%orient_%,yes ! *set,imgtyp_, *set,orient_, *set,revrs_, *set,colr_, *set,imgptyp_, ! *if,prkey_,eq,1,then /go *endif