C++
int acedSSSubentAdd( const AcDbFullSubentPath& subentity, const ads_name sname, ads_name result );
File
acedsubsel.h
Description
Creates a new selection set or adds an entity to an existing selection set.
If subentity is a valid subentity but sname is null, this function creates a new selection set whose single member is subentity. If subentity specifies a valid subentity and sname specifies an existing selection set, this function adds subentity to the set specified by sname. In all cases, this function sets result to the name of the new or updated selection set.
If the subentity specified by ename is already in the set sname, this function 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 subentity to an existing selection set.
Every selection set that is created by calling this function with a null sname must later be released by a call to acedSSFree().
You must release the allocated selection set after you finish processing the selection. If you fail to do so 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.
Returns RTNORM if successful. Otherwise, this function returns an error code. If this function returns an error status code, no selection set is created.
Parameters
Parameters | Description |
---|---|
subentity | Input the full subentity path to add to the selection set |
sname | Input name of an existing selection set or null |
Returns
Output name of resulting selection set