<< Click to Display Table of Contents >>

 

ReloadTable

 

 

圖層集feature class 屬性資料表更新,通常用在修改feature class屬性資料後, 一併將修改成果更新到以開啟的屬性資料表視窗中

ReloadTable使用範例

import sgpy

# 取得目前地圖

sgd = sgpy.mapping.MapDocument("current")

# 取得data frame

df = sgd.activeDataFrame

#從檔案中載入圖層,並加入data frame中

lyr = sgpy.mapping.Layer("D:/temp/Line2.shp")

sgpy.mapping.AddLayer(df, lyr,"AUTO_ARRANGE")

layerlist = sgpy.mapping.ListLayers(df)

layer = layerlist[0]

#使用Calculate Field,計算屬性表中特定欄位的值

sgpy.RunProcess('Data Management Tools','Calculate Field',layer.name,'prop2','[prop3]')

#屬性資料表更新

sgpy.ReloadTable()

 

 


©2015 Supergeo Technologies Inc. All rights reserved.