Object Selector | Pre-Fill the Vision MES Object Selector 3.0

Populate MES Object Selector with an Equipment Path

You want to pre-fill the MES Object Selector with an Equipment Path 

Step-by-step guide

Use Event Handlers → InternalFrame → InternalFrameActivated Scripting function at the Window level

Python
#caution: eqPath must be in the form that exclude '[global]\'
#eqPath = eqPath.replace('[global]\\','')

#eqPath = '<Enteprise>\<Site>\<Area>\<Line>'
eqPath = '[global]\Nuts Unlimited\Folsom\Packaging\Packaging Line 1'
eqPath = eqPath.replace('[global]\\','')

objSelector = system.gui.getParentWindow(event).getComponentForPath('Root Container.MES Object Selector')
delay = False

if not objSelector.isIncludeMESLineObjects():
objSelector.setIncludeMESLineObjects(True)
delay = True
if not objSelector.isShowEquipmentPath():
objSelector.setShowEquipmentPath(True)
delay = True

def setName():
objSelector.setSelectedName(eqPath)

system.util.invokeLater(setName, 1000 if delay else 0)