You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run the PSCAD script i tried to use an external client. I ran into 2 issues using this method. The first is that the requirements.txt file was missing mhi-pscad so i needed to run: "pip install mhi-pscad". The second problem is that the connection function did not work when trying to attach to PSCAD. One time it even connected to a coworkers PSCAD client as we are working with PSCAD on a server. The solution to those problems was using the function shown below. In that function the tkinter and path part can be changed to the workspace path being included in the configuration file.
def connectPSCAD_LE() -> mhi.pscad.PSCAD:
"""
Returns
-------
pscad : Application
Returns a link to the opened PSCAD workspace, and runs the MTB using that workspace.
It does that by using the first available license
"""
root = tkinter.Tk()
root.withdraw()
root.wm_attributes('-topmost', 1)
WorkspacePath = filedialog.askopenfilename()
pscad = mhi.pscad.launch()
dict_certificates = pscad.get_available_certificates()
available_certificates : list(tuple) = [x for x in dict_certificates.items() if "1/1" in str(x)]
pscad.get_certificate(available_certificates[0][1]) # First available license
pscad.load(WorkspacePath)
return pscad
The text was updated successfully, but these errors were encountered:
Hello,
When trying to run the PSCAD script i tried to use an external client. I ran into 2 issues using this method. The first is that the requirements.txt file was missing mhi-pscad so i needed to run: "pip install mhi-pscad". The second problem is that the connection function did not work when trying to attach to PSCAD. One time it even connected to a coworkers PSCAD client as we are working with PSCAD on a server. The solution to those problems was using the function shown below. In that function the tkinter and path part can be changed to the workspace path being included in the configuration file.
The text was updated successfully, but these errors were encountered: