


{"id":374594,"date":"2024-08-01T04:53:11","date_gmt":"2024-08-01T04:53:11","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/user-defined-result-2\/"},"modified":"2024-08-02T06:56:04","modified_gmt":"2024-08-02T06:56:04","slug":"user-defined-result-2","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/user-defined-result-2\/","title":{"rendered":"User Defined Result"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I am currently using a &ldquo;User Defined Result&rdquo; to evaluate the equivalent (von-Mises) stress along a construction geometry (path). I use this Python code to generate the result:&nbsp;<\/p>\n<pre style=\"padding-left: 40px\">solution = Model.Analyses[0].Solution.AddUserDefinedResult()<br>solution.ScopingMethod = GeometryDefineByType.Path<br>solution.Location = DataModel.GetObjectsByName(&ldquo;PATH_NAME&rdquo;)[0]<br>solution.Expression = r'seqv'<br>solution.GraphControlsXAxis = GraphControlsXAxis.Time<br>solution.CreateParameter(&ldquo;Maximum&rdquo;)<\/pre>\n<p>The path runs through two bodies, but I want to limit it to one body using the geometry option (see screenshot). This works manually by selecting the body, but unfortunately, I can&#8217;t find a way to do this via the scripting interface.<\/p>\n<p style=\"font-size: 18.6667px\"><img decoding=\"async\" title=\"User Defined Result Scope Settings\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/08\/01-08-2024-1722487653-Ansys_Settings.png\" alt=\"\"><\/p>\n<p>Does anyone know how to update the geometry option (something like &ldquo;solution.Geometry = DataModel.GetObjectsByName(&ldquo;BODY_NAME&rdquo;)&rdquo;)? Thanks in advance.<\/p>\n<p style=\"font-size: 18.6667px\">&nbsp;<\/p>\n<p style=\"font-size: 18.6667px\">Kindest Regards<\/p>\n<p style=\"font-size: 18.6667px\">Dustin<\/p>\n","protected":false},"template":"","class_list":["post-374594","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["428305","200","58821"],"_bbp_author_ip":["2a00:1398:4:ce00:d920:fec4:2748:e8b7"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["109"],"_bbp_topic_status":["answered"],"_bbp_notification_enabled":["428305","428305"],"_bbp_status":["answered"],"_bbp_topic_id":["374594"],"_bbp_forum_id":["27791"],"_bbp_engagement":["200","58821","428305"],"_bbp_voice_count":["3"],"_bbp_reply_count":["8"],"_bbp_reply_count_hidden":["1"],"_bbp_last_reply_id":["374822"],"_bbp_last_active_id":["374822"],"_bbp_last_active_time":["2024-08-02 06:55:21"]},"test":"ublwfstudent-kit-edu"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/374594","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\/374594\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=374594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}