python dwg文件_Python将dwg文件转换为shapefi

新手Python用户尝试将DWG文件转换为Shapefile时遇到错误。在使用ArcGIS ModelBuilder生成的代码中,出现'IterateDatasets_mb'属性错误。错误发生在尝试使用arcpy模块进行数据迭代时。
摘要由CSDN通过智能技术生成

我是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\

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值