Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
During one of my commands I need to limit what the user is allowed to select, so I'm using AcEdSSGetFilter::endSSGet. However, even though my remove call comes back OK, the things I don't want to be selected are still selected. What am I doing wrong?
Code:
//------------------------------------------------------------------------------ void MySelectionReactor::endSSGet(Acad::PromptStatus returnStatus, int ssgetFlags, AcEdSelectionSetService& service, const AcDbObjectIdArray& selectionSet) //------------------------------------------------------------------------------ { Acad::ErrorStatus es = Acad::eOk; if (pApp->VetoActive()) { CADManager.StartTransaction(__FUNCTION__); for (int i = 0; i < selectionSet.length(); i++) { AcDbObjectId id = selectionSet.at(i); AcDbObject* pObject = CADManager.GetAcDbObject(id, AcDb::kForRead); AcDbBlockReference* pBlockReference = dynamic_cast<AcDbBlockReference*>(pObject); MyClass* pMine = dynamic_cast<MyClass*>(pObject); if (pBlockReference == NULL) { es = service.remove(i); } else if (pMine != NULL) { es = service.remove(i); } } CADManager.EndTransaction(__FUNCTION__); } }
(I only want to allow the user to click on block reference objects, except a specific type of block reference object - MyClass)
Solved! Go to Solution.