Export Images with given screen resolution

Altair Forum User
Altair Forum User
Altair Employee
edited July 2023 in Community Q&A

Hi,

 

I would like to export all the pages in my hyperview with required screen resolution. In Hyperview there is an option in Menu- Export* - Multiple Images - old/Advanced where I can specify width and height seperatly. But this option is restrictred to 'Export each window separately total page size'. This means If i have 4 windows in a page this option is exporting images of individual window with specified resolution.

 

I would like to export all the pages with required width and height.

 

At present I am trying to using command window with following commands by opening every page:

 

hwi GetSessionHandle sess

sess CaptureScreenToSize png 01.png 1400 593

 

I am trying to write a tcl/tpl script to automate this process (Export all pages with given width and height).

 

It would be appreciated if someone can help me with this code.

 

Thanks in advance

 

Agassi

Tagged:

Answers

  • Rahul Rajan_21763
    Rahul Rajan_21763 New Altair Community Member
    edited February 2018

    Sorry for the late reply.I guess below post should help you for your query,

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited February 2018

    Sorry for the late reply.I guess below post should help you for your query,

     

    Hi, I have seen this topic before,  but this is not what I am looking for. Please let me know if there is any other option.

     

    Or let me know the code for function Export* - Multiple Images - old/Advanced , So that I can modify ' Export each window separately total page size' to Export each page seperatly with required page size.

     

    Regards

    Agassi

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited February 2018

    Hi Agassi,

    in the script exchange databases there's a tcl script (No 41044) which does almost what you desire:  It creates a pic (of the page) with a factor in the resolution.

    So you can export pics at higher resolution, but they still depend on your windows size.

    i.e. in my case the standard pic export will lead to a 1376*640 pic.  With this script the pics a x4 quality -> 5528*2600. 

    Does that help?

      :-)

        CAE-Guru

  • Jason_Yin
    Jason_Yin Altair Community Member
    edited May 2018

    I know your confuse, I also met this problem before. Acturally Altair don't want customer change the size of graphic area, because it will cause some error of layout.

     

    But if you want to change the size of graphic, you can use this code for reference.

     

    place .mainFrame.center.f3.center_frm.graphicfrm -width 1432 -height 715 -x 42  -y 0

     place .mainFrame.center.f3.center_frm.graphicfrm -width 800 -height 500 -x 42  -y 0

     

    Jason

    <?xml version="1.0" encoding="UTF-8"?>Capture2.PNG

    <?xml version="1.0" encoding="UTF-8"?>Capture3.PNG

  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited August 2018

    Hi @Jason_Yin

     

    In this case if we are resizing the window size manually by scrolling up command window.

    resizedAfterplacing.JPG.ad86225ee2a54e8cbe91615325c18e9b.JPG

     

    The available window (After resizing by using command place) is not resizing automatically it is going beyond the screen. jason_yin is there any solution for that so it should automatically resized if user manually tries to resize it.

     

     

     

    Thanks,

    Vikas Kumar

     

     

    <?xml version="1.0" encoding="UTF-8"?>beforeAfterplacing.JPG

  • Jason_Yin
    Jason_Yin Altair Community Member
    edited August 2018

    Vikas Kumar

     

    There have no method to let the window resizing automatically after you use this code. As I told, Altair don't want customer change the size of graphic area, because it will cause some error of layout.

     

    If you want to adjust the window to normal(which can resize automatically), you need to delete the hmsettings.tcl & hwsettings.xml files and restart the HW.

     

    In your HW, you can type this code.

     

    place .mainFrame.center.f3.center_frm.graphicfrm -width 550 -height 350 -x 84  -y 0

     

  • Aravind Vissamsetty
    Aravind Vissamsetty Altair Community Member
    edited March 2022

    Hi Agassi,

    in the script exchange databases there's a tcl script (No 41044) which does almost what you desire:  It creates a pic (of the page) with a factor in the resolution.

    So you can export pics at higher resolution, but they still depend on your windows size.

    i.e. in my case the standard pic export will lead to a 1376*640 pic.  With this script the pics a x4 quality -> 5528*2600. 

    Does that help?

      :-)

        CAE-Guru

    Hello.

    I know it is quite unlikely to expect a response for such an old post, but where can I find the link to that script? I have gone through the script exchange and could not find the one that you described here.

  • Akash Purushothaman
    Akash Purushothaman Altair Community Member
    edited July 2023

    Hi Agassi,

    in the script exchange databases there's a tcl script (No 41044) which does almost what you desire:  It creates a pic (of the page) with a factor in the resolution.

    So you can export pics at higher resolution, but they still depend on your windows size.

    i.e. in my case the standard pic export will lead to a 1376*640 pic.  With this script the pics a x4 quality -> 5528*2600. 

    Does that help?

      :-)

        CAE-Guru

    hello 
    could you pls give the link to it.
    I am unable to find the script