Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cslotboom opened this issue Jul 18, 2024 · 3 comments
Open

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

cslotboom opened this issue Jul 18, 2024 · 3 comments
Labels
bug Existing feature isn't working properly

Comments

@cslotboom
Copy link

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):

  • Version of WIN10 OS: 10.0.19044
  • Version of RFEM 6.06.0010
  • Api version 1.20.1
@cslotboom cslotboom added the bug Existing feature isn't working properly label Jul 18, 2024
@cslotboom
Copy link
Author

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

@OndraMichal
Copy link
Contributor

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.

@cslotboom
Copy link
Author

Hey - when introspecting models I will commonly need to run scripts more than once on the same model. i.e. a user reads results, makes a change, then wants to read results again.

The discussion here provided a solution to my issue.
#385 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing feature isn't working properly
Projects
None yet
Development

No branches or pull requests

2 participants