C++
ACCORE_PORT int acedSSAdd( const ads_name ename, const ads_name sname, ads_name result );
File
acedads.h
Description
Creates a new selection set or adds an entity to an existing selection set.
If both ename and sname are null pointers, acedSSAdd() creates a new selection set with no members. If ename is a valid entity but sname is null, acedSSAdd() creates a new selection set whose (single) member is ename. If ename specifies a valid entity and sname specifies an existing selection set, acedSSAdd() adds the ename entity to the set specified by sname. In all cases, acedSSAdd() sets result to the name of the new or updated selection set.
If the entity specified by ename is already in the set sname, acedSSAdd() ignores the request and does not report an error.
The sname and result arguments can specify the same selection set. This is the most intuitive way to add the ename entity to an existing selection set.
Every selection set that is created by calling acedSSAdd() with a null sname must later be released by a call to acedSSFree(). This applies even to empty selection sets (when ename is also null). If acedSSAdd() returns an error status code, no selection set is created. You must release the allocated selection set after you are finished with processing the selection. If you fail to do this the selection set will be kept on the stack until AutoCAD terminates. Since AutoCAD can only hold 128 application-based selection sets per session, the unreleased selection sets can result in failed object selections through ObjectARX.
Parameters
Parameters | Description |
---|---|
ename | Entity to add |
sname | Selection set of which to add ename |
result | Resulting selection set |
Returns
Returns RTNORM; otherwise, it returns an error code. When acedSSAdd() fails, it sets the system variable ERRNO to a value that indicates the reason for the failure.
Previous Declaration
AutoCAD 2025 and Earlier
int acedSSAdd(const ads_name ename, const ads_name sname, ads_name result);