https://github.com/Maroder1/Openness_examples_python
- Install TIA v15.1 professional, make sure openness is checked [default] Link to TIA v15.1 trail
- Right clik "My computer" -> Manage -> System tools -> Local users and groups - > Groups-> Double click “Siemens TIA Openness” and add your username
- Edit the file path in the example file to match your installation of Siemens.Engineering.dll
- Download and install Python
- in the windows search bar type "command prompt" to open Command Promt (CMD)
- Install pythonnet by typing: pip install pythonnet
- Browse to the location of the example file and type: Python opennesspy.py
- Download Miniconda
- Open Command Prompt (CMD)
- Create a new environment by typing: conda create --name opennesspy python=3.7
- Actiavte the environment: conda activate opennesspy
- Install pythonnet by typing: pip install pythonnet Note: installing using conda install didnt work.
- Browse to the location of the example file and type: Python opennesspy.py
- To leave the environment type conda deactiave
Optional: instead of manually installing use the provided environment.yml file
- Start Command Promt (CMD) as administrator (right click). Do not enter any environment yet.
- Install Jupyter (and nb_conda as well as ipykernel to get your environments listed: conda install jupyter nb_conda ipykernel
- Activate the environment you want to add to jupyter kernel: conda activate myenv
- Install ipykernel in the environment (do this for all envvironemnts you would like to add): conda install ipykernel
- To start Jupyter, cd to root (cd .. until you are at C:) then type (does not need to be inside and env): Jupyter noteboook
- You might need to confrim that it shall open in a web browser (I use chrome)
- Once open in a browser navigate to the folder of your choice, then make a new python 3 file.
- Once inside click Kernel -> Change kernel and select the conda env you would like
- To run a cell: either use the run button, or shift + enter.