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\

本文标签: 文件转换为DWGPython