"unexploding" a block

"unexploding" a block

barry2104
Collaborator Collaborator
2,816 Views
21 Replies
Message 1 of 22

"unexploding" a block

barry2104
Collaborator
Collaborator

Hi
I often get files (dwgs/dxfs) from Architects which have circles that have been "dumbed down" to closed, straight-edged polylines with say 100 nodes around the circumference. I assume these come from a block which has been exploded, in which there are 10 of these circles of differing radius but with the same centre point, representing a block for a coordinate point. So for one point on a drawing I have 10 circles with a total of 1000 lines joined from 10 polylines. These coordinate points are all over the drawing, making it unnecessarily large. Is it possible to either:
1) get AutoCAD to recognise a "straight-edged circle" so as to then convert the polyline to an actual circle, thus reducing file size?
and/or
2) at one instance, select these 10 straight-edged circles of one coord-point, and convert it to a block (or replace with a simpler, preexisting block), and subsequently / through automation, convert all other coord-points to a block (in turn replacing all other 10x straight-edged circles)?

 

Seems like a reach but thought I'd ask anyway

Running AutoCAD Architecture 2020, in German
0 Likes
Accepted solutions (2)
2,817 Views
21 Replies
Replies (21)
Message 21 of 22

Kent1Cooper
Consultant
Consultant

@barry2104 wrote:

....

@Kent1CooperI tried your code on one of my cases but it didn't seem to work - not sure why. Then I created a basic octagon and tried your lisp again, and that seemed to work. I checked the differences between the octagon and my polygon and couldn't see any problems... each were closed polylines and all segments were of equal length


You may have your display settings such that differences in length of segments [and/or in distance from vertices to the center] are further down in additional decimal places that don't show.  The routine is looking for equality to 8 decimal places, which is pretty tight.  Try changing [in two places]  1e-8  to  1e-6  or  1e-4  for a "looser" definition of equality.

Kent Cooper, AIA
0 Likes
Message 22 of 22

arslan.khalid79
Explorer
Explorer
i have used the lisp and getting this action? can you solve this for me?
"Command: BLOCKIFY
Select curves on unlocked layer(s) you want to blockify...
Select objects: Specify opposite corner: 2 found
Select objects:
Pick or specify base point of block : bad argument type: 2D/3D point: nil"
0 Likes