RR. Blast Custom Labels
In the Designer tab in Display panel locate Labels section and press Text dropdown: there is a preloaded list of automatic labels for the level hierarchy and reserves fields.
We can add to this list by configuring custom labels displaying various data and properties.
Adding Custom Labels
Select the gear icon next to the Text dropdown. This opens the configuration dialog.
Press the blue plus icon to add a new label.
Rename the label to "Ore Tonnes" for example.
Paste the sample formula into the code editor.
Double click in the Available Formulas for code hints.
Press the Test button to make sure your code is correct. Any errors found will be shown in the Errors panel and won’t let you to proceed.
Fix any errors detected, run test again and press OK to accept.
In the Labels panel on the right, toggle eye icon to show labels and from the Text dropdown select the label you have created - Ore Tonnes (Note that custom shadings are shown in bold orange, while standard shadings are shown in normal black).
Select bench from the tree on the left to display it in the viewport and review the result.
Custom Labels Examples
See below a list of the most common custom labels you can copy and paste into your Code Editor, making some custom changes as required.
Multi-Line Label
using System;
using Alastri.RR.Ui;
using Alastri.RR.Service;
public class LabelFormat : ILabel
{
public string GetLabel(ShadingContext context)
{
return "Blast " + context.GetLevelName("Blast") + "\n"
+ context.GetReserveValue("Volume").ToString("#,##0") + " bcm \n"
+ context.GetReserveValue("DryTonnes").ToString("#,##0") + "t";
}
}
Â
Area / Perimeter Ratio
using System;
using Alastri.RR.Ui;
using Alastri.RR.Service;
public class LabelFormat : ILabel
{
public string GetLabel(ShadingContext context)
{
return (context.SurfaceArea / context.Perimeter).ToString("#,##0.00");
}
}
Â
Ore Tonnes Label
using System;
using System.Collections.Generic;
using System.Linq;
using Alastri.RR.Ui;
using Alastri.RR.Service;
public class LabelFormat : ILabel
{
public string GetLabel(ShadingContext context)
{
List<string> temp = context.GetParcels();
List<string> parcels = temp.ConvertAll(low => low.ToLowerInvariant());
List<string> ores = new List<string>(){ "hg", "mg", "lg" };
double oreTonnes = 0;
foreach(var parcel in parcels)
{
if(ores.Any(ore => parcel.StartsWith(ore)))
{
oreTonnes += context.GetReserveValue("DryTonnes", parcel);
}
}
return oreTonnes.ToString("#,##0");
}
}
Â
Â
Waste Tonnes Label
Â
Â
Majority Parcel
Â
Ore Ratio
Â
Â
Grade Control Naming Convention
Â
Calculate Blast Type
Â
Â
Export Name
Custom label including Mine - Pit - Stage names.
Â
Â
Export Description
Custom label including Full name + Blast Property + Blast Type.
Â
Â
Â