Good morning PSCAD community,
I am very excited to see Python can work with PSCAD in Automation Library. I tried the System_Base_Case_TF example and amazingly it worked. Thanks for bringing this automation feature to PSCAD. As I understand that we need to know the component ID to control it. I checked the code Switching.py
for Automation library and the IDs for three circuit breakers are:
# Get all breaker components
b1 = main.user_cmp(1857653396)
b2 = main.user_cmp(2005115066)
b3 = main.user_cmp(656681394)
However, when I open the circuit and right click on each breaker to find its Attributes, then:
b1 = main.user_cmp(1534465971)
b2 = main.user_cmp(962967610)
b3 = main.user_cmp(227047871)
I am currious that why even with the wrong circuit breaker IDs the python code still can run and simulate the PSCAD?
Also, is there any way or function to get the component ID not by right click on that component and get the Attributes?
I also tried to create a new project by create_project("1", "NewProject", r"C:\test") but it did not work. The error is ValueError: Invalid project type.
I just wonder did anyone experience the same?