static
{
ads_point
ads_name
if
return;
AcDbObjectId
if
return;
AcDbObjectPointer<<span style=”color: rgb(43, 145, 175);”>AcDbBlockReference> pRef(idXref,
if
acutPrintf(_T(“Not an xref!\n”));
return;
}
AcGePoint2dArray
if
pRef->close();
return;
}
//the ECS of the vertices must be defined in the
//coordinate system of the _block_ so let’s calculate
//transform all points to that coordinate system
AcGeMatrix3d
mat.invert();
AcGePoint3d
pt3d.transformBy(mat);
pts.append(AcGePoint2d(pt3d.x, pt3d.y));
while
acedGrDraw(pt1, pt2, 1, 1);
pt3d = asPnt3d(pt2);
pt3d.transformBy(mat);
pts.append(AcGePoint2d(pt3d.x, pt3d.y));
memcpy(pt1, pt2,
}
acedRedraw(NULL,0);
AcDbDatabase* pDb = acdbHostApplicationServi
AcGeVector3d
double
if
normal = pDb->ucsxdir().crossProduct(pDb->ucsydir());
elev = pDb->elevation();
}
normal = pDb->pucsxdir().crossProduct(pDb->pucsydir());
elev = pDb->pelevation();
}
normal.normalize();
Acad::ErrorStatus
if
pRef->close();
return;
}
//create the filter
AcDbSpatialFilter* pFilter =
//add it to the extension dictionary of the block reference
//the AcDbIndexFilterManger class provides convenient utility functions
if
delete
else
acutPrintf(_T(“Filter has been succesfully added!\n”));
pRef.object()->downgradeOpen();
}
if
ACDB_INFINITE_XCLIP_DEPTH,-ACDB_INFINITE_XCLIP_DEPTH,
{
acutPrintf(L”Filter setDefinition failed.”);
//remove the filter if setDefinition fails.
pFilter->erase();
}
es = pFilter->erase();
pFilter->close();
pRef->close();
}


杭州格原