使用产品:iobject net 10i 操作系统:win7 x64
数据类型: CAD
DatasourceConnectionInfo dsci = new DatasourceConnectionInfo();
Workspace workspace = new Workspace();
dsci.EngineType = EngineType.VectorFile;
dsci.Server = @"E:\Code\测试\驾校.dwg";
dsci.Alias = "DWG";
Datasource pDatasource = workspace.Datasources.Open(dsci);
Datasets pDatasets = pDatasource.Datasets;
var pDataSet = pDatasets[0];
var pDataSetV = (DatasetVector)pDatasets[0];
Recordset pRecordset = pDataSetV.GetRecordset(false, CursorType.Static);
for (int i = 0; i < pRecordset.RecordCount; i++)
{
Geometry pGeometry = pRecordset.GetGeometry();
System.Diagnostics.Debug.Print(pGeometry.Type.ToString());
}
我输出看过,只有一个数据集,输出的几何类型,都是GeoPoint;
但实际上,这个CAD是有面图层的;我只想获取layer=“X"的面图层上的图斑;