pBe Posted April 17, 2012 Posted April 17, 2012 Is there a way to determine as to what object the dimension is "associated" with? Quote
Lee Mac Posted April 17, 2012 Posted April 17, 2012 ;; Dimension Associations - Lee Mac ;; Returns a list of enames associated with an Associative Dimension (defun LM:DimAssociations ( ent / _massoc ) (defun _massoc ( key lst / pair ) (if (setq pair (assoc key lst)) (cons (cdr pair) (_massoc key (cdr (member pair lst)))) ) ) (if (and (setq ent (entget ent)) (wcmatch (cdr (assoc 0 ent)) "*DIMENSION") (setq ent (cdr (assoc 360 (member '(102 . "{ACAD_XDICTIONARY") ent)))) (setq ent (dictsearch ent "ACAD_DIMASSOC")) ) (_massoc 331 ent) ) ) Quote
Tharwat Posted April 17, 2012 Posted April 17, 2012 I think , if the following dxf code is available within the dimension built-in codes . ( maybe ) (102 . "{ACAD_REACTORS") Quote
Tharwat Posted April 17, 2012 Posted April 17, 2012 This worked for me .... (defun c:AssocDims (/ s ss i sn e) (setq s (ssadd)) (if (setq ss (ssget "_x" '((0 . "*DIMENSION")))) (repeat (setq i (sslength ss)) (setq sn (ssname ss (setq i (1- i)))) (if (member '(102 . "{ACAD_REACTORS") (entget sn)) (ssadd sn s) ) ) (princ) ) (if (> (sslength s) 0) (print (strcat "You have :" " < " (itoa (sslength s)) " > " " " "Associative Dimsneions " ) ) ) (princ) ) Quote
pBe Posted April 17, 2012 Author Posted April 17, 2012 This worked for me .... I'll have a look-see at your code later Tharwat. However, you can directly include that on the ssget filter Thanks nonetheless Quote
Tharwat Posted April 17, 2012 Posted April 17, 2012 you can directly include that on the ssget filter That's all my idea is about . And Lee as always brings the perfect solution . Regards 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.