Hi:
> You're a star....working beautifully on my system now...thanks a million.
Good.
>Your 'select.py' script below is interesting and I would like to know (if you have the time) the meaning of:
> (1) macros = widget.getPropertyValue("macros").getCopy() # cannot find this function
> (2) macros.put("PV", "sim://sine") # I assume here you set the macro to the PV name
> (3) widget.setPropertyValue("macros", macros) # and add macro to widget (parent macros?)
Scripts are meant to allow doing things that were not foreseen.
The Display Builder has a NavigationTabs widget that allows changing the content of an embedded container, i.e. the file and macros.
BOY doesn't have that. With a script one can hack around that, but then you're somewhat on your own, because there's no documented API, and the methods that you find by looking in the source code can change, so then you need to update your script.
In this case I started by checking the widget class in the script:
print(widget.__class__.__name__)
I knew that I wanted to update the macros, so I check that:
print(widget.getPropertyValue("macros").__class__.__name__)
I see that it's a https://github.com/ControlSystemStudio/cs-studio/blob/master/applications/opibuilder/opibuilder-plugins/org.csstudio.opibuilder/src/org/csstudio/opibuilder/util/MacrosInput.java , and in there I find that it has a getCopy() etc.
-Kay
- References:
- XYgraph pv_name Amien Crombie
- Re: XYgraph pv_name Kasemir, Kay
- Re: XYgraph pv_name Amien Crombie
- Re: XYgraph pv_name Kasemir, Kay
- Re: XYgraph pv_name Amien Crombie
- Navigate by Date:
- Prev:
Re: help - writing a table column from OPI BOY to PV Michael Davidsaver
- Next:
Re: Webopi issue with Text Update widget rule Kasemir, Kay
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: XYgraph pv_name Amien Crombie
- Next:
Magna MS power supply Pierrick M Hanlet
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
|