dlubal-software / RFEM_Python_Client

Python client (or high-level functions) for RFEM 6 using Web Services, SOAP and WSDL
https://dlubal-software.github.io/.github/
MIT License
71 stars 27 forks source link

Heet update initModel #358

Closed heetrojivadiya closed 7 months ago

heetrojivadiya commented 7 months ago

Description

This PR solve the closeModel() issue when it is called after saveFile() with new saved model name. I also update openFile() with connectToServer() so we don't have to establish connection explicitly in script via Model() or connectToServer().

Test script:

from RFEM.initModel import Model, connectToServer, openFile, saveFile, closeModel

# connectToServer()       # or Model()

openFile(r'C:/Users/RojivadivaH/Desktop/Demo1.rf6')
print('Model 1 opened.')
saveFile(r'C:/Users/RojivadivaH/Desktop/new_Demo1.rf6')
print('Model 1 saved with new name.')
openFile(r'C:/Users/RojivadivaH/Desktop/Demo2.rf6')
print('Model 2 opened.')
saveFile(r'C:/Users/RojivadivaH/Desktop/new_Demo2.rf6')
print('Model 2 saved with new name.')
closeModel(2)
print('New model 2 is closed!')
closeModel(1)
print('New model 1 is closed!')

Type of change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration:

Checklist: