admin管理员组文章数量:1574056
我是python的新手。我要将dwg文件转换为形状文件。我找到了一些密码。当我运行代码时,我得到一个错误。我怎样才能解决这个问题?这里是错误Traceback (most recent call last):
File "C:\Users\Merve\Desktop\dwgtoshp\dwg2shp.py", line 91, in
arcpy.Iteratedatasets_mb(dwg_dosyalari, "", "", "NOT_RECURSIVE")
AttributeError: 'module' object has no attribute 'IterateDatasets_mb'# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# dwg2shp.py
# Created on: 2017-01-30 13:59:57.00000
# (generated by ArcGIS/ModelBuilder)
# Usage: dwg2shp
# Description:
# ---------------------------------------------------------------------------
# Import arcpy module
import arcpy
# Load required toolboxes
arcpy.ImportToolbox("C:\Users\Merve\Desktop\dwg\dwg2shp.tbx")
# Script arguments
pro_id = arcpy.GetParameterAsText(0)
if pro_id == '#' or not pro_id:
pro_id = "1000888" # provide a default value if unspecified
pro_tip = arcpy.GetParameterAsText(1)
if pro_tip == '#' or not pro_tip:
pro_tip = "33" # provide a default value if unspecified
dwg_dosyalari = arcpy.GetParameterAsText(2)
if dwg_dosyalari == '#' or not dwg_dosyalari:
dwg_dosyalari = "F:\\proje\\gelen" # provide a default value if unspecified
Name = arcpy.GetParameterAsText(3)
if Name == '#' or not Name:
Name = "Dataset" # provide a default value if unspecified
Cikti_yeri = arcpy.GetParameterAsText(4)
if Cikti_yeri == '#' or not Cikti_yeri:
Cikti_yeri = "C:\Users\Merve\Desktop\dwgtoshp\yenidwgdosyaları" # provide a default value if unspecified
line_merge_shp = arcpy.GetParameterAsText(5)
if line_merge_shp == '#' or not line_merge_shp:
line_merge_shp = "C:\Users\
版权声明:本文标题:python dwg文件_Python将dwg文件转换为shapefi 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1727765448a1128446.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论