Jump to content

Recommended Posts

Posted

Is there a way to determine as to what object the dimension is "associated" with?

Posted
;; 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)
   )
)

Posted

I think , if the following dxf code is available within the dimension built-in codes . ( maybe ):unsure:

 

(102 . "{ACAD_REACTORS")

Posted

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)
)

Posted
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 :)

Posted
you can directly include that on the ssget filter

 

That's all my idea is about .:thumbsup:

 

And Lee as always brings the perfect solution .

 

Regards

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...