{"id":2893,"date":"2022-09-05T12:11:30","date_gmt":"2022-09-05T02:11:30","guid":{"rendered":"https:\/\/www.finiteelementanalysis.com.au\/?p=2466"},"modified":"2024-06-06T13:05:52","modified_gmt":"2024-06-06T02:05:52","slug":"scripting-in-ansys-discovery-automating-repetitive-tasks-and-complex-workflows","status":"publish","type":"post","link":"https:\/\/www.leapaust.com.au\/blog\/fea\/scripting-in-ansys-discovery-automating-repetitive-tasks-and-complex-workflows\/","title":{"rendered":"Scripting in Ansys Discovery: Automating repetitive tasks and complex workflows"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"2893\" class=\"elementor elementor-2893\" data-elementor-post-type=\"post\">\n\t\t\t\t<div class=\"elementor-element elementor-element-acad7fa e-flex e-con-boxed e-con e-parent\" data-id=\"acad7fa\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-29c8b0b elementor-widget elementor-widget-text-editor\" data-id=\"29c8b0b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Scripting in Ansys Discovery facilitates the optimisation of repetitive tasks and complex workflows across a broad range of applications. Notably, the tools available in Discovery\u2019s script editor allow for the intuitive learning and implementation of scripts into projects, both for advanced and new users with limited scripting experience. LEAP has composed the following video series to highlight the key functionality of Discovery\u2019s script editor. Crucially it also provides users with an overview of the tools available such that they can learn and adapt scripting methods to their own needs. Each video on this series builds on concepts introduced in earlier parts and shows various live coding examples to create a variety of useful scripts.<\/p><p>\u00a0<\/p><p><strong>Part 1 of 5: Introduction<\/strong><\/p><p>This section provides an overview of the script editor in Ansys Discovery, as well as the general tools available and supporting API documentation. It presents an outline of the following series content as well as the general working environment each video will use. Finally, this introduction presents two common examples of Discovery scripting in action, used for the creation and evaluation of geometry.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-582b09c elementor-widget elementor-widget-video\" data-id=\"582b09c\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/www.youtube.com\\\/watch?v=_JfIgFrEa64&amp;list=PLvsJbyBB0CMcLkhinxjCtJwRaVZkRitAf&amp;index=2&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-466881c2 e-flex e-con-boxed e-con e-parent\" data-id=\"466881c2\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-23b77fa elementor-widget elementor-widget-text-editor\" data-id=\"23b77fa\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>Part 2 of 5: Using the Record Button<\/strong><\/p><p>This video introduces the record button, an incredibly intuitive tool users can employ to convert traditional manual workflows to scripted equivalents. It also presents a live coding example alongside explanations of various best practice scripting methods.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b2f3731 elementor-widget elementor-widget-video\" data-id=\"b2f3731\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/www.youtube.com\\\/watch?v=dERPCZX70Po&amp;list=PLvsJbyBB0CMcLkhinxjCtJwRaVZkRitAf&amp;index=3&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4341e29 elementor-widget elementor-widget-text-editor\" data-id=\"4341e29\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>Part 3 of 5: Parameterising Scripts<\/strong><\/p><p>Part 3 expands on the prior video, introducing the user to various means of parameterisation and the efficiency and flexibility created by such scripts. This is a crucial skill for geometry creation, manipulation and evaluation. It also highlights the extended functionality in linking a Discovery Script to a Workbench project, allowing for remote geometry manipulation through the user created parameters.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bf05ebf elementor-widget elementor-widget-video\" data-id=\"bf05ebf\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/www.youtube.com\\\/watch?v=drGeN-xJzgU&amp;list=PLvsJbyBB0CMcLkhinxjCtJwRaVZkRitAf&amp;index=3&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c41121f elementor-widget elementor-widget-text-editor\" data-id=\"c41121f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>Part 4 of 5: Using Named Selection<\/strong><\/p><p>An introduction to Named Selections and their creation\/uses through Discovery Scripting. This video continues to build on the previous live scripting example showing the typical workflow and suggested approach to understanding new coding functionality and creating a script from scratch. The content highlights the ability to evaluate and manipulate existing geometry through the use of Named Selections.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a7f00ea elementor-widget elementor-widget-video\" data-id=\"a7f00ea\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/www.youtube.com\\\/watch?v=PM6tmgVVcpw&amp;list=PLvsJbyBB0CMcLkhinxjCtJwRaVZkRitAf&amp;index=5&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4011c63 elementor-widget elementor-widget-text-editor\" data-id=\"4011c63\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>Part 5 of 5: Custom User Inputs<\/strong><\/p><p>The final video in this series presents an advanced scripting case in which custom user input prompts are presented to the user mid-script run, and upon user interaction a series of geometric commands are executed. The live coding example shows a typical troubleshooting approach taken to ensure scripts run correctly, as well as the integration of helper functions into a larger script file. The more advanced scripting functionality shown here also presents the broad possible applications of scripting within the user\u2019s own workflows.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bd28b9d elementor-widget elementor-widget-video\" data-id=\"bd28b9d\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/www.youtube.com\\\/watch?v=VVEAp2mOhP8&amp;list=PLvsJbyBB0CMcLkhinxjCtJwRaVZkRitAf&amp;index=5&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-19ed2e5 elementor-widget elementor-widget-text-editor\" data-id=\"19ed2e5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>Final remarks<\/strong><\/p><p>We hope this has provided a useful introduction and overview of the scripting capabilities within Ansys Discovery. We welcome Ansys customers in Australia and New Zealand to <a href=\"https:\/\/www.leapaust.com.au\/support\/\" target=\"_blank\" rel=\"noopener\"><span style=\"text-decoration: underline;\">contact the LEAP technical support team<\/span><\/a> if you require any further information or assistance with scripting in Ansys Discovery.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Learn from our video series on how to use scripting in Ansys Discovery to automate repetitive tasks and complex workflows across a broad range of applications. These videos aim to help Ansys Discovery users to learn the scripting interface, work through some useful examples and adapt scripting methods to their own needs.<\/p>\n","protected":false},"author":0,"featured_media":2802,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","footnotes":""},"categories":[144],"tags":[171,202,284,292],"class_list":["post-2893","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fea","tag-ansys","tag-discovery","tag-scripting","tag-spaceclaim"],"_links":{"self":[{"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/posts\/2893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/comments?post=2893"}],"version-history":[{"count":3,"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/posts\/2893\/revisions"}],"predecessor-version":[{"id":3038,"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/posts\/2893\/revisions\/3038"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/media\/2802"}],"wp:attachment":[{"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/media?parent=2893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/categories?post=2893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.leapaust.com.au\/blog\/wp-json\/wp\/v2\/tags?post=2893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}