Message 1 of 3

Not applicable
11-29-2016
04:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I wanna change the clip box of a block-ref, so I tried to get the AcDbSpatialFilter *pFilter of the block, like this
AcDbBlockReference *pBlkRef = NULL; if (Acad::eOk != acdbOpenObject(pBlkRef, idBlk, AcDb::kForWrite)) return false; AcDbSpatialFilter *pFilter = NULL; Acad::ErrorStatus es = AcDbIndexFilterManager::getFilter(pBlkRef, AcDbSpatialFilter::desc(), AcDb::kForRead, pFilter); pBlkRef->close();
but comes the err
1>..\Common\Entity\BlockUtil.cpp(546) : error C2665: “AcDbIndexFilterManager::getFilter”: 2 个重载中没有一个可以转换所有参数类型 1> d:\objectarx\objectarx2010\inc\dbindex.h(179): 可能是“Acad::ErrorStatus AcDbIndexFilterManager::getFilter(const AcDbBlockReference *,const AcRxClass *,AcDb::OpenMode,AcDbFilter *&)” 1> d:\objectarx\objectarx2010\inc\dbindex.h(184): 或 “Acad::ErrorStatus AcDbIndexFilterManager::getFilter(const AcDbBlockReference *,int,AcDb::OpenMode,AcDbFilter *&)” 1> 试图匹配参数列表“(AcDbBlockReference *, AcRxClass *, AcDb::OpenMode, AcDbSpatialFilter *)”时
it must be the err of the value put in for the const AcRxClass* key
Acad::ErrorStatus getFilter( const AcDbBlockTableRecord* pBlkRef, const AcRxClass* key, AcDb::OpenMode readOrWrite, AcDbFilter*& pFilter); pBlkRef Input block reference from which to get the filter key Input class descriptor that is used as a key, to get to the filter readOrWrite Input mode in which to open the object pFilter Returns the filter
So how to use the AcDbIndexFilterManager::getFilter Function to get the pFilter of the block-ref?
Solved! Go to Solution.