<< Click to Display Table of Contents >>

 

SGDWorkSpaceTool

 

 

開啟desktop工作目錄專用工具的方法,需指定要對目錄底下的哪個feature calss使用此工具,才能開啟工具,對feature calss做處理

語法:

SGDWorkSpaceTool (toolid,layerindex)

參數

說明

參數類型

toolid

要開啟SGD工具的ID,可透過ID開啟特定工具

字串

layerindex

圖層集中,目標圖層的位置

常整數

SGDWorkSpaceTool使用範例

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

#開啟圖層集中,最上方圖層的數屬性資料表

#(34002為代表開啟屬性資料表功能的ID, 0為最上方圖層在圖層集中的位置)

sgpy.SGDWorkSpaceTool("34002",0)

 


©2015 Supergeo Technologies Inc. All rights reserved.