AutoCAD 2010/2011/2012

Reply
Contributor
iceman81005
Posts: 12
Registered: ‎06-20-2005
Message 1 of 4 (269 Views)

Changing 0.050 dia circles to two lines (x on the center point)

269 Views, 3 Replies
02-19-2013 08:49 AM
Several years ago (10-12) I asked for help to change all circles of a certain diameter in a .dxf file to points. I received the following lisp file. For the last 10-12 years it has worked great. We create many custom sized parts that could be cut on a plasma (utilizing the circles for holes) or punched, assigning a crosshair tool to the point. Now we are switching to a laser, and want to etch a crosshair at this same location. Our solution has been to draw the crosshair and copy to each required location. Sometimes this may be 20 to 30 locations. Now I would like to know if there is a way to replace all of these circles with a crosshair. This could be a similar lisp file, or an easier manual operation. I know that I can select all of the circles using the filter command and specifying the radius. But I don't know how to assign the 'crosshair' to these locations. Can anyone help with this. (defun c:ctopt ( / ename cnt ss) (setq ss (ssget "x" '((0 . "CIRCLE")))) (if ss (progn (setq cnt 0) (repeat (sslength ss) (setq ename (ssname ss cnt)) (if (equal (cdr (assoc 40 (entget ename))) 0.025 0.005) ;use this line for a radius 0.025 +/- 0.00015 ;(<= (cdr (assoc 40 (entget ename))) 0.05) ;use this line for a radius of 0.05 or less (progn (entmake (list '(0 . "POINT") (assoc 10 (entget ename))(assoc 8 (entget ename)))) (entdel ename) )) (setq cnt (1+ cnt)) ) ) ) (princ) )
*Expert Elite*
Patchy
Posts: 6,207
Registered: ‎09-16-2009
Message 2 of 4 (254 Views)

Re: Changing 0.050 dia circles to two lines (x on the center point)

02-19-2013 09:21 AM in reply to: iceman81005

This lisp will put a point at center of a circle.

 

DDPTYPE, use the cross shape, then  FLATTEN them and answer Yes , it will explode the point to 2 plines.

 

Or ask the LISP group for new autolisp. I don't think that would be impossible to write.

*Expert Elite*
braudpat
Posts: 1,837
Registered: ‎12-15-2006
Message 3 of 4 (218 Views)

Re: Changing 0.050 dia circles to two lines (x on the center point)

02-19-2013 11:50 AM in reply to: Patchy

 

Hello

 

An other idea if you only a few circles :

Use the DIMCENTER command ...

 

Bye, Patrice

 

 

Bye, Pat

*Expert Elite*
hmsilva
Posts: 2,639
Registered: ‎12-17-2004
Message 4 of 4 (204 Views)

Re: Changing 0.050 dia circles to two lines (x on the center point)

02-19-2013 01:15 PM in reply to: iceman81005

iceman81005,

attached is a lisp quickly written, but I think it does what you need.

Minimally tested.

 

hope that helps

Henrique

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube