Position on conveyor

Position on conveyor is the graphical element that is used to define the exact position on the conveyor. 

It can be used to:

 To define the position on conveyor

A position on conveyor can be drawn only if the conveyor has been previously drawn. 

  1. Drag the  Position on Conveyor element from the Space Markup section of the  Material Handling Library palette to the agent diagram. 
  2. When moving the mouse over the agent diagram, you will see that only conveyors are shown, other shapes and elements are temporarily hidden. 
  3. Place the mouse over the conveyor just where you want to place it and release the mouse button. The element will be placed on the conveyor.
  4. You can change its location on the conveyor by dragging the element with the mouse.



Name – The name of this position on conveyor. The name is used to identify and access this element from code and flowchart blocks properties.

Ignore – If selected, the position on conveyor is excluded from the model.

Visible on upper level – If selected, the position on conveyor is also visible on the upper level where this agent lives.

Lock – If selected, the position on conveyor is locked. Locked shapes do not react to mouse clicks - it is impossible to select them in the graphical editor until you unlock them.

Visible – Here you specify whether the shape is visible on animation at model runtime, or not. Using the control, choose yes or no.

Material item type - The type of the material item that is processed at this position on conveyor. This type is automatically taken from the conveyor this position on conveyor is located on. Do not change the material item type since the conveyor expects items of the same type after the position on conveyor.

Initially blocked – Toggles the state of the position on conveyor element. If selected, the position on conveyor will be blocking the flow of material items on the current conveyor once the model is launched.


In all the actions, the current material item is accessible as the local variable agent.

On leading edge enter – Here you can type Java code that will be executed when the leading edge of the material item reaches the position on the conveyor.

On trailing edge exit – Here you can type Java code  that will be executed when the trailing edge of the material item will reaches the position the on conveyor.

Position and size

Offset from conveyor start –  Offset of this element from the start point of the conveyor, measured in pixels.


Show in – Here you can choose whether you want the shape to be shown both in 2D and 3D animation, or in 2D only, or in 3D only.

Show name – If selected, the shape name is displayed on the graphical diagram.





boolean isBlocked()

Returns true if this Position on conveyor element is currently set to block the conveyor movement., returns false otherwise.

void block()

Blocks the conveyor movement. If some material item is currenty passing this Position on conveyor element, the conveyor will be blocked when this item completely passes through the element.

void unblock()

Unblocks the conveyor movement.

Agent (material item)



boolean contains(Agent agent)

Returns true if the given agent (material item) is currenty located at the position on conveyor, returns false otherwise.

Parameter: agent - the agent (material item) to be checked for being at the Position on conveyor location.

T getAgent()

Returns the agent (material item) that is currenty located at the position on conveyor, returns null if none. 

boolean removeAgent(Agent agent)

Removes the given agent from the conveyor. The agent will be removed only if it is currently located at the Position on conveyor location (the item's leading edge has reached/passed by the position and the trailing edge has not reached the position yet).

If the agent was removed successfully, returns true, otherwise returns false.

Parameter: agent - the agent (material item) to be removed from the conveyor.




double getOffset
LengthUnits units)

Returns the offset of this element from the start point of the conveyor, measured in given length units.

Parameter: units - a constant defining the length units

double getOffset()

Returns the offset of this element from the start point of the conveyor, measured in pixels.




boolean isVisible()

Returns true if the element is visible; returns false otherwise.

void setVisible(boolean v)

Sets the visibility of the element.

Parameter: v - visibility. If v is true - the element is set to be visible, if it is false - not visible.




ConveyorPath getConveyor()

Returns the conveyor where this element is located.

ConveyorNetwork getNetwork()

Returns the conveyor network this element belongs to.

Related topics


 Conveyor network

 Material Handling Library

 API reference: PositionOnConveyor class