stepalibre
Alibre Super User
I would like to share an experimental project for using VS Code to assist in Alibre Script programming and learning. It requires Python programming and VS Code knowledge. I utilize standard Python techniques and VS Code features, no special tools and libraries required. You should install Python extensions for full support along with a Python environment.
Main Files:
Example program : main.py
Mock/stub Alibre Script API file: AlibreScript.py [ AlibreScript.py is Python 3, Alibre Script is IronPython 2.7. AlibreScript.py is made to be compatible with Python 2.7 ]
Example python notebook : NOTEBOOK.ipynb [ code is not able to run from inside notebooks ]
You can download the repo to the Alibre Script Library folder and run the main.py file inside the Alibre Script addon. This is an experiment, I can't guarantee that the full Alibre Script API works as expected. Many Alibre Script members that are global are not included by default. I will add additional global members as needed. For example CurrentPart was added today.
This project is used in development of another Alibre Python project that is more fully featured. I made it into it's own project because I found it useful as a standalone project. I work in VS Code and Python daily and it is really nice to control Alibre from my other projects. Even simple tasks like exporting a file is made even easier. It is also really helpful in learning Alibre Script in a standard Python way.
The goal of the included mock/stub API is only code completion. Function parameter hints and comments are not included.

You can use many techniques to find what the parameter types are.

I often work side by side.

github.com
Related work:
github.com
Main Files:
Example program : main.py
Mock/stub Alibre Script API file: AlibreScript.py [ AlibreScript.py is Python 3, Alibre Script is IronPython 2.7. AlibreScript.py is made to be compatible with Python 2.7 ]
Example python notebook : NOTEBOOK.ipynb [ code is not able to run from inside notebooks ]
You can download the repo to the Alibre Script Library folder and run the main.py file inside the Alibre Script addon. This is an experiment, I can't guarantee that the full Alibre Script API works as expected. Many Alibre Script members that are global are not included by default. I will add additional global members as needed. For example CurrentPart was added today.
This project is used in development of another Alibre Python project that is more fully featured. I made it into it's own project because I found it useful as a standalone project. I work in VS Code and Python daily and it is really nice to control Alibre from my other projects. Even simple tasks like exporting a file is made even easier. It is also really helpful in learning Alibre Script in a standard Python way.
The goal of the included mock/stub API is only code completion. Function parameter hints and comments are not included.

You can use many techniques to find what the parameter types are.

I often work side by side.

GitHub - Testbed-for-Alibre-Design/AlibreScriptAPIVSCodeDemo: Alibre Script Programming with VS Code
Alibre Script Programming with VS Code. Contribute to Testbed-for-Alibre-Design/AlibreScriptAPIVSCodeDemo development by creating an account on GitHub.
Related work:
GitHub - Testbed-for-Alibre-Design/AlibreScriptStubMockGeneratedFiles: For R & D purposes.
For R & D purposes. Contribute to Testbed-for-Alibre-Design/AlibreScriptStubMockGeneratedFiles development by creating an account on GitHub.
AlibreScript Python 3 (AlibreScriptPython3) compatible coding early concept.
To all, I'm at a stopping point for now and would love some feedback from users before I continue. I would like to include your ideas and to understand if this is relevant to how you use AlibreScript. AlibreScriptPython3 is a way to use AlibreScript API inside of Python 3 supported text...
www.alibre.com
AlibreScriptAPI python stub files
I decided to share a generated stub output for AlibreScriptAPI. This is not a working stub file. It is provided for reference only. This is not AlibreScriptPython3, this is a separately generated file\project. You can take a peek inside to have a better idea of what it looks like. It maybe...
www.alibre.com
AlibreScriptAPIToCSV
In my work towards learning AlibreScript I made AlibreScriptAPIToCSV to quickly search what can be done in AlibreScript. I use the chm help but a plain text searchable option is important to me...
www.alibre.com
Last edited: