I've tried to figure out how to make this work and i'm stumped.
I want to select multiple items and run a set of commands for each item individually.
the routine draws a detail of the selected items and works great if the items i select are identical in every way,
otherwise it details only the first item in the group.
any help would be greatly appreciated
Thanks,
Larry
this is my condensed routine:
(DEFUN C:MYROUTINE()
(PROMPT "\n\n\nSelect items to detail:")
(SETQ OBJECT(SSGET))
(SETQ PQTY(SSLENGTH OBJECT))
(SETQ NP1(SSNAME OBJECT 0))
(SETQ N1(CDR(ASSOC 0(ENTGET NP1))))
(IF(= N1 "ENGCENTITY")(PROGN...
(run a series of definitions)
(DEFUN DRAWEC()
(IF(= PTYPE "A")(PROGN...
(define a series of points)
(COMMAND "PLINE" P1 "W" "0" "" P2 P3 P4 "C" "")
)
(REPEAT PQTY (DRAWEC))
(PRINC))
i don't know what i'm missing, but it's still draws all details with the parameters of the first item in the selection set
If I understood correctly, perhaps something like this
(DEFUN C:MYROUTINE () (DEFUN DRAWEC () (IF (= PTYPE "A") (PROGN... (define a series of points) (COMMAND "PLINE" P1 "W" "0" "" P2 P3 P4 "C" "") );; progn );; if );; DRAWEC (PROMPT "\n\n\nSelect items to detail:") (if (SETQ OBJECT (SSGET)) (progn (SETQ PQTY (SSLENGTH OBJECT)) (while (SETQ NP1 (SSNAME OBJECT 0)) (SETQ N1 (CDR (ASSOC 0 (ENTGET NP1)))) (IF (= N1 "ENGCENTITY") (PROGN... (run a series of definitions) (DRAWEC) );; progn );; if (ssdel NP1 OBJECT) );; while );; progn );; if (PRINC) );; MYROUTINE
hope that helps
Henrique