Capture Screenshot in HyperMesh
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
Find more posts tagged with
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
Hi @Ayush01
are you directly writing this code inside userpage file?
if so change the line to
*jpegfilenamed(Capture.jpg)
@Q.Nguyen-Dai yes it works for .tcl file, but i am not sure in what format he has written.
if it is .mac file we have to write it inside brackets ().
I was saving it in a .cmf file.
I got it working now with the following code, and tcl format:
*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
*jpegfilenamed /Capture.jpg
Thank you for suggestions.
try removing quotes around Capture.jpg
try this:
*jpegfilenamed Capture.jpg