MyEquipment Types

 

Functions

void SetPartVisible(index: integer, visibility: boolean)

This function is used to set the selected part visibility

Name Type Description
index int The part index of MyEquipment which want to change the visibility
visibility bool True to make part visible, False to make part invisible

Return value - None

Example:

var vhl = GetComponentByNameAndType("VHL1", "VHL");
vhl.SetPartVisible(2, false);

void SetPartColor(index: integer, colorName: string)

This function is used to set the selected part color

Name Type Description
index integer The conveyor to set as the targetThe part index of MyEquipment which want to change the color
colorName string Name of the color which want to assign to that part

Return value - None

 

Example:

var vhl = GetComponentByNameAndType("VHL1", "VHL")
vhl.SetPartColor(5, "Sym3 Blue");

void SetVisible(visibility: boolean)

This function is used to set the all part same visibility

Name Type Description
visibility boolean True to make part visible, False to make part invisible

Return value - None

 

Example:

var vhl = GetComponentByNameAndType("VHL1", "VHL");
vhl.SetVisible(false);

void SetColor(colorName: string)

This function is used to set the all part same color

Name Type Description
colorName string Name of the color which want to assign to all part

Return value - None

 

Example:

var vhl = GetComponentByNameAndType("VHL1", "VHL");
vhl.SetColor("Sym3 Blue");

void GetPartColor(index: integer)

This function is used to get color of the selected part by passing part index as argument

Name Type Description
index integer The part index of MyEquipment which want to get the color

Return value - String

 

Example:

var vhl = GetComponentByNameAndType("VHL1", "VHL");
var color = vhl.GetPartColor(2);
LogDebug("" + color);

void GetPartVisible(index: integer)

This function is used to get visibility of the selected part by passing part index as argument

Name Type Description
index integer The part index of MyEquipment which want to get the visibility

Return value - Bool

 

Example:

var vhl = GetComponentByNameAndType("VHL1", "VHL")
var visible = vhl.GetPartVisible(2);
LogDebug("" + visible)