Batteries included: using Python scripts in BuildIT

August 23, 2016 Onat Ekinci

Did you know that you can use Python scripts in BuildIT?  If you transform your Python files into executable files, you can import them into BuildIT processes. With this workflow, you can combine the richness of Python libraries with the ergonomic practicality of BuildIT processes.

In this post, we’ll focus on a very basic workflow for generating a random number in Python, which we will then use within a BuildIT process to move a constructed point.

Using Pyinstaller to create .exe files from Python files

In this section, we will transform an existing .py file into a .exe file. We used Pyinstaller to do this, but there are other software options available for this purpose.

  1. Install Python
  2. Install pywin32
  3. Install Pyinstaller
  4. In a text editor, add the contents of the Python file we will use:
    #! python
    import random
    a = random.gauss(10,1)
  5. To build the executable, write in the command line:

Or you could also follow these instructions to create an executable from a python script for more information.

Using the .exe file inside the BuildIT process file

In this section, we will explain the steps to include the created Python file in a BuildIT process.

  1. Open a BuildIT process
  2. Click on Add command: Category: General:  Command: Shell command
  3. In the added Shell command, change the parameters as follows:
    Script: The path of your .exe file created by Pyinstaller
    Return Variable: SHELLRESULTAdded Shell command parameters
  4. Click on Add command:Category: Construct:  Command: Point: Coordinates
  5. Click on Add command: Category: Edit: Command: Move
  6. In the added Move command, change the parameters as follows:
    Distance: $(SHELLRESULT)Added move command parameter

That’s it! When you run the process, the created point will move randomly.


Our aim here was to give a very simple example of plugging Python “batteries” into the BuildIT power tool. Using this powerful combination, we can imagine and implement many combinations and potentialities for various applications. We’ll expand more on this in the coming posts.

Previous Article
GD&T in wind power: MMC & MMB effects on a wind turbine tower flange
GD&T in wind power: MMC & MMB effects on a wind turbine tower flange

In a previous post, we presented an application of geometric dimensioning and tolerancing with a wind turbi...

Next Article
[DOWNLOAD] BuildIT Metrology Software
[DOWNLOAD] BuildIT Metrology Software

BuildIT Metrology is a versatile inspection software that enables quick and easy dimensional verification o...


Try FARO BuildIT Metrology Today!

First Name
Last Name
State or Province
Zip or Postal Code
Primary Goal
Your trial key will arrive by email
Error - something went wrong!