Code Red > AutoLISP (Vanilla / Visual)
Flag if dimension is not associative
ELOQUINTET:
Hey guys,
Do any of you have a routine which will flag any dims which are not associative? The new place is dimensioning in paper space and it's driving me bonkers
Josh Nieman:
"Associative" is a read-only (unless it's associative, you can turn that off, but it's a one-way street from the properties menu) and is a listed property of a dimension object, so you could probably just find out what dxf value is tied to that, and check for the corresponding number.
CAB:
This may help:
http://www.theswamp.org/index.php?topic=7788.0
ELOQUINTET:
another thing that might be useful for me at this point would be an alert when any of my dimensions become non associative instead of discovering it after i've done a bunch of work and have to wind up redoing one or the other. i haven't been able to find a completed routine on the net which is somewhat surprising to me.
mkweaver:
This won't flag your dimensions automatically, but running the routine and selecting all at the prompt will flag all dimensions with overrides:
--- Code: ---(defun c:FlagForcedDims( / ss1 ssl indx obj to)
(cond
((null (setq ss1 (ssget '((0 . "DIMENSION")))))
nil
)
((= 0 (setq ssl (sslength ss1)))
(princ "\nNothing selected.")
)
(T
(setq indx -1)
(while (> ssl (setq indx (1+ indx)))
(setq
obj (vlax-ename->vla-object (ssname ss1 indx))
to (vla-get-textoverride obj)
)
(if (= "" to)
nil
(progn
(vla-put-textcolor obj 1)
(vla-put-lineweight obj 80)
(vla-put-textoverride obj (strcat to " measures " (rtos (vla-get-measurement obj))))
)
)
)
)
)
(princ)
)
--- End code ---
The result looks like this:
Navigation
[0] Message Index
[#] Next page
Go to full version