Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# RfemPythonWsClient
![image](https://img.shields.io/badge/COMPATIBILITY-RFEM%206.00-yellow) ![image](https://img.shields.io/badge/Python-3-blue) ![image](https://img.shields.io/badge/SUDS-0.3.5-orange)
![image](https://img.shields.io/badge/COMPATIBILITY-RFEM%206.00-yellow) ![image](https://img.shields.io/badge/Python-3-blue) ![image](https://img.shields.io/badge/SUDS-0.3.5-orange) ![image](https://img.shields.io/badge/xmltodic-0.12.0-orange)

Python client (or high-level functions) for [RFEM 6](https://www.dlubal.com/en/products/rfem-fea-software/what-is-rfem) using [Web Services](https://en.wikipedia.org/wiki/Web_service) (WS), [SOAP](https://cs.wikipedia.org/wiki/SOAP) and [WSDL](https://en.wikipedia.org/wiki/Web_Services_Description_Language). Available Python SOAP pkgs can be found on [wiki.python.org](https://wiki.python.org/moin/WebServices#SOAP).

Expand Down
27 changes: 25 additions & 2 deletions RFEM/initModel.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
from RFEM.enums import *
import xmltodict
import csv
#import json
#import xml.etree.ElementTree as ET

Expand Down Expand Up @@ -80,6 +78,31 @@
input('Press Enter to exit...')
sys.exit()

try:
import xmltodict
except:
print('xmltodict library is not installed in your Python env.')
instXML = input('Do you want to install it (y/n)? ')
instXML = instXML.lower()
if instXML == 'y':
# Subprocess will be opened in cmd and closed automaticaly after installation.
# Prevents invoking pip by an old script wrapper (https://github.com/pypa/pip/issues/5599)
import subprocess
try:
subprocess.call('python -m pip install xmltodict --user')
import requests
except:
print('WARNING: Installation of xmltodict library failed!')
print('Please use command "pip install xmltodict --user" in your Command Prompt.')
input('Press Enter to exit...')
sys.exit()
else:
input('Press Enter to exit...')
sys.exit()

import csv


# Connect to server
# Check server port range set in "Program Options & Settings"
# By default range is set between 8081 ... 8089
Expand Down