Using Python to space out (add padding) between block attributes in AutoCAD

34 Views Asked by At

I am trying to create a python script with pyautocad to automate a very time consuming task in my autocad drawings.

Basically, my project inserts a block object called depth from a depth.scr script which looks like this:

color bylayer Layer set T_Depth
insert Depth 831581.3266,833944.5959 1 1 0 0.70d Layer set T_Depth
insert Depth 831585.0129,833947.7463 1 1 0 0.71d Layer set T_Depth
insert Depth 831588.0642,833950.2778 1 1 0 0.70d

Now, bascially I insert around 1000 blcok objects like this. But once imported, the problem is that the annotated attribute value of these block objects gets clustered together and I have to manaully move them around so the drawing looks more clean. I was thinking if it is possible to make a python script which I can run after inserting the block objects, which can create padding/spacing between the annotated attribute values displayed in the module automatically?

As an example, in the pic below, this is a depth block with value 0.70d which I imported.

enter image description here

enter image description here

Itself it is ok but in the third image, you can see that with multiple attribute vlaues of different blocks showing, this is unreadble. And I have to manually move the annonations to make it look clear (note that I am talking about the text not the point itself). Is it possible I can create spacing between them automatically?

enter image description here

0

There are 0 best solutions below