您好,这儿要纠正一下您对概念的理解。
首先标绘符号确实是存在数据集中的,标绘符号是以对象的形式(GeoGraphicObject)存在数据集中的。所以数据集里是找不到军标的Z值哈,正确思路是通过数据集获取数据集的记录集,通过某一条记录集(某一个标绘符号)来获取。一般是通过几何对象的风格来获取的,设置的时候也是哈。
比如:
void sc_ObjectAdded(object sender, ObjectAddedEventArgs e)
{
Layer3D layer = e.Layer3D;
if (null == layer)
{
return;
}
if (layer.Type != Layer3DType.Dataset)
{
return;
}
DatasetVector dataset = null;
Layer3DDataset layerDataset = layer as Layer3DDataset;
if (layerDataset.Dataset.Type == DatasetType.CAD && layerDataset.IsEditable == true)
{
dataset = layerDataset.Dataset as DatasetVector;
}
if (null == dataset)
{
return;
}
Recordset rect = dataset.GetRecordset(false, CursorType.Dynamic);
bool bExist = false;
bExist = rect.MoveFirst();
Geometry geo = null;
while (bExist)
{
Geometry tempGeo = rect.GetGeometry();
if (null == tempGeo)
{
bExist = rect.MoveNext();
continue;
}
if (tempGeo.ID == e.ID)
{
geo = tempGeo;
break;
}
bExist = rect.MoveNext();
}
GeoGraphicObject geoGo = geo as GeoGraphicObject;
// 对象风格的底部高层
double height = geoGo.Style3D.BottomAltitude;
MessageBox.Show("绘制的对象是:" + geoGo.GetSymbolName() + "\n" + "GeometryID = " + geoGo.ID);
}
具体您在我们帮助手册搜索GeoGraphicObject这个类,再看style3D即可。