阅读:2144回复:2
用c#在AE中如何创建字段集合?
<P>I Fields pFields=new FieldsClass();<BR> IFieldsEdit pFieldsEdit=(IFieldsEdit)pFields ;<BR> IField pField=new FieldClass();<BR> IFieldEdit pFieldEdit=(IFieldEdit)pField ;<BR> pFieldEdit.Name ="Shape"; <BR> pFieldEdit.Type = ESRI.ArcGIS.Geodatabase.esriFieldType.esriFieldTypeGeometry; <BR> IGeometryDef pGeomDef =new ESRI.ArcGIS.Geodatabase.GeometryDefClass(); <BR> IGeometryDefEdit pGeomDefEdit =(IGeometryDefEdit)pGeomDef; <BR> pGeomDefEdit.GeometryType=ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryEnvelope; pFieldEdit.GeometryDef =pGeomDef ;<BR> pFieldsEdit.AddField (pField);</P>
|
|
1楼#
发布于:2005-08-17 10:32
<P>我用上面的语句创建,为什么总说pFieldEdit的Name、style等都是只读属性,不能赋值</P>
|
|
2楼#
发布于:2009-05-05 14:32
用pFieldEdit的Name_2
|
|