TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: rude dog on July 30, 2004, 05:10:17 PM
-
Any one know a way to setq objects that have just been arrayed polar or rectangular doesnt matter....
-
need more info, maybe some of the code you're using.
-
got it
ssget "x" with a few filters
thx
-
so in other words you want to setq _each_ object in the sset?
something like;
(setq ss (ssget))
for each item in ss setq var entity
-
; Rune Wold and Michael Puckett - modified
; e.g. usage (setq marker (ALE_LASTENT))
(defun ALE_LastEnt ( / EntNam OutVal)
(and
(setq OutVal (entlast))
(while (setq EntNam (entnext OutVal))
(setq OutVal EntNam)
)
)
OutVal
)
;
; E.g. to include also the reference entity:
; (command "MOVE" (ALE_SS-AFTER marker) marker "" ...)
;
(defun ALE_Ss-After (EntNam / EntNxt SelSet)
(cond
( (not EntNam) (ssget "_X") )
( (setq EntNxt (entnext EntNam))
(setq SelSet (ssadd EntNxt))
(while (setq EntNxt (entnext EntNxt))
(if (entget EntNxt) (ssadd EntNxt SelSet))
)
SelSet
)
)
)
-
This is how to impliment the routines above.
(defun c:test()
;; save the last entity in the dbf
(setq last_e (ALE_LastEnt)
(command "array" )
(while (>(getvar "CMDACTIVE")0) (command pause) )
(if (not(eq last_e (entlast)))
(progn
;; get new items
(setq new_ss (ALE_Ss-After last_e))
;; do your thing
); progn
)
)
-
got it all wrkn'
thanks