---
title: "getMarkerConnection"
canonical: "https://help.vicon.com/space/ShogunPost121/1253738745/getMarkerConnection"
format: markdown
---
# Description

Determines if there is a connecting line between two markers. Will return true if a connecting lines exists, false if one does not exist.

## Functional area

Data retrieval

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `getMarkerConnection "sourceMarker" "targetMarker"` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `sourceMarker` | string | yes | Marker at one end of connecting line. |
| `targetMarker` | string | yes | Marker at other end of connecting line. |

### Flags

None

## Return value

boolean

Returns true if there is a connecting line between the two markers or false if there is not. 

> Macro (scroll-pagebreak)

## Examples

```plaintext
// Determine if there is a connecting line
// between two markers.
boolean $hasLine;
 
// First set up some marker connections on the head
setMarkerConnection "LFHD" "RFHD";
setMarkerConnection "RFHD" "RBHD";
 
// Demonstrate the existence of the marker connection we just made.
$hasLine = `getMarkerConnection "LFHD" "RFHD"`;
print $hasLine; // Should be true 
  
// Demonstrate the lack of a connection
$hasLine = `getMarkerConnection "LBHD" "RFHD"`;
print $hasLine; // Should be false
```

# Additional information

## Related commands

- [removeMarkerConnection](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737547)
- [setMarkerConnection](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736757)