version 2003
PA_CopyNamedSelection (tableNum; selName)
Parameter | Type | Description | |
tableNum | short | Table number | |
selName | char * | Name of the named selection to create |
Description
The routine PA_CopyNamedSelection copies the current selection of table tableNum to the named selection selName, which contains a copy of the selection. The current selection and the current record of the table tableNum for the process are not changed.
This is similar to the CREATE NAMED SELECTION command. Please refer to this command for more information.
Remember to free up memory used by selName once you have finish to working with it by calling PA_ClearNamedSelection.
Example
Save the selection, and reuse it twice after.
/* . . . previous code . . . */ PA_CopyNamedSelection( 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); // free memory PA_ClearNamedSelection(tableNum);
See Also
COPY NAMED SELECTION, Named selections and 4DPluginAPI, PA_ClearNamedSelection, PA_UseNamedSelection.
Error Handling
Use PA_GetLastError to see if an error occurred