我做的是在点上创建标注:
piFactAdv -> CreateTextOnGeometry (pSelection, Plane, &CATUcString , &piText);
pSelection就是创建标注的位置,我把CATPoint buildPath后:
CATPathElement* pPathElement = NULL;
CATIBuildPath* pBuildPath = NULL;
HRESULT rc1 = spSpecPoint1-> QueryInterface(IID_CATIBuildPath,(void**)&pBuildPath);
CATPathElement activePath = CATFrmEditor::GetCurrentEditor()->GetUIActiveObject();
HRESULT rc2 = pBuildPath->ExtractPathElement(&activePath,&pPathElement);
if(!!pBuildPath)
{
pBuildPath->Release();
pBuildPath = NULL;
}
CATSO * pSelection = new CATSO(0);
pSelection->AddElement(pPathElement,0);
生成pSelection,没试过其他几何元素的创建。 |