


{"id":289313,"date":"2023-06-19T06:14:50","date_gmt":"2023-06-19T06:14:50","guid":{"rendered":"\/forum\/forums\/topic\/how-can-i-select-all-surfacesfaces-that-i-made-script\/"},"modified":"2023-06-21T10:25:29","modified_gmt":"2023-06-21T10:25:29","slug":"how-can-i-select-all-surfacesfaces-that-i-made-script","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-can-i-select-all-surfacesfaces-that-i-made-script\/","title":{"rendered":"How can I select all surfaces(Faces) that I made script?"},"content":{"rendered":"<p>I want to use &#8220;select.xxx&#8221;, or other script to chose all surfaces and extrude them. How can I use &#8220;select script&#8221; properly? select.SelectAll() doesn&#8217;t work.&nbsp;<\/p>\n<p>Python Script, API Version = V23<\/p>\n<p>import math<\/p>\n<p>B_W=Parameters.Block_Width<br \/>B_L=Parameters.Block_Length<\/p>\n<p>r=Parameters.Block_radius<br \/>thickness=Parameters.Block_extrusion<\/p>\n<p>circular_radius = MM(r)*1000 &nbsp;<br \/>circle_pitch = MM(r) * 3 * 1000 &nbsp;<\/p>\n<p>start_x = -B_W\/2+circle_pitch\/2<br \/>start_z = -B_L\/2+circle_pitch\/2<\/p>\n<p>num_circles_x=int(math.ceil(B_W\/circle_pitch))<br \/>num_circles_z=int(math.ceil(B_L\/circle_pitch))<\/p>\n<p>surfaces=[]<\/p>\n<p>for i in range(num_circles_z):&nbsp;<br \/>&nbsp; &nbsp; for j in range(num_circles_x):&nbsp;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;circle_x=start_x + j*circle_pitch<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;circle_z=start_z + i*circle_pitch<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;circle = CircularSurface.Create(r, Direction.DirY,<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Point.Create(circle_x, 0, circle_z))<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;surfaces.append(circle)<\/p>\n<p>selection = Selection.Create(FaceSelection.SelectAll())<\/p>\n<p>options = ExtrudeFaceOptions()<br \/>options.ExtrudeType = ExtrudeType.Add<br \/>result = ExtrudeFaces.Execute(selection, thickness, options)<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"template":"","class_list":["post-289313","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["26990","170445"],"_bbp_author_ip":["168.143.243.24"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_bbp_likes_count":["0"],"_btv_view_count":["2872"],"_edit_lock":["1687155968:76427"],"_bbp_status":["publish"],"_bbp_topic_status":["unanswered"],"_bbp_topic_id":["289313"],"_bbp_forum_id":["27789"],"_bbp_engagement":["26990","170445"],"_bbp_voice_count":["2"],"_bbp_reply_count":["4"],"_bbp_last_reply_id":["289711"],"_bbp_last_active_id":["289711"],"_bbp_last_active_time":["2023-06-21 09:01:31"]},"test":"jinwhan"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/289313","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\/289313\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=289313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}