---
title: "Vision Trace Graph - Custom User Menu 3.0"
id: "vision-trace-graph-custom-user-menu-3-0"
project: "Knowledge Base"
url: "https://docs.sepasoft.com/articles/knowledge-base/vision-trace-graph-custom-user-menu-3-0"
updated: 2026-07-23T18:08:34Z
---

# Vision Trace Graph \- Custom User Menu 3\.0

## Overview

The Trace Graph component is an excellent tool that can be used to visualize each production step of a Material Lot. However, the Track and Trace Module doesn’t contain all relevant data for each process step. This data may have been collected by a different Ignition module or an external system. The Track and Trace module does maintain basic details of each step that then can be used to filter the results when querying data external to Track and Trace. This document describes the basic steps needed to add a user menu item on the Trace Graph and access the basic details of a production step so that they may be used to query data from another module or system.

### Applies To and Version Info

This feature applies to Track and Trace module

## Implementing

### Add User Menu Item

As shown below, click the ![](/resources/Storage/knowledge-base/vision-trace-graph-custom-user-menu-3-0/MagnifierIcon.png)icon on the User Menu Items property of the Trace Graph component. This is where user menu items are configured. The NodeType is either ResponseSegment or MaterialLot which are the two different MES object types that are represented by nodes on the Trace Graph. What is entered into the NoteType specifies which node type to show the user menu item. The NodeName provides a method to only show the user menu items for nodes that match the pattern entered. The \* and ? wildcard characters can be used in the pattern. Examples: “Unload \*” and “Test \* Metal”. The MenuName is the text that appears when the user menu is shown at runtime. The MenuName is also used in the user menu item clicked event to identify which user menu item the user selected.

![](/resources/Storage/knowledge-base/vision-trace-graph-custom-user-menu-3-0/LinkData.png)

The MenuIcon can be set to a path of an image to display in the user menu item. The image path can be obtained in the Ignition Image Manager by right clicking on the image and selecting the Copy Path menu item.

### Add Event

Next, add the script to handle when the user selects one of the user menu items. The event.getMenuItemName() returns the MenuName for the user menu item the user selected. Use this data in your script to handle each user menu item. Also, event.getUUID() returns the UUID of the node (either a response segment or material lot) that was right-clicked by the user. The script shown in the image below handles two different user menu items. The first menu item, Show Details, shows a window to display all of the associated Operation Response details. The second menu item prints out information about the selected node.

## Scripting

![](/resources/Storage/knowledge-base/vision-trace-graph-custom-user-menu-3-0/AddEvent.png)


Code

```
 if event.getMenuItemName() == 'Show Details':
	#Get the response segment
	segment = system.mes.loadMESObject(event.getUUID())
 
	#Get the parent operations response UUID from the segment
	operationUUID = segment.getPropertyValue('OperationsResponseRefUUID')
 
	#Pass the operation response UUID to the OperationDetails
	#window so that it knows which operation to show the details for.
	system.nav.openWindow('Popups/OperationDetails', {'uuid':operationUUID})
	system.nav.centerWindow('Popups/OperationDetails')
 
elif event.getMenuItemName() == 'User Menu Item 1':
	#Get the response segment
	segment = system.mes.loadMESObject(event.getUUID())
 
	#These values (and more) can be used to query data external to Track and Trace
	begin = segment.getPropertyValue('BeginDateTime')
	end = segment.getPropertyValue('EndDateTime')
	equip = segment.getEquipment()
	print "Segment details: begin = %s, equipment name = %s" % (begin, end, equip.getName())
```


In addition to the event data items shown above, there are many others that may be used to query data external to Track and Trace including:

```
event.getLotUUID()  
```

```
event.getLotName()  
```

```
event.getLotSequence()  
```

```
event.getLotUse()  
```

```
event.getBeginDateTime()  
```

```
event.getEndDateTime() 
event.getMaterialUUID()  
```

```
event.getMaterialName()  
```

```
event.getLotEquipmentUUID()  
```

```
event.getLotEquipmentName()  
```

```
event.getSegmentUUID()  
```

```
event.getSegmentName()  
```

```
event.getSegmentEquipmentUUID()  
```

```
event.getSegmentEquipmentName()  
```

## 
References

[Response Segment](/docs/display/MHD/Response-Segment)

[Trace Graph](/docs/display/MHD/MES-Trace-Graph)

## Keywords

User Menu Items