|
![]() |
![]() |
version 2003
PA_CutNamedSelection (tableNum; selName)
Parameter | Type | Description | |
tableNum | short | → | Table number |
selName | char * | → | Name of the named selection to create |
Description
The routine
PA_CutNamedSelection
creates a named selection
selName
and moves the current selection of the table
tableNum
to it. This command differs from
PA_CopyNamedSelection
in that it does not copy the current selection but rather moves it from the table.
After the command has been executed, the current selection in the current process becomes empty.
This is similar to the
CUT NAMED SELECTION
command. Please refer to this command for more information.
Example
Save the selection, and reuse it twice after. The same example is given for the
PA_CopyNamedSelection
routine. This one is more efficient since it uses less memory.
/* . . . previous code . . . */
PA_CutNamedSelection( tableNum, "\ptempSel"); // (using Pascal strings)
DoMyQuery(tableNum); // internal routine that searches for records
if(PA_RecordsInSelection(tableNum) = 0) // nothing found - back to previous ordered selection
PA_UseNamedSelection(tableNum); // "Use" after "Cut" clears the namedSelection
else
PA_ClearNamedSelection(tableNum);
`
See Also
CUT NAMED SELECTION , Named selections and 4DPluginAPI , PA_UseNamedSelection .
Error Handling
Use
PA_GetLastError
to see if an error occurred