akis Posted July 23, 2014 Posted July 23, 2014 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 Quote
heschr Posted July 24, 2014 Posted July 24, 2014 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. Quote
akis Posted July 25, 2014 Author Posted July 25, 2014 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? Quote
Tharwat Posted July 25, 2014 Posted July 25, 2014 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) Quote
akis Posted July 29, 2014 Author Posted July 29, 2014 thx mate, I tried it and it works... well problem is now, that most of the lines are actually LwPolylines so i m trying to implent the code i found on Afralisp (http://www.afralisp.net/autolisp/tutorials/polylines-and-blocks.php) to do the ssget from the end point of the polyline. 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.