


{"id":251916,"date":"2023-02-28T13:37:29","date_gmt":"2023-02-28T13:37:29","guid":{"rendered":"\/forum\/forums\/topic\/python-script-to-save-total-deformation-and-stress-in-a-specific-location-image\/"},"modified":"2023-02-28T14:53:46","modified_gmt":"2023-02-28T14:53:46","slug":"python-script-to-save-total-deformation-and-stress-in-a-specific-location-image","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/python-script-to-save-total-deformation-and-stress-in-a-specific-location-image\/","title":{"rendered":"Python Script to save Total deformation and Stress in a specific location (image"},"content":{"rendered":"<p>When I am trying to record the macro for saving Total Deformation and Stress as images using image to file option, I found that script is same for both cases. But how to differentiate between Deformation and stress for automation<\/p>\n<p><span style=\"font-size: 12pt\">image_settings = Ansys.Mechanical.Graphics.GraphicsImageExportSettings()<\/span><br \/><span style=\"font-size: 12pt\">image_settings.CurrentGraphicsDisplay = False<\/span><br \/><span style=\"font-size: 12pt\">image_settings.Resolution = GraphicsResolutionType.NormalResolution<\/span><br \/><span style=\"font-size: 12pt\">image_settings.Capture = GraphicsCaptureType.ImageAndLegend<\/span><br \/><span style=\"font-size: 12pt\">image_settings.Background = GraphicsBackgroundType.White<\/span><br \/><span style=\"font-size: 12pt\">image_settings.FontMagnification = 1<\/span><br \/><span style=\"font-size: 12pt\">Graphics.ExportImage(r&#8221;&#8221;&#8221;D:\\Projects\\ES.png&#8221;&#8221;&#8221;, GraphicsImageExportFormat.PNG, image_settings)<\/span><\/p>\n","protected":false},"template":"","class_list":["post-251916","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["161210"],"_bbp_author_ip":["23.192.164.14"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["1558"],"_edit_lock":["1677596056:45673"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["251916"],"_bbp_forum_id":["27791"],"_bbp_engagement":["161210"],"_bbp_voice_count":["1"],"_bbp_reply_count":["2"],"_bbp_last_reply_id":["251935"],"_bbp_last_active_id":["251935"],"_bbp_last_active_time":["2023-02-28 14:57:26"]},"test":"pavankonchada123"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/251916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/251916\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=251916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}