This file contains hidden or 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
| def updateTree(tree,data,paths=[]): | |
| import itertools | |
| from sets import Set | |
| from javax.swing.tree import TreePath | |
| jTree = tree.getViewport().getView() | |
| root = TreePath(jTree.getModel().getRoot()) | |
| vectorPaths = jTree.getExpandedDescendants(root) | |
| expandedPaths = Set(paths) | |
| if vectorPaths != None: | |
| for path in vectorPaths: |
This file contains hidden or 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
| In table getDisplayTextAt function: | |
| if col == 1: | |
| return "Rev "+str(self.data.getValueAt(row,"Rev")) | |
| return value | |
| Add icon mapping to Image Path List in table customizer. |
This file contains hidden or 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
| def func(arg1,arg2): | |
| print arg1,arg2 | |
| def invokeAsynchWithArgs(func,*args): | |
| def asynchFunc(args=args,func=func): | |
| func(*args) | |
| system.util.invokeAsynchronous(asynchFunc) | |
| invokeAsynchWithArgs(func, "cat","bat") |
This file contains hidden or 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
| from org.python.core import imp | |
| from java.lang import Thread | |
| Thread.currentThread().setContextClassLoader(imp.getParentClassLoader()) | |
| import sys | |
| from org.python.core import imp | |
| from java.lang import Thread,Class | |
| import xml.etree.ElementTree as ET | |
| #Thread.currentThread().setContextClassLoader(imp.getParentClassLoader()) |
This file contains hidden or 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
| global system,app | |
| import system,app | |
| def bytesEqual(bytes1,bytes2): | |
| equal = True | |
| for pair in zip(bytes1,bytes2): | |
| if pair[0] != pair[1]: | |
| return False | |
| return True | |
This file contains hidden or 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
| def unique(items): | |
| found = set() | |
| keep = [] | |
| for item in items: | |
| if item not in found: | |
| found.add(item) | |
| keep.append(item) | |
| return keep | |
This file contains hidden or 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
| # Key characters in this mappings dictionary will be | |
| # replaced in escaped strings with their corresponding values. | |
| # | |
| # For example, if you had the mapping: 'B':'!B!' in the dictionary, | |
| # then escape('Barb') would return the string: '!B!arb' | |
| # (it is case sensitive) | |
| # | |
| # Add anything you like to the mappings dict | |
| # This should work well for SQL-compliant databases | |
| mappings = {"'":"''", "\\":"\\\\", "\n":"\\n", "\r":"\\r", "\t":"\\t"} |
This file contains hidden or 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
| java -cp launchclient.jar -Djavaws.sr.gateway.addr.0=server:port:sslport/main -Djavaws.sr.scope=D -Djavaws.sr.main=com.inductiveautomation.ignition.designer.DesignerStartupHook com.inductiveautomation.ignition.client.launch.BootstrapSwing | |
| for a client: | |
| java -cp launchclient.jar -Djavaws.sr.gateway.addr.0=ip address:8088:8043/main -Djavaws.sr.scope=C -Djavaws.sr.project=CustomerCare -Djavaws.sr.project.version=Published -Djavaws.sr.main=com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook com.inductiveautomation.ignition.client.launch.BootstrapSwing | |
| download launchclient.jar from http://server:port/main/system/launchbin/launchclient.jar |
This file contains hidden or 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
| window.setSelected(True) |
This file contains hidden or 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
| /main/system/projectlist |