調べたいオブジェクトを選択して、実行です。
l=list()
for i,w in enumerate(Application.Selection(0).Envelopes(0).Weights):
if round(sum(w),5)!=100:
l.append(i)
Application.SelectGeometryComponents(Application.Selection(0).FullName+".pnt["+",".join(map(str,l))+"]")
内包表記を使うと1行で出来たよ。
Application.SelectGeometryComponents(Application.Selection(0).FullName+".pnt["+",".join([ str(i) for i,w in enumerate(Application.Selection(0).Envelopes(0).Weights) if round(sum(w),5)!=100])+"]")
l=list()
for i,w in enumerate(Application.Selection(0).Envelopes(0).Weights):
if round(sum(w),5)!=100:
l.append(i)
Application.SelectGeometryComponents(Application.Selection(0).FullName+".pnt["+",".join(map(str,l))+"]")
内包表記を使うと1行で出来たよ。
Application.SelectGeometryComponents(Application.Selection(0).FullName+".pnt["+",".join([ str(i) for i,w in enumerate(Application.Selection(0).Envelopes(0).Weights) if round(sum(w),5)!=100])+"]")
コメント