阅读:1758回复:1
请教AddFeature的用法
<P> 我在用AddFeature添加图元时,它的RowValues参数该怎么用?语法如下</P>
<P>OBJECT.AddFeature (Source, [RowValues]) </P> <P>我的代码如下,请高手看看!</P> <P>procedure TfrmMain.SaveToFeature(LayerName:String); var SelFeature:MapXLib_TLB.CMapXFeature; rvs:MapXLib_TLB.RowValues; i,iCount:Integer; begin //获得选择要素的总数 iCount:=Map.Layers.Item[EditLayerName].Selection.Count; if iCount<=0 then begin MsgBox1(handle,'请先选择要添加的元素!','保存信息'); exit; end; try for i:=1 to iCount do begin SelFeature:=Map.Layers.Item[EditLayerName].Selection.Item; rvs:=Map.Layers.Item[EditLayerName].DataSets.Item.RowValues[SelFeature]; Map.Layers.Item[LayerName].AddFeature(SelFeature,rvs); Map.Layers.Item[EditLayerName].DeleteFeature(SelFeature); end; except on E:Exception do ShowMessage(E.Message); end; end;</P> |
|
|
1楼#
发布于:2005-04-18 09:30
顶
|
|
|