RR. Blast Custom Labels
Custom Labels overview
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.
List of preconfigured labels in the Designer > Display panel
Adding Custom Label
You can add custom labels to the list of default ones.
Press the gear icon on the right from Text dropdown.
Click 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 OK to finish.
Custom Labels will appear orange in the list.
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("Solid") + "\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");
}
}