How to make sketches using Abaqus Scripting (Part 3)

Written by Miguel

18 Oct, 2021

Sketches are widely used in Abaqus during the preprocess of the geometry of our FE models. For instance, we use sketches to create parts (extrusion, revolution, sweeping…), to make partitions and cuts, etc. Therefore, to take advantage of the automation of Abaqus through scripts, we need to know how to generate these sketches using Python commands.

This is the third post in this series on the creation of sketches in Abaqus by means of Python scripts. If you missed the previous ones, I recommend you to take a look at:

  • Part 1: Getting started with sketches using Python scripts.
  • Part 2: Splines, sketch geometry and vertices.

Debugging Python commands in sketches

Very often we run into the same situation: we want to test Python commands right from Abaqus/CAE to check whether it works or not (i.e. debugging). However, when we open an existing or a new sketch and try to run these Python commands from the Command Line Interface, we may get some unexpected behaviour in most cases.

    This happens because Abaqus employs temporary sketches before we complete them in CAE (“Done“):

    • __edit__: this sketch is created when we open an existing sketch.
    • __profile__: this one is generated when we create a new sketch.

    In the next video, we will explain how these “__edit__” and “__profile__” sketches are created by Abaqus/CAE and how to use them to avoid all sort of errors and weird behaviour of sketches while testing and debugging Python commands.

    Download the script to generate the sketch of the double spiral shown at the beginning of the video (watch the video of part 2 for all the details). And of course, if you have any question/suggestion/opinion leave it in the comments section below.

    You can also get started in Abaqus/Scripting with Python in this post. This is the starting point to learn how to create your own scripts from scratch.

    I hope that you find these tips useful!

    Download the FREE GUIDE




    You might be interested as well…


    Submit a Comment

    Personal details provided through this form will be managed by TecnoDigital School responsible for this website. The aim of collecting and treating the details required is the management of the comments made in this blog.

    Legitimation: Consent of the interested. Requests cannot be atended if personal details are not introduced in the fields marked as mandatory.

    You will be able to exercise your access, rectification, limitation rights and to suppress your personal details through, as well as the right to make a compliant through a control authority.

    You can read additional information about Personal Details Protection in the website:, as well as the privacy policy.