[ORD C# ] How to select element in reference inactivated?

Hi all,

I am trying to select an element in reference inactivated but there is nothing I can find in the examples or any of the documentation.

Is there anyone who know how to do it?

My source code is following.

protected override bool OnDataButton(DgnButtonEvent ev)
{
    if (mode == FormAlignmentManager.Mode.selectSurfaceTemplates)
    {
        var hitPath = DoLocate(ev, true, 1);
        if (hitPath == null)
            return false;

        var element = hitPath.GetCursorElement();
        if (element == null) // element is null when I select an element in reference inactivated.
            return false;
        
        // something to do
        ...
    }
}

Let me know how to select an element in reference inactivated?

Best Regards.