Looking for LSP to look for LineTypes

Acad 2005
I do Electrical Design for buildings. Architects usually give me their Acad drawings for my backgrounds (Xref's).
Many times their DWG files entities are not broken down in separate layers for things such as Existing Walls, New Walls, Existing Millwork vs. New Millwork, Demo, etc.
They may have a layer (say A-Walls) where they show both Existing walls and Demolition of existing walls on the Same layer. But they use different LineTypes and Colours to show the difference.
This drives me nutz as I can't (on my side) control the LineType and Colours for my backgrounds. And since I work with many Architects, me trying to conform to their layer colours is just not an option.
The reason that they do things this way is that they don't really concern themselves with how others use their drawings (just so long as it works for them).
What I'm looking for is a Lisp routine where I can select all entities on a choosen layer, look for a specific Line type (ususally Hidden or Hidden2). And then be able to change those with that criteria to a unique layer.
If anyone has such an animal, or something close, I'd appreciate a copy. I've some Lisp knowledge, but I'm having one heck of a time trying to weed out what I want (my Lisp is in a mess right now too as a result of many variations) :(
Regards,
BruceF
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

The native FILTER command followed by the CHANGE command will do that.
--


MichaelB
www.michaelbulatovich.ca
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Argh... you are correct!!! I've never used the Filter command before (thus my ignorance about it).
I'll modify my Lisp routine to include the Filter command and see what comes up.
Thanks for the direction!
BruceF
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

AutoCAD's best kept secret, next to CAL.
--


MichaelB
www.michaelbulatovich.ca
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Actually, it's because I've had a lot of pre 'Filter' routines that did what Filter does now. So I've never needed to use it (:
BruceF
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

I don't know when they created that command, but I think it was before r13.
--


MichaelB
www.michaelbulatovich.ca
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Sorry for the late post, but here is a routine I use to transfer entities (not linetypes) from clients to our own standards. Copy paste save to your heart's desire. Oh yeah, it's in french, but that shouldn't be a problem for most people here. *click click tap tap tap tap click* ;;; Pierre Marcotte ;;; 26 mai 2004 ;;; ;;; Ce petit programme est sujet toutes les lois ;;; et rglements municipaux en vigueur dans votre ;;; rgion. ;;; Une infraction ces rgles conduira l'utilisateur ;;; fautif directement dans les flammes de l'enfer. ;;; Votre seule chance de salut consiste vous lever ;;; debout immdiatement, lever les bras vers les nons ;;; flicotants, et implorer le triumvirat cleste des ;;; Dieux d'AutoCAD, SPLANE, EX-REFF et REDJEN. ;;; Rcitez maintenant la formule magique transmise ;;; de gnration en gnration depuis la dsormais ;;; mythique et lgendaire version 1.1 : ;;; "Je suis un ver. Je regrette. Je ne suis rien."
(DEFUN c:laychange (/ dims leaders texts mtexts hatchs traces cnt1 cnt2 cnt3 cnt4 cnt5 cnt6 each ) (SETQ dims (SSGET "X" '((0 . "DIMENSION")))) (SETQ leaders (SSGET "X" '((0 . "LEADER")))) (SETQ texts (SSGET "X" '((0 . "TEXT")))) (SETQ mtexts (SSGET "X" '((0 . "MTEXT")))) (SETQ hatchs (SSGET "X" '((0 . "HATCH")))) (SETQ traces (SSGET "X" '((0 . "TRACE")))) (IF (NOT (TBLSEARCH "Layer" "Cote")) (COMMAND "-layer" "m" "Cote" "c" "cyan" "" "") ) (IF (NOT (TBLSEARCH "Layer" "Hachure")) (COMMAND "-layer" "m" "Hachure" "c" "8" "" "") ) (IF (NOT (TBLSEARCH "Layer" "Texte")) (COMMAND "-layer" "m" "Texte" "c" "yellow" "" "") ) ;; Amorce un compteur ;;; DIMENSION (SETQ cnt1 0) ;; Dmarre une boucle (IF (NOT (= nil dims)) (REPEAT (SSLENGTH dims) ;; Donne un nom aux objets DIMENSION (SETQ each (ENTGET (SSNAME dims cnt1))) ;; Change sa couche (SETQ each (SUBST (CONS 8 "Cote") (ASSOC 8 each) each ) ) (ENTMOD each) ;; Itre le compteur (SETQ cnt1 (+ cnt1 1)) ;; Recommence pour chaque entit de l'ancienne ;; couche ) ;_end REPEAT ) ;_end IF DIMS ;;; LEADER (SETQ cnt2 0) (IF (NOT (= nil leaders)) (REPEAT (SSLENGTH leaders) ;; Donne un nom aux objets LEADER (SETQ each (ENTGET (SSNAME leaders cnt2))) ;; Change sa couche (SETQ each (SUBST (CONS 8 "Cote") (ASSOC 8 each) each ) ) (ENTMOD each) ;; Itre le compteur (SETQ cnt2 (+ cnt2 1)) ;; Recommence pour chaque entit de l'ancienne ;; couche ) ) ;_end IF LEADERS ;;; TEXT (SETQ cnt3 0) (IF (NOT (= nil texts)) (REPEAT (SSLENGTH texts) ;; Donne un nom aux objets TEXT (SETQ each (ENTGET (SSNAME texts cnt3))) ;; Change sa couche (SETQ each (SUBST (CONS 8 "Texte") (ASSOC 8 each) each ) ) (ENTMOD each) ;; Itre le compteur (SETQ cnt3 (+ cnt3 1)) ;; Recommence pour chaque entit de l'ancienne ;; couche ) ) ;_end IF TEXTS ;;; MTEXT (SETQ cnt4 0) (IF (NOT (= nil mtexts)) (REPEAT (SSLENGTH mtexts) ;; Donne un nom aux objets MTEXT (SETQ each (ENTGET (SSNAME mtexts cnt4))) ;; Change sa couche (SETQ each (SUBST (CONS 8 "Texte") (ASSOC 8 each) each ) ) (ENTMOD each) ;; Itre le compteur (SETQ cnt4 (+ cnt4 1)) ;; Recommence pour chaque entit de l'ancienne ;; couche ) ) ;_end IF MTEXTS ;;; HATCH (SETQ cnt5 0) ;; Dmarre une boucle (IF (NOT (= nil hatchs)) (REPEAT (SSLENGTH hatchs) ;; Donne un nom aux objets DIMENSION (SETQ each (ENTGET (SSNAME hatchs cnt5))) ;; Change sa couche (SETQ each (SUBST (CONS 8 "Cote") (ASSOC 8 each) each ) ) (ENTMOD each) ;; Itre le compteur (SETQ cnt5 (+ cnt5 1)) ;; Recommence pour chaque entit de l'ancienne ;; couche ) ;_end REPEAT ) ;_end IF HATCH ;;; TRACE (SETQ cnt6 0) ;; Dmarre une boucle (IF (NOT (= nil traces)) (REPEAT (SSLENGTH traces) ;; Donne un nom aux objets TRACE (SETQ each (ENTGET (SSNAME traces cnt6))) ;; Change sa couche (SETQ each (SUBST (CONS 8 "Hachure") (ASSOC 8 each) each ) ) (ENTMOD each) ;; Itre le compteur (SETQ cnt6 (+ cnt6 1)) ;; Recommence pour chaque entit de l'ancienne ;; couche ) ;_end REPEAT ) ;_end IF TRACES (COMMAND "_.regen") ;; Messages de fin (IF (NOT (= cnt1 nil)) (SETQ mes1 (STRCAT "\n ---> " (ITOA cnt1) " DIMENSION changs de couche." ) ) (SETQ mes1 "\n Pas de DIMENSION trouvs.") ) ;_end IF
(IF (NOT (= cnt2 nil)) (SETQ mes2 (STRCAT "\n ---> " (ITOA cnt2) " LEADER changs de couche." ) ) (SETQ mes2 "\n Pas de LEADER trouvs.") ) ;_end IF
(IF (NOT (= cnt3 nil)) (SETQ mes3 (STRCAT "\n ---> " (ITOA cnt3) " TEXT changs de couche." ) ) (SETQ mes3 "\n Pas de TEXT trouvs.") ) ;_end IF
(IF (NOT (= cnt4 nil)) (SETQ mes4 (STRCAT "\n ---> " (ITOA cnt4) " MTEXT changs de couche." ) ) (SETQ mes4 "\n Pas de MTEXT trouvs.") ) ;_end IF
(IF (NOT (= cnt5 nil)) (SETQ mes5 (STRCAT "\n ---> " (ITOA cnt5) " HATCH changs de couche." ) ) (SETQ mes5 "\n Pas de HATCH trouvs.") ) ;_end IF (IF (NOT (= cnt6 nil)) (SETQ mes6 (STRCAT "\n ---> " (ITOA cnt5) " TRACE changs de couche." ) ) (SETQ mes6 "\n Pas de TRACE trouvs.") ) (ALERT (STRCAT mes1 mes2 mes3 mes4 mes5 mes6)) (PRINC) ) ;_end DEFUN
*send*

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.