예제 #1
0
void OnlyOneSelectFilter::ssgetAddFilter (
    int ssgetFlags,
    AcEdSelectionSetService& service,
    const AcDbObjectIdArray& selectionSet,
    const AcDbObjectIdArray& subSelectionSet
)
{
    //acutPrintf(_T("\n ssgetAddFilter==> select set: %d"), selectionSet.length());
    //acutPrintf(_T("\n ssgetAddFilter==> subselect set: %d\n"), subSelectionSet.length());

    //AcEdSSGetFilter::ssgetAddFilter (ssgetFlags, service, selectionSet, subSelectionSet) ;
    if( selectionSet.length() == 0 )
    {
        if( subSelectionSet.length() > 1 )
        {
            int len = subSelectionSet.length();
            for( int i = 0; i < len - 1; i++ )
            {
                Acad::ErrorStatus es = service.remove( i );
            }
        }
    }
    else
    {
        int len = subSelectionSet.length();
        for( int i = 0; i < len; i++ )
        {
            Acad::ErrorStatus es = service.remove( i );
        }
    }
}
예제 #2
0
void MySSGetFilter::ssgetAddFilter(int ssgetFlags, AcEdSelectionSetService &service, const AcDbObjectIdArray& selectionSet, const AcDbObjectIdArray& subSelectionSet)
{
	if (m_color_index < 0)
		return;
	for (int i = 0; i < subSelectionSet.length(); ++i) {
		if (!canBeSelected(subSelectionSet[i])) {
			service.remove(i);
			continue;
		}
		if (!m_select_by_group) {
			high_light(subSelectionSet[i]);
		} else {

		}
	}
}