用AO下用编程的方法将CAD 文件(dwg或dxf)转化成5个shp文件,其它的几个层都没有问题,关键是注记层,转换后的Shp文件是点层,而不是注记层,在ArcMap下显示是一个个的点,而不是标注,虽然点的位置和源文件的注记层的点位置一致。请问怎么生成一个标准的注记层Shp文件啊。下面是部分代码
pNewFeatCls 是Shp文件对应的featureclass
pFeatCls是从CAD文件中得到的注记层featureclass这个没有问题,请大侠指点,谢谢了
pNewFeatCls = pFeatWs.CreateFeatureClass(sShpDir, pFields, Nothing, Nothing, _
esriFeatureType.esriFTCoverageAnnotation, "shape", "")
Dim pCursor As IFeatureCursor
pCursor = pFeatCls.Search(Nothing, False)
Dim pFeat As IFeature
pFeat = pCursor.NextFeature()
Dim pNewFeat As IFeature
While Not pFeat Is Nothing
pNewFeat = pNewFeatCls.CreateFeature()
pNewFeat.Shape = pFeat.Shape
For i = 1 To pFeat.Fields.FieldCount - 1
If pFeat.Fields.Field(i).Name <> pFeatCls.ShapeFieldName Then
pNewFeat.Value(i) = pFeat.Value(i)
End If
Next
pNewFeat.Store()
pFeat = pCursor.NextFeature()
End While