• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

join attributes in a block

  • Thread starter Thread starter gianburrasca3
  • Start date Start date

gianburrasca3

Guest
Good morning, I have the difficulty of joining three attributes belonging to the same block in one string. the written sometimes for graphic need I have to move it, so composed I have to move the visual attributes online one at a time. I wonder if there was a chance to join the whole thing in one string. Thank you.

1689326479957.webp
 
without joining attributes, you can use this reactor. upload it as a normal lisp program. I used it on a test block containing three attributes: moving the first, all the others followed him.

(vl-load-com)
(vl-load-reactors)
(setq modifsquareactor (vlr-command-reactor nil((:vlr-commandwillstart . editbloccoprova1))))
(setq modifsquareactor (vlr-command-reactor nil ((:vlr-commandended . editbloccoprova2))))
(princ "\nreattore change test block loaded...")(princ)

(defun modifiedbloccoprova1 (reactor listcomandi)

(if (= (car listcomandi) "grip_stretch")
(progn)

(if (setq newsset)
'((0 . "insert") (2 . "bloccoprova"))
)
)
(progn)
(setq block (ssname newsset 0)
(setq listatt (vlax-safearray->list (vlax-variant-value))))))
(setq point1 (variant2point (vla-get-insertionpoint (caddr listatt)))))
(see paragraph 1)
)
)
)
)

)

(defun modifiedbloccoprova2 (reactor listcomandi)

(if (= (car listcomandi) "grip_stretch")
(progn)

(if (setq newsset)
'((0 . "insert") (2 . "bloccoprova"))
)
)
(progn)
(setq block (ssname newsset 0)
(setq listatt (vlax-safearray->list (vlax-variant-value))))))
(setq point2 (variant2point (vla-get-insertionpoint (caddr listatt)))))
(setq point3 (variant2point (vla-get-insertionpoint))))
(setq point4 (vla-put-insertionpoint (cadr listatt) (vlax-3d-point (polar point3 (angle point1 point2) (distance point1 point2))))
(setq point5 (variant2point (vla-get-insertionpoint (car listatt)))))
(setq point6 (vla-put-insertionpoint (car listatt) (vlax-3d-point (polar point5 (angle point1 point2) (distance point1 point2)))))
)
)

)
)

)

[Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep [Bleep] [Bleep] [Bleep] [Bleep [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep [Bleep] [Bleep] [Bleep] [Bleep] [Bleep [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [Bleep [Bleep] [Bleep] [Bleep] [Bleep] [Bleep] [B
;;; function which turns a variant into the coordinates of a point
(defun variant2 punto (listavariant)
(vlax-safearray->list (variant-value listvariant)
)
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top