[pycad]抛砖、续貂之cad二开零基础自用:句柄改色
# 枫叶版pycad 感谢飞狐,山人,枫叶,闻人南的示例
#让pycad不放弃每一个打螺丝人
@Command()
def changeColor23(doc): #句柄改色
handleName = 'C54D5'
db = doc.Database
with dbtrans(doc) as tr:
objid = tr.getobjectid(handleName)
obj = tr.getobject(objid, acdb.OpenMode.ForWrite)
obj.ColorIndex = 3
页:
[1]