Skip to main content
18-Opal
May 14, 2022 1:09 PM UTC
Solved

Is it possible to the dimensioning effect?

Hi, We are implementing the dimension placement function with TOOLKIT.


We a using ProSelect and ProMousePickGet.
ProSelect gives the user a visual indication of the situation in which they need to make a choice. (via window and mouse pointer change)
ProMousePickGet returns a 3D PNT when clicking in the graphics area without any notification to the user.

 

I'd like to give the user a visual notification while ProMousePickGet is running, any ideas?

Ideally, We want to give a visual effect around the mouse in the graphics area, such as placing dimensions.

 

thanks.

Warm Regards,

SeonHo Cha.

14-Alexandrite
May 16, 2022 7:50 AM UTC

You can use the TK commands ProGraphics*Draw() to display lines, arcs, circles, polygons and text within the graphical area of models/assemblies.

There are tons of sample code for these kind of commands within the documentation.

 

Creating any visual indication for the user while moving the cursor within the graphics window area could look like this:  

ProMouseButton BtnPressed = PRO_NO_BUTTON;
ProPoint3d position;

do {
 ProMouseTrack(PRO_MOUSETRACK_OPT_ALLOW_VIEWING, &BtnPressed, position); // Get cursor position

 ProWindowRepaint(PRO_VALUE_UNUSED); // Clear previously drawn stuff

 // Draw new stuff using position from ProMouseTrack

 } while (BtnPressed == PRO_NO_BUTTON); // loop exits if any button is pressed by the user

 

3 replies

14-Alexandrite
May 16, 2022 7:50 AM UTC

You can use the TK commands ProGraphics*Draw() to display lines, arcs, circles, polygons and text within the graphical area of models/assemblies.

There are tons of sample code for these kind of commands within the documentation.

 

Creating any visual indication for the user while moving the cursor within the graphics window area could look like this:  

ProMouseButton BtnPressed = PRO_NO_BUTTON;
ProPoint3d position;

do {
 ProMouseTrack(PRO_MOUSETRACK_OPT_ALLOW_VIEWING, &BtnPressed, position); // Get cursor position

 ProWindowRepaint(PRO_VALUE_UNUSED); // Clear previously drawn stuff

 // Draw new stuff using position from ProMouseTrack

 } while (BtnPressed == PRO_NO_BUTTON); // loop exits if any button is pressed by the user

 

Translate
CHASEONHO18-OpalAuthor
18-Opal
May 19, 2022 8:43 AM UTC

Thank you,

 

Is it possible to determine if a clicked on a non-graphics area?

Translate
14-Alexandrite
May 19, 2022 11:48 AM UTC
if (ProMouseTrack(...) == PRO_TK_PICK_ABOVE)
{
 // User clicked while cursor was outside graphical area
}
Translate