We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
Platform

Platform

Topics related to optiSLang, HPC, DesignXplorer, Cloud and more.

How to export high resolution images in APDL

    • gryphus
      Subscriber

      Hi,

      I am trying to export images in APDL.

      So far I found two solutions to do so:

      Using the /IMAGE command:

      This way I can specify the path where the image is stored but not the resolution (/GFILE, 2400 does not seem to have an impact)


      Using /SHOW,PNG and plotting to png format:

      This way I can specify the resolution by /GFILE but I can't change the save path.


      Is there a way to achieve both?

    • gryphus
      Subscriber
      I think I found a solution to my problem:
      The /SHOW command has an option to specify a filename.
      So the solution is something like
      /SHOW,FILENAME,PNG
    • gryphus
      Subscriber
      My solution did not actually work.
      The png files produced by /SHOW,FILENAME,PNG seem to be corrupted somehow.
      So if anybody has another solution please share it with me.
    • mrife
      Ansys Employee
      Can you show us all of the commands used to generate the PNG file. Often reverting back to the terminal and redoing the plot will help here; or the Close option in /SHOW (purging the graphics buffer). So let's say you wanted an element plot:
      EPLOT
      /SHOW,MyElementPlot,png
      eplot
      /show,close
      /show,term
      /rep
      If doing the above can you then open MeElementPlot.png ?

      mike
    • Vignesh Saravanan
      Subscriber

      The complete set of commands are mandatory to plot the images. The same can be used in batch runs too..

      1. For plotting elements and models
      2. For plotting results (nodal solution plots)

       

      For plotting elements and model:
      /SHOW,PNG,,0
      PNGR,COMP,1,-1  
      PNGR,ORIENT,HORIZ   
      PNGR,COLOR,2
      PNGR,TMOD,1 
      /GFILE,800, 
      !*  
      /CMAP,_TEMPCMAP_,CMP,,SAVE  
      /RGB,INDEX,100,100,100,0
      /RGB,INDEX,0,0,0,15 
      /REPLOT 
      /CMAP,_TEMPCMAP_,CMP
      /DELETE,_TEMPCMAP_,CMP  
      /SHOW,CLOSE 
      /DEVICE,VECTOR,0
      !*  

       

      For Plotting nodal results:
      /RGB,INDEX,100,100,100, 0   
      /RGB,INDEX, 80, 80, 80,13   
      /RGB,INDEX, 60, 60, 60,14   
      /RGB,INDEX, 0, 0, 0,15  
      /SHOW,PNG,,0
      PNGR,COMP,1,-1  
      PNGR,ORIENT,HORIZ   
      PNGR,COLOR,2
      PNGR,TMOD,1 
      /GFILE,800, 
      !*  
      /REPLOT 
      /SHOW,CLOSE 
      /DEVICE,VECTOR,0
      !*  

       

      Have a Great day?

Viewing 4 reply threads
  • The topic ‘How to export high resolution images in APDL’ is closed to new replies.