0 Members and 1 Guest are viewing this topic.
;;;++--;;;++ LISP COMMANDS LISO & LUISO --;;;++ © 2008 DANIEL MARCOTTE --;;;++ COMMAND LISO ISOLATE LAYER(S) DERIVED FROM SELECTED OBJECT(S) --;;;++ OTHER "ON" LAYER(S) WILL BE TURNED OFF AND LOCKED. --;;;++ COMMAND LUISO RETURNS LAYERS BACK TO THEIR PREVIUS STATE --;;;++ GLOBALS *DRAWINGISINFLUX* *MYGLOBALLAYERLIST* --;;;++ FOR BRICSCAD 8.2.6 OR NEWER;;;++ todo add fade code :);;;++--(DEFUN CRP:TABLE (S / D R);MP (WHILE (SETQ D (TBLNEXT S (NULL D))) (SETQ R (CONS (CDR (ASSOC 2 D)) R)) ));;;++--(DEFUN CRP:ISON (NAME) (IF (EQ :VLAX-TRUE (VLAX-GET-PROPERTY (VLAX-ENAME->VLA-OBJECT (TBLOBJNAME "LAYER" NAME)) 'LAYERON)) 1 0 ));;;++--(DEFUN CRP:ISLOCKED (NAME) (IF (EQ :VLAX-TRUE (VLAX-GET-PROPERTY (VLAX-ENAME->VLA-OBJECT (TBLOBJNAME "LAYER" NAME)) 'LOCK)) 1 0 ));;;++--(DEFUN CRP:TURNOFF (NAME) (VLAX-PUT-PROPERTY (VLAX-ENAME->VLA-OBJECT (TBLOBJNAME "LAYER" NAME)) 'LAYERON :VLAX-FALSE));;;++--(DEFUN CRP:TURNON (NAME) (VLAX-PUT-PROPERTY (VLAX-ENAME->VLA-OBJECT (TBLOBJNAME "LAYER" NAME)) 'LAYERON :VLAX-TRUE));;;++--(DEFUN CRP:UNLOCK (NAME) (VLAX-PUT-PROPERTY (VLAX-ENAME->VLA-OBJECT (TBLOBJNAME "LAYER" NAME)) 'LOCK :VLAX-FALSE));;;++--(DEFUN CRP:LOCK (NAME) (VLAX-PUT-PROPERTY (VLAX-ENAME->VLA-OBJECT (TBLOBJNAME "LAYER" NAME)) 'LOCK :VLAX-TRUE));;;++(DEFUN CRP:GETONLIST (/ L) (SETQ L '()) (FOREACH E (CRP:TABLE "LAYER") (IF (= 1 (CRP:ISON E)) (SETQ L (CONS (CONS E (CRP:ISLOCKED E)) L)) ) ) L);;;++--(DEFUN CRP:GETSELECTIONLIST (/ C L LAYERNAME S) (PRINC "Select object(s) on the layer(s) to be isolated") (SETQ L '() S (SSGET) ) (IF S (PROGN (SETQ C 0) (WHILE (< C (SSLENGTH S)) (SETQ LAYERNAME (VLAX-GET-PROPERTY (VLAX-ENAME->VLA-OBJECT (CDR (CAR (ENTGET (SSNAME S C))))) 'LAYER) L (CONS (CONS LAYERNAME (CRP:ISLOCKED LAYERNAME)) L) C (1+ C) ) ) ) ) L);;;++--(DEFUN CRP:REMOVEITEMS (L1 L2) (FOREACH E L2 (SETQ L1 (VL-REMOVE E L1)) ) L1);;;++--(DEFUN CRP:REGEN() (VLA-REGEN (VLA-GET-ACTIVEDOCUMENT (VLAX-GET-ACAD-OBJECT)) AcACTIVEVIEWPORT));;;++--(DEFUN C:LISO (/ LAYERNAME SELECTIONLIST) (VL-LOAD-COM) (IF (EQ *DRAWINGISINFLUX* NIL) (PROGN (SETQ SELECTIONLIST (CRP:GETSELECTIONLIST)) (IF (> (LENGTH SELECTIONLIST) 0) (PROGN (SETQ *DRAWINGISINFLUX* T *MYGLOBALLAYERLIST* (CRP:REMOVEITEMS (CRP:GETONLIST) SELECTIONLIST)) (SETVAR "CLAYER" (CAR (CAR SELECTIONLIST))) (FOREACH E *MYGLOBALLAYERLIST* (CRP:TURNOFF (CAR E)) (CRP:LOCK (CAR E)) ) (CRP:REGEN) ) ) ) (PRINC "\nDoh! run luiso first") ) (PRINC));;;++--(DEFUN C:LUISO () (VL-LOAD-COM) (IF (EQ *DRAWINGISINFLUX* T) (PROGN (SETQ *DRAWINGISINFLUX* NIL) (FOREACH E *MYGLOBALLAYERLIST* (CRP:TURNON (CAR E)) (IF (= (CDR E) 0) (CRP:UNLOCK (CAR E)) ) ) (CRP:REGEN) ) (PRINC "\nDoh! run liso first") ) (PRINC));;;++EOF--
...But I can't download the latest version It always stops with about 1 meg (of 64-65 megs) to go. Anyone else having that problem?
I haven’t had this problem, I wonder if they have a mirror site, or can SwampExpress it to ya
Most things work very well without any change, but there are functions here and there that aren’t working yet. The good thing is that if you find something, they are pretty fast a getting a fix out. So far I found vla-offset doesn’t work on a polyline yet, and some issues dealing with WMI. I haven’t done any DCL stuff so I can say. Overall It’s looking good though
Does Bricscad also have a COM interface, so I can automate it with languages like Python?
Quote from: Daniel on May 07, 2008, 08:50:38 AMMost things work very well without any change, but there are functions here and there that aren’t working yet. The good thing is that if you find something, they are pretty fast a getting a fix out. So far I found vla-offset doesn’t work on a polyline yet, and some issues dealing with WMI. I haven’t done any DCL stuff so I can say. Overall It’s looking good though Thanks Denial. I'm glad to know that. How about xdata and xrecord? Can Bricscad handle them? Does Bricscad also have a COM interface, so I can automate it with languages like Python?