Dayananda Posted July 6, 2023 Posted July 6, 2023 Can I change the non associative dimension to associative by a lisp command Quote
Steven P Posted July 6, 2023 Posted July 6, 2023 Is it a LISP to run the dimreassociate command? (which will associate a dimension to a single item, not 2 items) Quote
SLW210 Posted July 6, 2023 Posted July 6, 2023 This should get you started, I haven't used it in a while, so it may need cleaned up. _dimreassociate, is there a quicker way to do an entire drawing? Quote
Steven P Posted July 7, 2023 Posted July 7, 2023 Just added this to the link from SLW210, below modified to select many dimensions. Note the entity to dimension to are lines just now, should work with other entities, just change that line, (defun c:reass ( / DimEnt MyDim Pta Ptb EndA EndB EndA_Lines EndB_Lines) (if (setq ss (ssget '((0 . "DIMENSION")) )) ; select dimensions (repeat (setq i (sslength ss)) ; loop through selection set (setq DimEnt (ssname ss (setq i (1- i)))) (command "_zoom" "O" DimEnt "") (setq MyDim (entget DimEnt)) (setq Pta (cdr (assoc 13 MyDim))) (setq Ptb (cdr (assoc 14 MyDim))) (setq EndA_Lines (ssget "_C" (mapcar '+ Pta (mapcar '/ Pta '(1000 1000 1000))) (mapcar '- Pta (mapcar '/ Pta '(1000 1000 1000))) '((0 . "LINE")) )) ; select entity close to end of dimension line (setq EndB_Lines (ssget "_C" (mapcar '+ Ptb (mapcar '/ Pta '(1000 1000 1000))) (mapcar '- Ptb (mapcar '/ Pta '(1000 1000 1000))) '((0 . "LINE")) )) ; select entity close to end of dimension line ; (command "dimreassociate" DimEnt "" "end" Pta "end" Ptb) (if EndA_Lines (command "dimreassociate" DimEnt "" "end" Pta "")) (if EndB_Lines (command "dimreassociate" DimEnt "" "end" "" "end" Ptb )) (command "_zoom" "previous") ) ; end repeat ) ; end if (princ) ; end quietly ) 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.