Sample NX Open Java routine : select an edge

Sample NX Open Java routine : select an edge

  public static TaggedObject selectAnEdge(String prompt) throws NXException,
            java.rmi.RemoteException {
        UI theUI = (UI) SessionFactory.get("UI");
        Selection.MaskTriple mask[] = { new Selection.MaskTriple(
                UFConstants.UF_solid_type, 0,
                UFConstants.UF_UI_SEL_FEATURE_ANY_EDGE) };
        Selection.SelectTaggedObjectData selObj = theUI.selectionManager()
                .selectTaggedObject(prompt, "Select an Edge",
                        Selection.SelectionScope.ANY_IN_ASSEMBLY,
                        Selection.SelectionAction.CLEAR_AND_ENABLE_SPECIFIC,
                        false, false, mask);

        if (selObj.response == Selection.Response.OBJECT_SELECTED
                || selObj.response == Selection.Response.OBJECT_SELECTED_BY_NAME) {
            return selObj.object;
        } else
            return null;
    }