文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>How do I access arcobjects from python?

How do I access arcobjects from python?

时间:2010-11-01  来源:GIS的学习

Recipe

  1. Download and install WinSDk and Visual Studio.
  2. Unpack Mark's package somewhere
  3. Edit DemoTool.idl if necessary (e.g. path to esriSystemUI.olb)
  4. Open the WinSDK CMD shell and run midl DemoTool.idl (creates DemoTool.tbl needed for registering COM objects)
  5. Register the com objects with python DemoTool.py -regserver

You are now ready to access arcobjects with python:

from Snippets import GetLibPath, InitStandalone 
from comtypes.client import GetModule, CreateObject 
m = GetModule(GetLibPath() + "esriGeometry.olb") 
InitStandalone() 
p = CreateObject(m.Point, interface=m.IPoint) 
p.PutCoords(2,3) 
print p.X, p.Y 
相关阅读 更多 +
排行榜 更多 +
无敌赛车王

无敌赛车王

赛车竞速 下载
多人汽车聚会

多人汽车聚会

赛车竞速 下载
漂移基地

漂移基地

赛车竞速 下载