Obsidean_VM/01-Documentation/Siemens/Openness/Openness Python Library - s...

24 lines
670 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

***
```python
# --- Configuration ---
TIA_PORTAL_VERSION = "18.0"  # Target TIA Portal version (e.g., "18.0")
CROSS_REF_SUBFOLDER = "cross_ref"  # Subfolder name within working_directory
# Filter for cross-references. Based on documentation:
# 1: 'AllObjects', 2: 'ObjectsWithReferences', 3: 'ObjectsWithoutReferences', 4: 'UnusedObjects'
# Using 1 to export all. 0 might also work as a default in some API versions.
CROSS_REF_FILTER = 1
# --- TIA Scripting Import Handling ---
# (Same import handling as x1.py)
if os.getenv("TIA_SCRIPTING"):
    sys.path.append(os.getenv("TIA_SCRIPTING"))
else:
    pass
try:
    import siemens_tia_scripting as ts
```