SelectScreenPosition returning Z=0

Hello, I am attempting to write a journal where a user selects a position for a PMI table to be created while on a specific view of a model (Within the modeling application).

The code below is what I'm using for screen selection:

public bool SelectScreenPos(string dialogTitle, out Point3d selectionPos)
{
int new_cursor_view = 0;
int old_cursor_view;
Selection.DialogResponse userSelection;

UFSession.GetUFSession().Ui.AskCursorView(out old_cursor_view);
UFSession.GetUFSession().Ui.SetCursorView(new_cursor_view);

userSelection = m_NXOpenUI.SelectionManager.SelectScreenPosition(dialogTitle, out View view, out selectionPos);

UFSession.GetUFSession().Ui.SetCursorView(old_cursor_view);

return userSelection == Selection.DialogResponse.Pick;
}

While the X and Y values are correct, Z is always 0, which is inconvenient since I want to place these tables on the X/Z plane.

Is there something I'm overlooking? Or is this method primarily used for NX Drafting? (Thus the automatic Z=0).

I can't find much information on the return values of that function, but I've only seen it used in the context of a drawing.

You might consider trying the "PickPoint" function. The description from the C reference is below:
Overview

Display the user message (cue) and returns a screen
position point in parameter point (X,Y,Z) on the WCS plane in
Absolute Coordinates of the Displayed Part. A typical user message
might be "Pick a point."

I don't have, nor could I find, an example of its usage; but it sounds like it would allow the user to pick a point location and it would project the cursor location to the WCS XY plane and return that point in absolute coordinates.

The .SelectScreenPosition function may behave similarly to the .SpecifyScreenPosition function; the C reference describes its return value as:

The screen position in Work Part
Absolute Coords, projected "through
the screen" onto the WCS XY plane.
This is given in Work Part Absolute Coordinates.
This is only returned if the response
returned is UF_UI_PICK_RESPONSE.

It also states that .SetCursorView affects the return values in this way:

The function UF_UI_set_cursor_view affects the screen_pos
and view_tag that is returned and passed to the motion callback. This
is particularly true with respect to the display of a drawing view. The
two values for the new_cursor_view parameter of UF_UI_set_cursor_view affect
the view_tag and screen_pos parameters of UF_UI_specify_screen_position as
follows:

. If new_cursor_view is set to "Any View" and the cursor is in a
drawing member view, then the return values for the view_tag and
screen_pos are the tag of the member view and the position in
Absolute Coordinates in that member view.

. If the new_cursor_view is set to "Work View", then regardless of
whether the cursor is in a member view or not, the return values
for the view_tag and screen_pos are the tag of the drawing and the
position in drawing coordinates.

Thank you for your investigation into those methods. I'm not sure how to use the PickPoint method as having it return tuple didn't seem to work with C#, the point parameter for that method isn't set to "out" either.

However, one point you mentioned was related to the WCS X-Y plane. I rotated my WCS such that the X-Y plane matched my desired X-Z plane and the SelectScreenPosition method worked perfectly. I'll just have the journal update the WCS and then return it to the original position for the user.