Jump to content

Recommended Posts

Posted

Hey,

I’m trying to insert xdata to a structured cabling plan, problem is the socket(start) & patch panel (end) are blocks which I connect with a line, and I want the xdata to be the same on the line and on the 2 blocks. Is there a way that I can insert xdata to one of the 3 and automatically be inserted to the other 2 ?

I thought of the group command but when I select to insert xdata each of the 3 entities are separate.

 

Thanks

Posted

Hi akis,

 

This can only achieved through AutoLisp and Reactors, but is kind of an advanced topic. Head over to the Autolisp forum and try your luck.

Posted

any help on where to read and how to do that?

I guess there no easy way to group the whole thing and select it all together to add data?

Posted

Here is an example to select a line and should select the blocks that are intersecting the selected line and there must be two blocks selected only .

 

Note: if you add the block name to the selection set , it would be more accurate .

 

(defun _Prepare:to:xdata (/ s e ss)
 (if (and (setq s (car (entsel "\n Select a line :")))
             (eq (cdr (assoc 0 (setq e (entget s)))) "LINE")
             (setq ss (ssget "_F"
                             (list (cdr (assoc 10 e)) (cdr (assoc 11 e)))
                             '((0 . "INSERT"))
                      )
             )
             (eq (sslength ss) 2)
        )
   (list s (ssname ss 0) (ssname ss 1)) 
 )
)
(_Prepare:to:xdata)

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