资源简介
利用arcpy 将mxd转换为msd,然后让脚本转换为tbx以供GP调用 来发布服务

代码片段和文件信息
import arcpy
import os
# Read the parameter values:
mxdFile = arcpy.GetParameterAsText(0)
layerName = arcpy.GetParameterAsText(1)
msdFile = arcpy.GetParameterAsText(2)
print(mxdFile)
try:
if not mxdFile.endswith(‘mxd‘):
arcpy.AddError(“not mxd“)
raise Exception(‘not mxd‘)
if not msdFile:
msdFile = os.path.splitext(mxdFile)[0] + ‘.msd‘
mxd = arcpy.mapping.MapDocument(mxdFile)
df = arcpy.mapping.ListDataframes(mxd layerName)[0]
arcpy.mapping.ConvertToMSD(mxd msdFile df “NORMAL“ “NORMAL“)
except:
arcpy.AddError(“Exception occurred - debug the source script“)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 667 2017-10-25 23:24 MxdToMsdTest\MxdToMsd.py
文件 8704 2017-10-26 09:01 MxdToMsdTest\MxdToMsd.tbx
文件 215552 2017-10-25 00:17 MxdToMsdTest\无标题.mxd
目录 0 2017-10-27 10:31 MxdToMsdTest
----------- --------- ---------- ----- ----
224923 4
相关资源
- PID_AutoTune_v0.rar
- Remote Desktop Organizer v1.4.7 支持win10
- 酒店管理系统基于Qt Creator5)
- res10_300x300_ssd_iter_140000.caffemodel与dep
- AutoCAD永久去教育版破解补丁
- CVSNT 完整覆盖版防TortoiseCVS中文乱码
- photoshop经典1000例
- ectouch最新版JSAPI微信支付V3插
- ectouch 微信支付插件
- ecshop微信支付含手机版ectouch
- Reparatory Effects of Nicotine on NMDA Recepto
- Histamine excites rat lateral vestibular nucle
- Diltiazem augmented pentobarbital-induced LORR
- 电脑卡西欧计算器 fx-991CN X Emulator19中
- Rtx51_tiny_RTOS中文版.pdf
- Micrium.RTOS.1.0.0.pack
- CAD中插入带坐标的正射影像——Inse
- Tomcat中配置数据源所需得jar包
- Phoenix BIOS Editor.rar
- Auto CAD_LISP程序集
- HP笔记本BIOS丢失解决方法,DMI TOOLK
- Adobe Illustrator CS5原版amtlib.dll文件
- Qt Creator opengl实现四元数鼠标控制轨迹
- VESA Computer Display Monitor Timing (DMT)
-
ob
jectARX给Auto CAD加工具条 - Tone-Reservation
- pctolcd2002完美版460701
- 模拟ATM柜员机系统--连接数据库
- 文件监视器file monitor
- 360安全卫士系统诊断工具CheckTool
评论
共有 条评论