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

REQUEST: Move the "connect to server" logic in a function #304

Closed
gvandewiel86 opened this issue Oct 27, 2023 · 3 comments · Fixed by #314
Closed

REQUEST: Move the "connect to server" logic in a function #304

gvandewiel86 opened this issue Oct 27, 2023 · 3 comments · Fixed by #314
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@gvandewiel86
Copy link

Is your feature request related to a problem? Please describe.
When using the python RFEM library with for instance xlwings the module is automatically imported when opening the excel file (behavior of xlwings). However, the end user won't always have an active model (or even RFEM) open and due to setup of the initModel.py to program throws all kinds of errors that no connection with the RFEM program is possible forcing an exit from all routines.

As we are planning to integrate the python library with excel using xlwings it would be nice to have a bit more user control over the moment a connection is made with the RFEM application (or server).

Describe the solution you'd like
A function to try to connect to the RFEM program with a more graceful return.
Furthermore it would be more beneficial if the use of global objects (Model, client, ca and url) is restricted and stored in a separate module as described in Python's document on sharing global variables across modules.

Perhaps I am missing some other ways / options to control the connection process to RFEM and other solutions would be highly appreciated.

Describe alternatives you've considered
Currently i have patched the initModel.py to have such a function and manually exposed the four variables for the other RFEM modules to use.

Additional context
Add any other context or screenshots about the feature request here.

@gvandewiel86 gvandewiel86 added enhancement New feature or request question Further information is requested labels Oct 27, 2023
@Sacek073 Sacek073 self-assigned this Nov 10, 2023
@Sacek073 Sacek073 linked a pull request Nov 14, 2023 that will close this issue
14 tasks
OndraMichal added a commit that referenced this issue Nov 20, 2023
…nhancement

KlusacekJserver connect enhancement Issue #304
@gvandewiel86
Copy link
Author

It seems that this enhancement is not implemented in the latest releases?
If i install 1.19.0 or 1.19.1 the initModel file does not contain the connectToServer routine.

@Sacek073
Copy link
Contributor

Hi @gvandewiel86 sorry for the delayed response. The new release 1.19.2 is just out, so you can use it. But in the future if you need to use some functionality, which is not yet in the current release, you can always clone the repository and use it from there.

@gvandewiel86
Copy link
Author

Hi @Sacek073,

i am aware of the cloning option but we have multiple colleagues working with tooling which is dependable on the python library which aren't all so technical. Furthermore based on the relatively high rate of changes in both the python library and RFEM software the chance of breaking changes in either the RFEM software or python library makes me want to have a bit more control over which versions we are using together.

But thanks anyway for the comments and advice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants