<< Click to Display Table of Contents >>

 

SetEditTarget

 

 

將特定layer,設定為要編輯圖層

SetEditTarget(layer)

參數

說明

參數類型

layer

要指定編輯的圖層

Layer物件

SetEditTarget使用範例

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")

#設定為目前編輯圖層

sgpy.SetEditTarget(lyr)

 


©2015 Supergeo Technologies Inc. All rights reserved.