Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

As a way to get the ReferenceKey via a SelectionItem, we can leverage using a KeyPath.  Below is a code snippet calling ShowPath() (instead of ShowSelectedItem()) on a SelectionItem:

while (srIterator.IsValid())
{
  HPS.SelectionItem selectionItem = srIterator.GetItem();

  HPS.KeyPath keyPath = new HPS.KeyPath();
  selectionItem.ShowPath(out keyPath);
  Key myKey = new Key(keyPath.Front());

  if (myKey.Type() == HPS.Type.ReferenceKey)
  {
      //Add your code here;
  }

  • No labels