


{"id":359945,"date":"2024-04-02T08:55:52","date_gmt":"2024-04-02T08:55:52","guid":{"rendered":"\/forum\/forums\/topic\/spaceclaim-scripting-typeerror-expected-plane-got-plane\/"},"modified":"2024-04-02T08:59:03","modified_gmt":"2024-04-02T08:59:03","slug":"spaceclaim-scripting-typeerror-expected-plane-got-plane","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/spaceclaim-scripting-typeerror-expected-plane-got-plane\/","title":{"rendered":"Spaceclaim Scripting TypeError: expected Plane, got Plane"},"content":{"rendered":"<p>Hello,<\/p>\n<p>i try to create an ACT wizard extension for spaceclaim. I already wrote a code that creates a geometry in spaceclaim and it works fine when i start it directly in the scripting extension of spaceclaim.<\/p>\n<p>For the ACT version i have an issue with the creation of a planar body. The following part of the code creates an error:<\/p>\n<p>import clr<br \/>import units<br \/>import time<\/p>\n<p>clr.AddReference(&#8220;SpaceClaim.Api.V23&#8221;)<\/p>\n<p>from SpaceClaim.Api.V23.Geometry import *<br \/>from SpaceClaim.Api.V23.Modeler import *<\/p>\n<p>&#8230;<\/p>\n<p>#polGen is a List[ITrimmedCurve] of curvesegments<br \/>refPlane=Plane.PlaneZX<br \/>face1 = PlanarBody.Create(refPlane, polGen)<br \/>body1= face1.CreatedBody<\/p>\n<p>&#8230;<\/p>\n<p>The row, where PlanarBody.Create is executed, creates the following error in the ACT Log console:<\/p>\n<p>TypeError: expected Plane, got Plane<\/p>\n<p>I can&#8217;t find a solution to this problem, does anybody know how to solve this?<\/p>\n","protected":false},"template":"","class_list":["post-359945","topic","type-topic","status-closed","hentry","topic-tag-ACTAnsysACTAnsys-1","topic-tag-script","topic-tag-spaceclaim"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["296468","58821"],"_bbp_author_ip":["96.7.218.223"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["609"],"_bbp_topic_status":["unanswered"],"_edit_lock":["1712048320:236364"],"_bbp_likes_count":["1"],"_bbp_topic_id":["359945"],"_bbp_forum_id":["27789"],"_bbp_engagement":["58821","296468"],"_bbp_voice_count":["2"],"_bbp_reply_count":["1"],"_bbp_last_reply_id":["360038"],"_bbp_last_active_id":["360038"],"_bbp_last_active_time":["2024-04-02 14:13:19"]},"test":"niklas-sellmannweb-de"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/359945","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":1,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/359945\/revisions"}],"predecessor-version":[{"id":359946,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/359945\/revisions\/359946"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=359945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}