SilverScreen Solid Modeler

prompt_pgroup

prompt_pgroup

Previous topic Next topic  

prompt_pgroup

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

int prompt_pgroup ( char *message, int p_type )

 

char *message;        // prompt message string

int   p_type;         // primitive type mask

 

 




Synopsis

#include "silver.h"

 

The prompt_pgroup function allows the user to select primitives to define a p-group, based on the p_type filter. The prompt specified by message is displayed at the bottom of the screen. This function uses either pick mode or scan mode to select an entity, depending on the current pick/scan setting.

 

 

Parameters

message is a null-terminated string containing a prompt message. p_type is an integer specifying the types of primitives that are to be considered for selection. p_type may be composed of any of the following flags or'ed together (as defined in silver.h):

 

Name

Meaning

BITS_ARC

select arcs

BITS_BEZIER

select beziers

BITS_CIRCLE

select circles

BITS_LINE

select lines

BITS_POLYGON

select polygons

BITS_POLYLINE

select polylines

BITS_SPLINE

select splines

BITS_SPOINT

select spline points

BITS_BPOINT

select bezier points

BITS_POINT

select points

BITS_ROUND

select arcs and circles

 

Return Value

prompt_pgroup returns 1 if the selection was successfully made, and 0 therwise (the user pressed Esc).

 

Comments

The paths to the p-group primitives may be accessed by get_pgroup_item . The primitives in the p-group may also be referenced in a script command by the [p-group] keyword.

 

 

See Also

fence_pgroup, prompt_primitive, get_prgoup_item

 

 

Example

C / C++ Code

 

 if ( prompt_pgroup ( "Select circles", BITS_CIRCLE ) )

    ss_command ( "redraw primitive [p-group] color yellow" );