-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1386 from ISISComputingGroup/Ticket6915
adding beckhoff engineering view opi
- Loading branch information
Showing
4 changed files
with
742 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
base/uk.ac.stfc.isis.ibex.opis/resources/twincat/spinner_choose_axis.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from org.csstudio.opibuilder.scriptUtil import PVUtil | ||
|
||
def get_macros(): | ||
return display.getPropertyValue("macros").getMacrosMap() | ||
|
||
|
||
def reload_widget(widget): | ||
original_opi = widget.getPropertyValue("opi_file") | ||
widget.setPropertyValue("opi_file", "null.opi") | ||
widget.setPropertyValue("opi_file", original_opi) | ||
|
||
|
||
def add_macro(widget, name, value): | ||
macros = widget.getPropertyValue("macros") | ||
macros.put(name, str(value)) | ||
widget.setPropertyValue("macros", macros) | ||
reload_widget(widget) | ||
|
||
|
||
widget = display.getWidget("link1") | ||
spinner = display.getWidget("spinner") | ||
value = spinner.getPropertyValue("text") | ||
add_macro(widget, "AXIS", value) |
Oops, something went wrong.