类似倒圆角方法输入半径选择实体 kword

ads_name ename;
		ads_point adspt;
		acedInitGet(NULL, TEXT("R"));
		while (1)
		{
			int rc = acedEntSel(_T("\n选择底层直线或 [圆形半径(R)]:"), ename, adspt);
			if (rc == RTNORM || rc == RTKWORD)
			{
				if (rc == RTKWORD)
				{
					if (dDefvalue == 0)
					{
						dDefvalue = 10;
					}
					CGetInputUtil::GetReal(_T("\n输入焦点圆直径"), dDefvalue, 0, dDiameter);
					dDefvalue = dDiameter;
				}
				else if (rc == RTNORM)
				{
					AcDbObjectId entId;
					acdbGetObjectId(entId, ename);
					Acad::ErrorStatus es = acdbOpenObject(pent, entId, AcDb::kForWrite);
					if (pent->isKindOf(AcDbPolyline::desc()))
					{
						break;
					}
					else
					{
						pent->close();
						pent = NULL;
						acutPrintf(_T("\n选择的不是多段线"));
					}
				}
			}
			if (rc == RTCAN)
			{
				return;
			}
		}		

  

posted @ 2016-10-19 16:02  xzh1993  阅读(288)  评论(0编辑  收藏  举报