我有一个IFeature对象(知道它是一个只有两个端点的直线)。那我如何将它转化,而得到一个ILine对象
------解决方案--------------------
楼上的方法是错误的,ILine和IPolyLine是不能转换的,IFeature.Shape是一个高级实体,ILine是低级实体,是不能直接转换的,如果要取得ILine的话需要通过ISegmentCollection接口处理:
Dim pSegmentCol As ISegmentCollection
Set pSegmentCol = pFeature.Shape
Set pLine = pSegmentCol.Segment(0)