Search the Community
Showing results for tags 'solidworks. center'.
-
Replace Block with Centermark Problem Solving Question....
ILoveMadoka posted a topic in AutoLISP, Visual LISP & DCL
I create drawings from Solidworks and bring them into Autocad all day. The centermarks come in as blocks all with unique names. Our drafting standard requires me to delete these center marks.. (I think Lee or someone coded a cool routine that did that for me..) (Lee or someone also wrote a snippet of code that allowed me to select a group of circles and have a centermark placed in each per the current DIMCEN settings.) I was going to attempt some code that automated all that into one routine. I hit a snag when I realized I can't "replace" the block with a standard centermark since placing a centermark requires selecting a circle. I could create a block and replace the block but we have so many varying scales plus our "standard" centermark is not a block so I'd be outside the drafting standard by doing that. I was thinking along the lines of drawing a circle at the block insertion point, then placing a centermark there then deleting the circle. Since there are people here much smarter than me in problem solving I'm asking if this would be the way to go of does someone have a better suggestion? Here is my code where I stopped when I realized I had to pick a circle. It's not much I know... (defun C:SWC (/ I SS) (Prompt "Replace SW Centermark with DIMCEN:") (setq SS (ssget "x" '((0 . "INSERT")(2 . "*SW_CENTERMARKSYMBOL_*")))) (setq I 0) (command ".dim") (repeat (sslength SS) (command "center" (list (ssname SS I) '(0 0))) ;!!!It wants a circle to place the centermark in! Draw & Erase? (setq i (1+ I))) (command "exit") ) (command "Erase" SS "") (princ)) Thanks ...