Capture Screenshot in HyperMesh


Updated by Altair Forum User
Hello,
Complete newbie here.
I am trying to highlight a few elements and capture screenshot in HyperMesh.
This is the code I have put together by referring to command.cmf file:
*unmaskall()
*createmark(systems,1) 'all'
*maskentitymark(systems,1,0)
*createmark(elements,1) 101 102 103 104
*maskentitymark(elements,1,0)
*maskreverse(elements)
*createmark(elements,1) 101 102 103 104
*numbersmark(elements,1,1)
*window(0,0,0,0,0)
after 500
*jpegfilenamed 'Capture.jpg'
Everything works as expected except for the last command to save screenshot. Interestingly, if I give this last command separately in the command window, it works fine.
Any ideas?
Thanks,
Ayush