


{"id":256816,"date":"2018-10-09T10:05:53","date_gmt":"2018-10-09T10:05:53","guid":{"rendered":"\/forum\/forums\/topic\/use-of-spaceclaim-origins-in-scripting\/"},"modified":"2018-10-09T10:05:53","modified_gmt":"2018-10-09T10:05:53","slug":"use-of-spaceclaim-origins-in-scripting","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/use-of-spaceclaim-origins-in-scripting\/","title":{"rendered":"Use of SpaceClaim origins in scripting"},"content":{"rendered":"<p> I want to use a &#8216;local coordinate system&#8217; to define parts in my Python script: <\/p>\n<pre class=\"prettyprint\">\norigin = Point.Create(1, 1, 1)\nx_Direction = Direction.DirX\ny_Direction = Direction.DirY\nresult = DatumOriginCreator.Create(origin, x_Direction, y_Direction)\nLCS = result.CreatedOrigin\nLCS.SetName('Bar1')<\/pre>\n<p> This works, I get an origin in my Structure called &#8216;Bar1&#8217; <\/p>\n<p>&nbsp;<\/p>\n<p> But if I want to define a new part relative to origin &#8216;Bar1&#8217; the part is still generated in the WCS or base origin: <\/p>\n<pre class=\"prettyprint\">\nresult = CylinderBody.Create(Point.Create(0, 0, 0), &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Point.Create(0, 0, 10), &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Point.Create(0, 1, 10 ), ExtrudeType.None)\nRenameObject.Execute(Selection.Create(result.CreatedBodies[0]), 'Drill')<\/pre>\n<p> How can I activate the LCS ? <\/p>\n","protected":false},"template":"","class_list":["post-256816","topic","type-topic","status-closed","hentry","topic-tag-scripting","topic-tag-spaceclaim"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["278539"],"_bbp_likes_count":["0"],"_btv_view_count":["1699"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["256816"],"_bbp_forum_id":["27789"],"_bbp_engagement":["71","278539"],"_bbp_voice_count":["2"],"_bbp_reply_count":["2"],"_bbp_last_reply_id":["272382"],"_bbp_last_active_id":["272382"],"_bbp_last_active_time":["2018-10-09 14:22:40"]},"test":"l-koorneefmi-partners-nl"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/256816","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\/256816\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=256816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}