; ISSUED FOR CONSTRUCTION STAMP (DEFUN C:IFC (/ CMD OSN LM LMX) (SETQ CMD (GETVAR "CMDECHO")) (SETQ OSN (GETVAR "OSMODE")) (SETVAR "OSMODE" 0) (SETVAR "CMDECHO" 0) (setq LM (GETVAR "LIMMAX") LMX (CADR LM)) (initget "D I") (setq UI (getkword "\n Is this a Demolition (D) or Installation (I)?: ")) (if (not UI) (setq UI "I")) (COMMAND ".layer" "n" "stamps" "C" "249" "stamps" "S" "stamps" "") ;IF D-SIZE THEN DO THIS (COND ((= LMX 22.0) (if (= UI "D") (COMMAND ".-insert" "IFCD-D" "0,0" "1" "" "" ".LAYER" "S" "0" "")) (if (= UI "I") (COMMAND ".-insert" "IFCI-D" "0,0" "1" "" "" ".LAYER" "S" "0" ""))) ;IF E-SIZE THEN DO THIS ((= LMX 34.0) (IF (= UI "D") (COMMAND ".-insert" "IFCD-E" "0,0" "1" "" "" ".LAYER" "S" "0" "")) (IF (= UI "I") (COMMAND ".-insert" "IFCI-E" "0,0" "1" "" "" ".LAYER" "S" "0" "")))) (command ".draworder" "l" "" "b" ".draworder" (ssget "x" '((0 . "IMAGE"))) "" "b" ".layer" "lo" "stamps" "") (SETVAR "CMDECHO" CMD) (PRINT "THIS DRAWING HAS BEEN ISSUED FOR CONSTRUCTION") (PRINC)) It's stoping the muti-batch after it runs, i can't figure out how to get it running again. If i type resume at the command prompt, it does proceed to the next drawing but again it stops. if i add resume to the script of multibatch, it still don't read it. HELP!!! Please Thanks, Viktor
so i tested and tested, and found the problem, but not sure how to work around it now. notice that towards the bottom, i'm using Draworder command to set previous to the back, and afrerwards i find image and set it back after that. Well, not all my drawings have images, most don't. So when i run that manually it runs fine, just errors through it cause it don't find a image. But when i load it through the Multi-batch, it's very picky and don't allow me to do that. So i guess i need to set some conditions or evaluations to see if the image is there or not. how do i do that? thanks, Viktor
(if (ssget "x" '((0 . "IMAGE"))) (do stuff) If you don't have an image it will return nil. Have fun, Dave
(if (setq ssimage (ssget "x" '((0 . "IMAGE")))) (command ".draworder" "l" "" "b" ".draworder" ssimage "" "b" ".layer" "lo" "stamps" "") ); endif
you're a life saver! thanks a bunch, i didn't know i could have a if function working like that. i guess that's why i'm still learning. Thanks, again. Viktor