...
...
Tip |
---|
Constraints may be used to hide parts of the block model based on some criteria, such as material type or grade threshold. |
...
To add a new constraint:
...
In Designer tab go to Display panel, Block Models section. Press gear icon located on the right from Constraints dropdown.
...
Table of Contents |
---|
Creating Custom Block Model Constraint
Select the gear icon next to the Constraints dropdown. This opens the Configure Constraints dialog.
Press the blue plus icon to add a new constraint.
Rename the
...
constraint to "HG
...
only".
Paste the sample formula into the code editor.
...
Double click in the Available Formulas for code hints.
...
Press OK to finish.
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 the test again, and press OK to accept.
7. In the Block Model panel on the right, toggle eye icon to show blocks and from the Constraints dropdown select the blocks
...
constraint you have created - HG only (Note that custom shadings are shown in bold orange, while standard shadings are shown in normal black).
...
8. Select Stage(s)/Bench(es) from the tree on the left to display them in the viewport and review the result.
Colors assigned for block shading can be seen in the Legend (bottom right, below the viewport).
Block Model Constraints Examples
Show only HG
Code Block | ||
---|---|---|
| ||
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Alastri.RR.Ui;
using Alastri.RR.Service;
public class CustomBlockConstraint : IBlockConstraint
{
public bool IsVisible(BlockContext context)
{
if (context.T("Parcel") == "hg")
{
return true ;
}
return false ;
}
} |
Show specific materials (parcels)
Code Block | ||
---|---|---|
| ||
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Alastri.RR.Ui;
using Alastri.RR.Service;
public class CustomBlockConstraint : IBlockConstraint
{
public bool IsVisible(BlockContext context)
{
if (context.T("Parcel") == "hg" || context.T("Parcel") == "mg")
{
return true ;
}
return false ;
}
} |
Filter by Fe (more than specific grade)
Code Block | ||
---|---|---|
| ||
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Alastri.RR.Ui;
using Alastri.RR.Service;
public class CustomBlockConstraint : IBlockConstraint
{
public bool IsVisible(BlockContext context)
{
if (context.N("DryTonnes.FE") >= 57.5)
{
return true;
}
return false;
}
} |
Filter by Fe and Al
Code Block | ||
---|---|---|
| ||
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Alastri.RR.Ui;
using Alastri.RR.Service;
public class CustomBlockConstraint : IBlockConstraint
{
public bool IsVisible(BlockContext context)
{
if (context.N("DryTonnes.FE") >= 57.5 && context.N("DryTonnes.AL") >= 1.0)
{
return true;
}
return false;
}
} |