0 Members and 1 Guest are viewing this topic.
(defun c:hle1 (/ ent ent_type lst_of_ents) (while (setq ent (car (entsel "\nPick something <enter> to quit: "))) ;; highlight the selected entity (redraw ent 3) (setq ent_type (cdr (assoc 0 (entget ent))) ; extract entity type lst_of_ents (cons ent lst_of_ents) ; create a list of entities selected ) (princ (strcat "\nAdded " ent_type " to the list")) ); while ;; un-highlight the entities (foreach item lst_of_ents (redraw item 4)) (princ) )
;convert object to vla object (setq sor (vlax-ename->vla-object (car ent))) ;set highlight to true for the selected object (vla-highlight sor "true")
(vla-highlight sor "false")
(if ss (progn (setq num (sslength ss) i -1) (while (< (setq i (1+ i)) num) (setq vlaobj (vlax-ename->vla-object (ssname ss i))) (vla-Highlight vlaobj :vlax-true) (vla-update vlaobj) ) ) )