[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', '') 大佬牛杯哇~~~~~~~~~~ 我的上半生情尽ironpycad。下半生期待更精彩的cad,比如web3dcad.
页:
[1]