To set up the environment for execution

Python3 installation

CRI Atom Craft Robot is compatible with Python 3.7 (64-bit) and Python 3.8 (64-bit).
It can be run with CPython 3.7.8 (64-bit) and CPython 3.8.6 (64-bit).
You can download Python3 from Python official website for installation.

For Mac, you can also install Python3 from package manager such as Homebrew.

Preference settings for local execution

Configure the environment for local execution.
This setting is not required if you only use remote execution.

OS Common Settings

Select "Script Settings" from the "Script" menu to display the "Script Settings" dialog. Specify the plugin type (Python version) in the "Plugin" tab.

criatom_tools_atomcraft_api_plugin_type.png

Choose the plugin that matches the version of Python installed on your working PC.
You can check the installed version of Python by running the following command:


For Windows, run the following command from the command prompt:

python --version

For Mac, run the following command from the terminal:

python3 --version

Windows-specific settings

Add the Python (64-bit) install path to the environment variables PYTHONHOME and PATH.
Example:

C:\Users\(user name)\AppData\Local\Programs\Python\Python37\
C:\Users\(user name)\Anaconda3\

To check the environment variables, run the following command from the command prompt:

where python

If the specification of environment variables does not apply, please sign out and try again.

Mac-specific settings

After installing Python3 for Mac using Homebrew or similar package manager, you need to change the path information to the Python3 library for local execution that recorded in the CRI Atom Craft plugin, via the terminal.
Create the command described below and start by terminal.


(1) Select "Script Settings" > "Mac Python Library" in the "Script" menu.

criatom_tools_atomcraft_api_macpython.png

The "Python library in use by CRI Atom Craft" is automatically filled in.


(2) Input the "Python library to be used in CRI Atom Craft"

Example when installing Python3 from Homebrew (using Ver.3.7.8)

/usr/local/Cellar/python/3.7.8/Frameworks/Python.framework/Versions/3.7/Python

Example when using Anaconda

/Users/(user name)/anaconda3/lib/libpython3.7m.dylib

The part described as (user name) may vary depending on the environment.

When inputting "Python library to be used in CRI Atom Craft", the "Start by Terminal" button will be activated.


(3) Press the "Start by Terminal" button to update the CRI Atom Craft plugin information.

The command displayed in the dialog will be executed in the terminal and the information of the CRI Atom Craft plugin will be updated.

Note
In case of a direct update
If you want to change directly from the terminal instead of using CRI Atom Craft, run the following command:
  • Example of commands when installing Python3 from Homebrew (using Ver.3.7.8)
    sudo install_name_tool -change "/Library/Frameworks/Python.framework/Versions/3.7/Python" "/usr/local/Cellar/python/3.7.8/Frameworks/Python.framework/Versions/3.7/Python" "/Applications/CRIWARE/CRI ADX2/Tools Ver.3.44/CriAtomCraft.app/Contents/PlugIns/libCriAcApiPython37.dylib"
  • Example of commands when using Anaconda
    sudo install_name_tool -change "/Library/Frameworks/Python.framework/Versions/3.7/Python" "/Users/(user name)/anaconda3/lib/libpython3.7m.dylib" "/Applications/CRIWARE/CRI ADX2/Tools Ver.3.44/CriAtomCraft.app/Contents/PlugIns/libCriAcApiPython37.dylib"
    The part described as (user name) may vary depending on the user name.


Add a User Script Search path

Before creating a new script, set the search destination folder for the script files.
Select the "User Script" tab in the "Script Settings" dialog, click the "Add" button to specify the folder.
Script files in the folder set here will appear in the script list or script menu and can be executed from CRI Atom Craft.

criatom_tools_atomcraft_api_prepare_userscript_path.png


Preference settings for remote execution

Configure the environment for remote execution.
This setting is not required if you only use local execution.

Check the plugin package for remote execution

The plugin package for remote execution is included in CRI Atom Craft.

The robot folder in the same hierarchy as CriAtomCraft.exe (or CriAtomCraft.app for Mac).
The cri folder in the remote/Python folder is the root folder of the Python plugin package for remote execution.
Check if it has the following structure.

CriAtomCraft.exe (CriAtomCraft.app)
robot folder
- remote folder
- Python folder: the root folder of the Python plugin package for remote execution
- cri folder
- atomcraft folder
- build.py : Plugin Script Code
- common.py : (Same as above)
- debug.py : (Same as above)
- project.py : (Same as above)
- preview.py : (Same as above)
- error.py : (Same as above)

Add the root folder of the Python plugin package for remote execution to the environment variable PYTHONPATH.

Add the environment variable PYTHONPATH to the console, so that the console can refer to the root folder of the Python plugin package for remote execution.

Windows

If you placed CRI Atom Craft ( CRI ADX SDK ) under C-drive, CriAtomCraft.exe is located in the following location:

C:\cri\tools\ADX2\ver.3\CriAtomCraft.exe

In this case, add the following folder to the environment variable PYTHONPATH.

C:\cri\tools\ADX2\ver.3\robot\remote\Python

Mac

For Ver.3.44 series, CriAtomCraft.app is located at the following location:

/Applications/CRIWARE/CRI ADX2/Tools Ver.3.44/CriAtomCraft.app

In this case, add the following folder to the environment variable PYTHONPATH.

/Applications/CRIWARE/CRI ADX2/Tools Ver.3.44/robot/remote/Python