Using Python to count the number of layers in a AutoCAD file -


i've created gui using pyqt5 wich takes shapefiles , 1 .dwg file inputs. in .dwg file, have amount of standard layers should inside. if 1 or more of layers missing, able inform user layers missing.

for example, if .dwg files must have these layers ('trees', roads', 'houses', 'lakes' etc.), if 'roads' missing, user inform when launches gui.

using python have use python extension/library guess. i've looked , pyacad or pythoncad don't seem implemented yet. if has used python autocad, looking advice/tips. , if have alternative idea problem appreciated !

there complication here: if have .dwg cannot convert .dxf without autocad installed on machine.

if have autocad installed, use it's apis open , manipulate drawing. can done .net, c++, javascript or language compatible com (including python).

if don't have autocad installed, there cloud api it: autocad i/o. running instance on cloud can use processing .dwg drawings. way can upload .dwg script list layers. below sequence of commands list layers:

-layer ? * 

which should return list of layers. can have more .net code running on cloud instance. see more @ http://developer.autodesk.com

let me know have (scenario , goal), can advise better.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -