properly add layer for blocks during export

This commit is contained in:
Jan Kantert 2015-09-29 00:10:17 +02:00 committed by Yorik van Havre
parent d248e8f914
commit a2ef7f244d

View File

@ -1801,12 +1801,17 @@ def export(objectslist,filename,nospline=False,lwPoly=False):
# 1 wire + lone edges -> block
block = getBlock(sh,ob,lwPoly)
dxf.blocks.append(block)
dxf.append(dxfLibrary.Insert(name=ob.Name.upper()))
dxf.append(dxfLibrary.Insert(name=ob.Name.upper(),
color=getACI(ob),
layer=getGroup(ob)))
else:
# all other cases: block
block = getBlock(sh,ob,lwPoly)
dxf.blocks.append(block)
dxf.append(dxfLibrary.Insert(name=ob.Name.upper()))
dxf.append(dxfLibrary.Insert(name=ob.Name.upper(),
color=getACI(ob),
layer=getGroup(ob)))
else:
writeShape(sh,ob,dxf,nospline,lwPoly)