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
68 stars 27 forks source link

BUG: Unable to Connect to Existing Model Twice. #393

Open cslotboom opened 3 months ago

cslotboom commented 3 months ago

Describe the bug I'm connecting to an existing model and it will only connect the first time my code it is run. After connecting a second time "clientModel" appears to have been deleted.

To Reproduce attempt to connect to a model twice, see code below:

model = Model(False, "myModel.rf6")
model.clientModel.service.begin_modification("new")

nodes = GetObjectNumbersByType(ObjectTypes.E_OBJECT_TYPE_NODE, model)
nodes = getAllNodeInds()

for node in nodes:
    out = ResultTables.NodesSupportForces(CaseObjectType.E_OBJECT_TYPE_LOAD_COMBINATION, 9, int(node), model = model)

model.clientModel.service.finish_modification()
model.clientModel.service.close_connection()

Error

  File c:\users\cslotboom\documents\rfem-testing\interaction.py:23
    Model.clientModel.service.begin_modification("new")

AttributeError: 'NoneType' object has no attribute 'service'

Expected behavior The model is able to be connected with.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

cslotboom commented 3 months ago

If it helps, I'm also getting a "The system cannot find the path specified." on completion of a successful run. image

OndraMichal commented 2 months ago

Hi @cslotboom, can you please provide better description of what is your process? Describe it in steps and also add why you need to disconnect in between.