当前位置: 首页>>代码示例>>C++>>正文


C++ AcDbEntity::highlight方法代码示例

本文整理汇总了C++中AcDbEntity::highlight方法的典型用法代码示例。如果您正苦于以下问题:C++ AcDbEntity::highlight方法的具体用法?C++ AcDbEntity::highlight怎么用?C++ AcDbEntity::highlight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AcDbEntity的用法示例。


在下文中一共展示了AcDbEntity::highlight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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");
//.........这里部分代码省略.........
开发者ID:kevinzhwl,项目名称:ObjectARXMod,代码行数:101,代码来源:SampleIPM.cpp


注:本文中的AcDbEntity::highlight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。