I’m working on a cleaning script.
My goal is to associate every annotation of my drawing to the “Default” style.
This is the part of the script for simple objects (not in block):
def clean_annotations(annotations):
annotations_nb=len(annotations)
for i in range(0, annotations_nb):
rs.DimensionStyle(annotations[i], "Default")
clean_annotations(dim)
It works : dimensions, texts and leaders style become “Default”.
I want to apply the same thing inside blocks :
blocks_names=rs.BlockNames(sort=False)
blocks_count=rs.BlockCount()
for i in range (0, blocks_count):
objs_block_id=rs.BlockObjects(blocks_names[i])
objs_block_nb=len(objs_block_id)
for j in range(0, objs_block_nb):
rs.DimensionStyle(objs_block_id[j], "Default")