Design-code conversion (batch)
What the script does
main.py converts every .ideaCon project in its folder to the American design code (AISC) and saves each converted project as <name>_AISC.ideaCon. Files that already end in _AISC.ideaCon are skipped.
Steps performed per project (real method names from the script):
- Attach to a running Connection API service via
ConnectionApiServiceAttacherandapi_client.project.open_project_from_filepath(...). api_client.conversion.get_conversion_mapping(project_id, CountryCode.AMERICAN)— read the default conversion mapping for the target code.- Adjust the mapping — the script keeps the original cross-sections by setting each
target_value = source_value. api_client.conversion.change_code(project_id, default_mapping)— convert the project.api_client.project.download_project(project_id, output_file_path)— save the converted project, thenapi_client.project.close_project(project_id).
How to run
Install the client package (the package version must match your installed IDEA StatiCa version):
pip install ideastatica-connection-apiStart the Connection API service from your IDEA StatiCa installation folder (adjust to your installed version):
"C:\Program Files\IDEA StatiCa\StatiCa 26.0\IdeaStatiCa.ConnectionRestApi.exe"The service listens on port 5000 by default, which is the
baseUrlthe script expects.Put the
.ideaConprojects you want to convert next tomain.pyand run:python main.py