[pycad]抛砖、续貂之cad二开零基础自用:命令行改色
# 枫叶版pycad 感谢飞狐,山人,枫叶,闻人南的示例
#让pycad不放弃每一个打螺丝人
@Command()
def changeColor24(doc): #命令行改色
ed = doc.Editor
with dbtrans(doc) as tr:
ss = ssget_x(filters=(0, 'text') )
ids = tuple(ss)
for objid in ids:
ids = acdb.ObjectIdCollection()
ids.Add(objid)
ids = tuple(ids)
ent = aced.SelectionSet.FromObjectIds(ids)
ed.Command('._change',ent, '', 'p', 'c', '3', '')
页:
[1]