Editing with Visual Studio Code¶
Visual Studio Code is a lightweight but powerful source code editor and can be installed from https://code.visualstudio.com/
Before installing Visual Studio Code, it is necessary to install Python 3.8.8 (64-bit) from https://www.python.org/downloads/release/python-388/
For the development of PythonPart scripts with Visual Studio Code it is useful to install the following extensions:
Python: Python extension
Pylance: feature-rich language support for Python
Python Indent
Studio Icons
The following steps must be performed to install the extensions:
start Visual Studio Code
click the Extensions button
type the name of the extensions in the input field
select the extension from the list
click the Install button of the selected extension
Prepare editing¶
The preparation of PythonPart scripts editing with Visual Studio Code can be done by running the PythonPart CreateVisualStudioCodeWorkspace in Allplan, which is located in the Allplan directory …\etc\Examples\PythonParts\ToolsAndStartExamples.
This PythonPart creates the file PythonParts_VsCode.code-workspace in the Allplan …\etc folder. Clicking on this file will start Visual Studio Code. The result looks like this: