本文整理汇总了C++中AcDbEntity::objectId方法的典型用法代码示例。如果您正苦于以下问题:C++ AcDbEntity::objectId方法的具体用法?C++ AcDbEntity::objectId怎么用?C++ AcDbEntity::objectId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcDbEntity
的用法示例。
在下文中一共展示了AcDbEntity::objectId方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: asdktest3
void asdktest3 () {
//----- Create a line and a circle (memory only)
AcDbLine *pLine =new AcDbLine (AcGePoint3d (), AcGePoint3d (100, 100, -100)) ;
AcDbCircle *pCircle =new AcDbCircle (AcGePoint3d (50, 50, 0), AcGeVector3d (0, 0, 1) , 25.0) ;
//----- Create a region from the circle
AcDbVoidPtrArray arr1, arr2 ;
arr1.append (pCircle) ;
AcDbRegion::createFromCurves (arr1, arr2) ;
AcDbRegion *pRegion =(AcDbRegion *)arr2.at (0) ;
delete pCircle ;
//----- Add the line and the region objects to the collector
//----- NB: Remember those object are memory objects only
AsdkHlrCollector collector ;
collector.setDeleteState (true) ;
collector.addEntity (pLine) ;
collector.addEntity (pRegion) ;
//----- Process hidden line removal
AsdkHlrEngine hlr (AcGePoint3d (50, 50,0), AcGeVector3d (0, 0, 1), kEntity | kBlock | kShowAll | kProject | kHonorInternals) ;
hlr.run (collector) ;
//----- To easily see the result, we do append resulting entities to the current database
//----- and use the color convention used in command 'TEST1'
int n =collector.mOutputData.logicalLength () ;
for ( int i =0 ; i < n ; i++ ) {
AsdkHlrData *p =collector.mOutputData [i] ;
AcDbEntity *pEnt =p->getResultEntity () ;
AsdkHlrData::Visibility vis =p->getVisibility () ;
if ( vis == AsdkHlrData::kVisible )
pEnt->setColorIndex (1) ;
else
pEnt->setColorIndex (5) ;
AcDbObjectId id ;
if ( postToDatabase (NULL, pEnt, id) != Acad::eOk ) {
acutPrintf (_T("Failed to add entity to current space.\n")) ;
break ;
}
//----- Entity originator path
AcDbObjectIdArray ids =p->getObjectIds () ;
if ( ids.logicalLength () > 0 ) {
acutPrintf (ACRX_T("\n%ld, "), pEnt->objectId ().asOldId ()) ;
for ( int j =0 ; j < ids.logicalLength () ; j++ ) {
acutPrintf (ACRX_T("%ld, "), ids.at (j).asOldId ()) ;
}
}
pEnt->close () ;
}
}
示例2: acdbOpenAcDbEntity
void
ArxDbgUiTdcPersistentReactors::detachSelectedObjs(const AcDbObjectIdArray& objIds)
{
Acad::ErrorStatus es;
AcDbEntity* ent;
ArxDbgPersistentObjReactor* peReactor;
AcDbObjectId prId;
ArxDbgDocLockWrite docLock; // these potentially came from other documents
int len = objIds.length();
for (int i=0; i<len; i++) {
es = docLock.lock(objIds[i].database()); // lock the document associated with this database
if (es == Acad::eOk) {
es = acdbOpenAcDbEntity(ent, objIds[i], AcDb::kForWrite, true);
if (es == Acad::eOk) {
prId = getPersistentObjReactor(objIds[i].database(), true);
ent->removePersistentReactor(prId);
es = acdbOpenObject(peReactor, prId, AcDb::kForWrite);
if (es == Acad::eOk) {
peReactor->detachFrom(ent->objectId());
peReactor->close();
}
else {
CString str;
str.Format(_T("ERROR: Could not update backward reference in reactor: (%s)"), ArxDbgUtils::rxErrorStr(es));
ArxDbgUtils::stopAlertBox(str);
}
ent->close();
}
else {
ArxDbgUtils::rxErrorAlert(es);
}
}
else {
ArxDbgUtils::rxErrorAlert(es);
}
}
}
示例3:
//When an new entity is added, set its draw order based on the draw order of other entities on the same layer.
void
adskMyDbReactor::objectAppended(const AcDbDatabase* db, const AcDbObject* pObj)
{
AcDbEntity * pEnt = AcDbEntity::cast(pObj);
Acad::ErrorStatus es;
if (pEnt != NULL)
{
AcDbBlockTable *pBT = NULL;
AcDbBlockTableRecord *pBTR = NULL;
//use transaction since the datbase is still open for write here.
es=actrTransactionManager->enableGraphicsFlush(true);
AcTransaction *pTrans = actrTransactionManager->startTransaction() ;
if(!pTrans)
{
acutPrintf("\nCan't start transaction!");
return;
}
AcDbObject *pObj = NULL ;
AcDbDatabase *pDb = NULL;
AcDbObjectId modelSpaceId;
pDb = AcDbDatabase::cast(db);
//get AcDbBlockTable for read
if(Acad::eOk != pDb->getBlockTable(pBT, AcDb::kForRead))
{
acutPrintf("can't open block table for read");
actrTransactionManager->abortTransaction();
return;
}
//get the model space object id
if(Acad::eOk != pBT->getAt( ACDB_MODEL_SPACE, modelSpaceId))
{
acutPrintf("\ncan't get model space Id");
actrTransactionManager->abortTransaction();
pBT->close();
return;
}
pBT->close();
//get model space block record for write from transaction
if (Acad::eOk != pTrans->getObject((AcDbObject*&)pBTR, modelSpaceId, AcDb::kForWrite))
{
acutPrintf("\ncan't open model space block table record for write");
actrTransactionManager->abortTransaction();
return;
}
AcDbObjectIdArray eIds;
//get AcDbSortEntsTable
AcDbSortentsTable *pSortTab = NULL;
if(Acad::eOk != pBTR->getSortentsTable(pSortTab, AcDb::kForWrite, false))
{
acutPrintf("\ncan't get AcDbSortEntsTable for write");
actrTransactionManager->abortTransaction();
return;
}
//put objectIds of all the entities in an Id array.The order of objectIds in the array is the
//same as their draworders from bottom to top.The newly created entity is always at the top and the last item
//in the array
if(Acad::eOk != pSortTab->getFullDrawOrder(eIds))
{
acutPrintf("\ncan't get full draworder");
pSortTab->close();
actrTransactionManager->abortTransaction();
return;
}
AcDbEntity *pRefEnt = NULL;
//iterate through the entities in the order of their draworders. If an entity on the same layer is found
//insert the newly created entity before it.
int i;
for(i =0; i<eIds.length(); i++)
{
es = pTrans->getObject((AcDbObject*&)pRefEnt, eIds.at(i), AcDb::kForRead);
if(pRefEnt->layerId() == pEnt->layerId())
break;
}
eIds.insertAt(i, pEnt->objectId());
//remove the newly created entity from the end of the array
eIds.removeLast();
//reset draworder
es = pSortTab->setRelativeDrawOrder(eIds);
pSortTab->close();
es=actrTransactionManager->endTransaction();
actrTransactionManager->flushGraphics();
//set flag for regen
gbDraworderChanged = true;
}
}
示例4: LaylerFilter
bool Additional_Class::LaylerFilter( CString LaylerName, AcDbObjectIdArray &EntityID_Array, bool(*Filter)(AcDbEntity*, AcDbObjectId&) )
{
AcDbLayerTable *pLayerTbl;
acdbHostApplicationServices()->workingDatabase()->getLayerTable(pLayerTbl,AcDb::kForWrite);
if (false == (pLayerTbl->has(LaylerName)))
{
//acutPrintf("\n木有%s层!", LaylerName);
//SetError("THERE ISTN`T"+LaylerName+"LAYER!", "LaylerFilter");
pLayerTbl->close();
return false;
}
AcDbObjectId layerId;
pLayerTbl->getAt(LaylerName,layerId);
AcDbBlockTable *pBlkTbl;
//获得当前数据库块表
acdbHostApplicationServices()->workingDatabase()->getBlockTable(pBlkTbl,AcDb::kForWrite);
//获得模型空间块表记录
AcDbBlockTableRecord *pBlkTblRcd;
pBlkTbl->getAt(ACDB_MODEL_SPACE, pBlkTblRcd, AcDb::kForWrite);
//创建块表记录遍历器
AcDbBlockTableRecordIterator *pltr;
pBlkTblRcd->newIterator(pltr);
AcDbEntity *pEnt;
AcDbObjectId temp_layerId;
AcDbObjectId entityID;
//pBlkTblRcd->close();
//pBlkTbl->close();
//pLayerTbl->close();
for (pltr->start(); !pltr->done(); pltr->step())
{
if(Acad::eOk ==pltr->getEntity(pEnt, AcDb::kForRead, false))
{
//if (200>Check_Entity(pEnt)>=100)
//{
temp_layerId = pEnt->layerId();
if (temp_layerId == layerId) // 在当前图层中
{
entityID = pEnt->objectId();
if (Filter(pEnt, entityID) == true) // 符合过滤条件
{
EntityID_Array.append(entityID);
}
}
//}
pEnt->close();
}
}
int Len = EntityID_Array.length();
if (Len == 0)
{
pBlkTbl->close();
pLayerTbl->close();
pBlkTblRcd->close();
return false;
}
pBlkTbl->close();
pLayerTbl->close();
pBlkTblRcd->close();
return true;
}
示例5: asdktest1
void asdktest1 () {
//----- Select the entities
ads_name ss, en ;
if ( acedSSGet (NULL, NULL, NULL, NULL, ss) != RTNORM )
return ;
//----- Append entity IDs to the collector
long n ;
AcDbObjectId id ;
AsdkHlrCollector collector ;
collector.setDeleteState (true) ;
acedSSLength (ss, &n) ;
for ( int i =0 ; i < n ; i++ ) {
acedSSName (ss, i, en) ;
acdbGetObjectId (id, en) ;
collector.addEntity (id) ;
}
acedSSFree (ss) ;
//----- Get current viewport settings
struct resbuf rb;
acedGetVar(ACRX_T(/*NOXLATE*/"viewdir"), &rb);
ads_point dirPt;
acdbUcs2Wcs (rb.resval.rpoint, dirPt, Adesk::kTrue) ;
acedGetVar(ACRX_T(/*NOXLATE*/"target"), &rb);
ads_point tarPt;
acdbUcs2Wcs (rb.resval.rpoint, tarPt, Adesk::kFalse) ;
//----- Ask if non-visible edges should be created
int hidLines =AfxMessageBox (ACRX_T("Would you like to see hidden lines?"), MB_YESNO) ;
int honorInt =AfxMessageBox (ACRX_T("Would you like to honor internal visibility of polyface meshes or ACIS objects?"), MB_YESNO) ;
int meshSils =AfxMessageBox (ACRX_T("Would you like to calculate silhouettes of polyface meshes?"), MB_YESNO) ;
int unit =AfxMessageBox (ACRX_T("Would you like to unit solid before processing?"), MB_YESNO) ;
//----- Process hidden line removal
AsdkHlrEngine hlr (
asPnt3d (tarPt), asVec3d (dirPt),
kEntity | kBlock | kSubentity | kProgress
| (honorInt == IDYES ? kHonorInternals : 0)
| (hidLines == IDYES ? kShowAll : 0)
| (meshSils == IDYES ? kMeshSilhouettes : 0)
| (unit == IDYES ? kUnite : 0)
) ;
hlr.setAcisConversionProgressCallBack (progress1) ;
hlr.setAhlProgressCallBack (progress2) ;
hlr.setAcadConversionProgressCallBack (progress3) ;
acedSetStatusBarProgressMeter (ACRX_T("HLR running: "), 0, 300) ;
hlr.run (collector) ;
acedRestoreStatusBar () ;
//----- Assign color to the resulting entities
//----- red for visible edges
//----- blue for non-visible edges
//----- yellow for internal edges
n =collector.mOutputData.logicalLength () ;
for (int i =0 ; i < n ; i++ ) {
AsdkHlrData *p =collector.mOutputData [i] ;
AcDbEntity *pEnt =p->getResultEntity () ;
AsdkHlrData::Visibility vis =p->getVisibility () ;
if ( vis == AsdkHlrData::kVisible ) {
pEnt->setColorIndex (1) ; //----- Read
} else if ( vis == AsdkHlrData::kInternallyHidden ) {
if ( p->getHlrVisibility () == AsdkHlrData::kVisible )
pEnt->setColorIndex (2) ; //----- Yellow
else
pEnt->setColorIndex (3) ; //----- Green
} else {
pEnt->setColorIndex (5) ; //----- Blue
}
if ( postToDatabase (NULL, pEnt, id) != Acad::eOk ) {
acutPrintf (_T("Failed to add entity to current space.\n")) ;
break ;
}
if ( acdbOpenAcDbEntity (pEnt, id, AcDb::kForRead) != Acad::eOk ) {
acutPrintf (_T("Failed to open last added outputed curve.\n")) ;
break ;
}
//----- Entity originator path for block reference entities
AcDbObjectIdArray ids =p->getObjectIds () ;
if ( ids.logicalLength () > 0 ) {
acutPrintf (ACRX_T("\n%lx, "), pEnt->objectId ().asOldId ()) ;
if ( p->getSubentId ().type () != AcDb::kNullSubentType )
acutPrintf (ACRX_T("[%ld, %ld], "), p->getSubentId ().type (), p->getSubentId ().index ()) ;
for ( int j =0 ; j < ids.logicalLength () ; j++ )
acutPrintf (ACRX_T("%lx, "), ids.at (j).asOldId ()) ;
AcDbObjectId id =ids.last () ;
if ( !id.isNull () ) {
AcDbEntity *ent =NULL ;
acdbOpenAcDbEntity (ent, id, AcDb::kForRead) ;
id =ent->linetypeId () ;
ent->close () ;
if ( pEnt->upgradeOpen () == Acad::eOk )
pEnt->setLinetype (id) ;
}
}
//.........这里部分代码省略.........
示例6: AddEntityToLayer
// This command demonstrates the use of kCleanup / kReuse flags
void AddEntityToLayer (AsdkHlrCollector &collector, ACHAR *layerName) {
//----- Check layer
if ( layerName != NULL && *layerName != ACRX_T('\0') ) {
AcDbDatabase *pDb =acdbHostApplicationServices ()->workingDatabase () ;
AcDbLayerTable *pLayerTable ;
pDb->getLayerTable (pLayerTable, AcDb::kForRead) ;
if ( !pLayerTable->has (layerName) ) {
AcDbLayerTableRecord *pLayerRecord =new AcDbLayerTableRecord ;
pLayerRecord->setName (layerName) ;
pLayerTable->upgradeOpen () ;
pLayerTable->add (pLayerRecord) ;
pLayerTable->downgradeOpen () ;
pLayerRecord->close () ;
pLayerTable->close () ;
applyCurDwgLayerTableChanges () ;
} else {
pLayerTable->close () ;
}
} else {
layerName =NULL ;
}
//----- Assign color to the resulting entities
//----- red for visible edges
//----- blue for non-visible edges
//----- yellow for internal edges
int n =collector.mOutputData.logicalLength () ;
for ( int i =0 ; i < n ; i++ ) {
AsdkHlrData *p =collector.mOutputData [i] ;
AcDbEntity *pEnt =p->getResultEntity () ;
AsdkHlrData::Visibility vis =p->getVisibility () ;
if ( vis == AsdkHlrData::kVisible ) {
pEnt->setColorIndex (1) ; //----- Read
} else if ( vis == AsdkHlrData::kInternallyHidden ) {
if ( p->getHlrVisibility () == AsdkHlrData::kVisible )
pEnt->setColorIndex (2) ; //----- Yellow
else
pEnt->setColorIndex (3) ; //----- Green
} else {
pEnt->setColorIndex (5) ; //----- Blue
}
if ( layerName != NULL )
pEnt->setLayer (layerName) ;
AcDbObjectId id ;
if ( postToDatabase (NULL, pEnt, id) != Acad::eOk ) {
acutPrintf (_T("Failed to add entity to current space.\n")) ;
break ;
}
//----- Entity originator path for block reference entities
AcDbObjectIdArray ids =p->getObjectIds () ;
if ( ids.logicalLength () > 0 ) {
acutPrintf (ACRX_T("\n%ld, "), pEnt->objectId ().asOldId ()) ;
for ( int j =0 ; j < ids.logicalLength () ; j++ ) {
acutPrintf (ACRX_T("%ld, "), ids.at (j).asOldId ()) ;
}
}
pEnt->close () ;
}
}
示例7: acutNewRb
void
refEditApiExample()
{
AcDbObjectId transId;
AcDbDatabase* pDb;
char *fname;
struct resbuf *rb;
// Get a dwg file from the user.
//
rb = acutNewRb(RTSTR);
int stat = acedGetFileD("Pick a drawing", NULL, "dwg", 0, rb);
if ((stat != RTNORM) || (rb == NULL)) {
acutPrintf("\nYou must pick a drawing file.");
return;
}
fname = (char*)acad_malloc(strlen(rb->resval.rstring) + 1);
strcpy(fname, rb->resval.rstring);
acutRelRb(rb);
// Open the dwg file.
//
pDb = new AcDbDatabase(Adesk::kFalse);
if (pDb->readDwgFile(fname) != Acad::eOk) {
acutPrintf("\nSorry, that draing is probably already open.");
return;
}
// Get the Block Table and then the model space record.
//
AcDbBlockTable *pBlockTable;
pDb->getSymbolTable(pBlockTable, AcDb::kForRead);
AcDbBlockTableRecord *pOtherMsBtr;
pBlockTable->getAt(ACDB_MODEL_SPACE, pOtherMsBtr, AcDb::kForRead);
pBlockTable->close();
// Create an iterator.
//
AcDbBlockTableRecordIterator *pIter;
pOtherMsBtr->newIterator(pIter);
// Set up an object ID array.
//
AcDbObjectIdArray objIdArray;
// Iterate over the model space BTR. Look specifically
// for lines and append their object ID to the array.
//
for (pIter->start(); !pIter->done(); pIter->step()) {
AcDbEntity *pEntity;
pIter->getEntity(pEntity, AcDb::kForRead);
// Look for only AcDbLine objects and add them to the
// object ID array.
//
if (pEntity->isKindOf(AcDbLine::desc())) {
objIdArray.append(pEntity->objectId());
}
pEntity->close();
}
delete pIter;
pOtherMsBtr->close();
if (objIdArray.isEmpty()) {
acad_free(fname);
acutPrintf("\nYou must pick a drawing file that contains lines.");
return;
}
// Now get the current database and the object ID for the
// current database's model space BTR.
//
AcDbBlockTable *pThisBlockTable;
acdbHostApplicationServices()->workingDatabase()
->getSymbolTable(pThisBlockTable, AcDb::kForRead);
AcDbBlockTableRecord *pThisMsBtr;
pThisBlockTable->getAt(ACDB_MODEL_SPACE, pThisMsBtr, AcDb::kForWrite);
pThisBlockTable->close();
AcDbObjectId id = pThisMsBtr->objectId();
pThisMsBtr->close();
// Create the long transaction. This will check all the entities
// out of the external database.
//
AcDbIdMapping errorMap;
acapLongTransactionManagerPtr()->checkOut(transId, objIdArray, id, errorMap);
// Now modify the color of these entities.
//
int colorIndex;
acedGetInt("\nEnter color number to change entities to: ", &colorIndex);
AcDbObject* pObj;
if (acdbOpenObject(pObj, transId, AcDb::kForRead) == Acad::eOk) {
//.........这里部分代码省略.........
示例8: acedGetString
void
printAll()
{
int rc;
char blkName[50];
rc = acedGetString(Adesk::kTrue,
"Enter Block Name <CR for current space>: ",
blkName);
if (rc != RTNORM)
return;
if (blkName[0] == '\0') {
if (acdbHostApplicationServices()->workingDatabase()->tilemode()
== Adesk::kFalse) {
struct resbuf rb;
acedGetVar("cvport", &rb);
if (rb.resval.rint == 1) {
strcpy(blkName, ACDB_PAPER_SPACE);
} else {
strcpy(blkName, ACDB_MODEL_SPACE);
}
} else {
strcpy(blkName, ACDB_MODEL_SPACE);
}
}
AcDbBlockTable *pBlockTable;
acdbHostApplicationServices()->workingDatabase()
->getSymbolTable(pBlockTable, AcDb::kForRead);
AcDbBlockTableRecord *pBlockTableRecord;
pBlockTable->getAt(blkName, pBlockTableRecord,
AcDb::kForRead);
pBlockTable->close();
AcDbBlockTableRecordIterator *pBlockIterator;
pBlockTableRecord->newIterator(pBlockIterator);
for (; !pBlockIterator->done();
pBlockIterator->step())
{
AcDbEntity *pEntity;
pBlockIterator->getEntity(pEntity, AcDb::kForRead);
AcDbHandle objHandle;
pEntity->getAcDbHandle(objHandle);
char handleStr[20];
objHandle.getIntoAsciiBuffer(handleStr);
const char *pCname = pEntity->isA()->name();
acutPrintf("Object Id %lx, handle %s, class %s.\n",
pEntity->objectId(), handleStr, pCname);
pEntity->close();
}
delete pBlockIterator;
pBlockTableRecord->close();
acutPrintf("\n");
}
示例9: acdbOpenAcDbEntity
//
// This is where we take advantage of quite a bit of information
// provide by this big function to display multiline tooltip
// (new feature in Acad 2002) under the cursor aperture.
//
// It gets even more interesting when you mix it with OSNAP info.
//
// Have fun!
//
Acad::ErrorStatus
CSampleIPM::monitorInputPoint(
bool& bAppendToTooltipStr,
char*& pAdditionalTooltipString,
AcGiViewportDraw* pDrawContext,
AcApDocument* pDocument,
bool pointComputed,
int history,
const AcGePoint3d& lastPoint,
const AcGePoint3d& rawPoint,
const AcGePoint3d& grippedPoint,
const AcGePoint3d& cartesianSnappedPoint,
const AcGePoint3d& osnappedPoint,
AcDb::OsnapMask osnapMask,
const AcArray<AcDbCustomOsnapMode*>& customOsnapModes,
AcDb::OsnapMask osnapOverrides,
const AcArray<AcDbCustomOsnapMode*>& customOsnapOverrides,
const AcArray<AcDbObjectId>& apertureEntities,
const AcArray< AcDbObjectIdArray,
AcArrayObjectCopyReallocator< AcDbObjectIdArray > >& nestedApertureEntities,
const AcArray<int>& gsSelectionMark,
const AcArray<AcDbObjectId>& keyPointEntities,
const AcArray< AcDbObjectIdArray,
AcArrayObjectCopyReallocator< AcDbObjectIdArray > >& nestedKeyPointEntities,
const AcArray<int>& keyPointGsSelectionMark,
const AcArray<AcGeCurve3d*>& alignmentPaths,
const AcGePoint3d& computedPoint,
const char* pTooltipString)
{
char mtooltipStr[1024],
tempStr[100];
mtooltipStr[0] = '\0';
Acad::ErrorStatus es;
AcDbEntity* pEnt;
AcDbObjectId highlightId = AcDbObjectId::kNull;
if (pointComputed)
{
//
// Analyze the aperture entities.
//
if (apertureEntities.length() > 0)
{
if(strlen(mtooltipStr) > 0)
strcpy(mtooltipStr, "\nEntities under the cursor aperture:");
else
strcpy(mtooltipStr, "Entities under the cursor aperture:");
for (int i = 0; i < apertureEntities.length(); ++i)
{
if (Acad::eOk != (es = acdbOpenAcDbEntity(pEnt, apertureEntities[i], AcDb::kForRead)))
continue;
sprintf(tempStr, "\n %s%s%d%s", pEnt->isA()->name(), " <Object ID: ", pEnt->objectId(), ">");
strcat(mtooltipStr, tempStr);
pEnt->close();
// Analyze the nested aperture entities.
AcDbObjectIdArray nestedIds = nestedApertureEntities[i];
int length = nestedIds.length();
if (length > 1)
{
// There is a nested entitiy: get it.
AcDbEntity* pEnt2;
if (Acad::eOk == (es = acdbOpenAcDbEntity(pEnt2, nestedIds[length - 1], AcDb::kForRead))) {
sprintf(tempStr, "\n nested: %s", pEnt2->isA()->name());
strcat(mtooltipStr, tempStr);
pEnt2->close();
}
}
}
highlightId = apertureEntities[0];
}
//
// Analyze OSNAP.
//
if (history && Acad::eOsnapped)
{
char osnapInfo[500];
osnapInfo[0] = '\0';
switch (osnapMask)
{
case AcDb::kOsMaskEnd:
strcpy(osnapInfo, "\nOsnap:\n end");
break;
case AcDb::kOsMaskMid:
strcpy(osnapInfo, "\nOsnap:\n mid");
//.........这里部分代码省略.........