Author Topic: Layer Merge  (Read 8420 times)

0 Members and 1 Guest are viewing this topic.

One Shot

  • Guest
Layer Merge
« on: April 08, 2005, 11:16:05 AM »
This lisp was created by kennet.sjoberg on AUGI.  It is a lisp that merges layers.  I do not want to go an use the Express Layer Trans to merge layer.  I would like one click function only.


Code: [Select]
(defun c:MergeLayer (/ OldLay NewLay SelSet Index EntName EntDxf )
  (setq OldLay "B NOTE" )
  (setq NewLay "A-ANNO-NOTE" )
  (if (not (tblsearch "LAYER" NewLay ))
    (alert (strcat "Your merge to layer " NewLay " do not exist\n                   You have to create it." ) )
    (progn
      (setq SelSet (ssget "_X" (list (cons 8 OldLay ))) )
      (if (and Selset (>= (sslength SelSet ) 1 ) )
        (progn
          (setq Index 0 )
          (while (setq EntName (ssname SelSet Index ) )
            (setq EntDxf (entget EntName ) )
            (if (= (cdr (assoc 8 EntDxf)) OldLay )
              (progn
                (setq EntDxf (subst (cons 8 NewLay ) (assoc 8 EntDxf) EntDxf ) )
                (entmod EntDxf )
                (entupd EntName )
              )
              (setq Index (1+ Index ) )
            )
          )
        )
        (princ (strcat "No objects on layer " OldLay " found !" ) )
      )
    )
  )
  (princ)
)

Quote
I modified it to try and convert more than one layer.

Here si what I did.  Please tell me what I did wrong and how to make it work.
Code: [Select]
(defun c:MergeLayer (/ OldLay NewLay SelSet Index EntName EntDxf )
  (setq OldLay "GENNOTE" )
  (setq OldLay "AN_NOTES" )  
  (setq OldLay "DIMENSIONS" )
  (setq OldLay "AN_DIMS" )  
(setq NewLay "A-ANNO-NOTE" )
(setq NewLay "A-ANNO-DIMS" )
  (if (not (tblsearch "LAYER" NewLay ))
    (alert (strcat "Your merge to layer " NewLay " do not exist\n                   You have to create it." ) )
    (progn
      (setq SelSet (ssget "_X" ) )
      (setq Index 1 )
      (while (setq EntName (ssname SelSet Index ) )
        (setq EntDxf (entget EntName ) )
        (if (= (cdr (assoc 8 EntDxf)) OldLay )
          (progn
            (setq EntDxf (subst (cons 8 NewLay ) (assoc 8 EntDxf) EntDxf ) )
            (entmod EntDxf )
            (entupd EntName )
          )
          (setq Index (1+ Index ) )
        )
      )
    )
  )
  (princ)
)
Quote

Thank you very much!!

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Layer Merge
« Reply #1 on: April 08, 2005, 12:32:30 PM »
Code: [Select]
(defun MergeLayer (laylist / OldLay NewLay SelSet Index EntName EntDxf)
  (if (and laylist
           (listp laylist)
      )
    (foreach pair laylist

      (setq OldLay (car pair))
      (setq NewLay (cadr pair))
      (if (not (tblsearch "LAYER" NewLay))
        (alert (strcat "Your merge to layer "
                       NewLay
                       " do not exist"
                       "\n                   You have to create it."
               )
        )
        (progn
          (setq SelSet (ssget "_X" (list (cons 8 OldLay))))
          (if (and Selset (>= (sslength SelSet) 1))
            (progn
              (setq Index 0)
              (while (setq EntName (ssname SelSet Index))
                (setq EntDxf (entget EntName))
                (if (= (cdr (assoc 8 EntDxf)) OldLay)
                  (progn
                    (setq
                      EntDxf (subst (cons 8 NewLay) (assoc 8 EntDxf) EntDxf)
                    )
                    (entmod EntDxf)
                    (entupd EntName)
                  )
                  (setq Index (1+ Index))
                )
              )
            )
            (princ (strcat "No objects on layer " OldLay " found !"))
          )
        )
      )
    )
  )
  (princ)
)


;;  Start here with a list of layer names
(defun c:fixlayers1 (/ LayList)
  ;;  Create a list of layer name pairs. ((oldlayer newlayer)....)
  (setq LayList '(("GENNOTE" "A-ANNO-NOTE")
                  ("AN_NOTES" "A-ANNO-NOTE")
                  ("DIMENSIONS" "A-ANNO-DIMS")
                  ("AN_DIMS" "A-ANNO-DIMS")
                 )
  )
  (MergeLayer LayList)
  (princ)
)

;;  you can make up other layer pairs as needed
(defun c:fixlayers2 (/ LayList)
  ;;  Create a list of layer name pairs. ((oldlayer newlayer)....)
  (setq LayList '(("Old" "New")
                  ("Old" "New")
                  ("Old" "New")
                  ("Old" "New")
                 )
  )
  (MergeLayer LayList)
  (princ)
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

One Shot

  • Guest
Layer Merge
« Reply #2 on: April 08, 2005, 12:45:40 PM »
Cab,

Thank you for your help.  How is the weather down in Florida?  Here in PA, it is mid to high 60's.  Do you follow baseball and football?  What teams do you like?

Brad

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Layer Merge
« Reply #3 on: April 08, 2005, 12:57:54 PM »
I'm into Tennis, Fishing & Diving. Don't follow other sports much.
78 deg and Breezy, Doesn't get any better. :)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

One Shot

  • Guest
Layer Merge
« Reply #4 on: April 13, 2005, 12:53:58 PM »
Quote from: CAB
I'm into Tennis, Fishing & Diving. Don't follow other sports much.
78 deg and Breezy, Doesn't get any better. :)


What kind of fishing do you like?  Are you certified to dive in international waters?  When I was in the Marines stationed in Okinawa, Japan.  I wanted to get my interantional dive certification.  But I could not because I was very busy.  Now that I am out of the Marines.  I cannot becasue I have asthma know.

Here is one questions.  With this part of the code that has the old and new layers.  How many layers can I put in the fixlayers1.  I added 4 more layers and it did not work.  So I then put thim in the fixlayers2 and it works.  

What is the reason that more layers added to the fixlayers1 that made it not to work?


Thank you,

Brad

daron

  • Guest
Layer Merge
« Reply #5 on: April 13, 2005, 01:50:14 PM »
<daydream>Diving</daydream>

<kickself>I only wish I had sent in my picture to PADI when I did my certification. Then, I'd have it. Grrr...</kickself>

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Layer Merge
« Reply #6 on: April 13, 2005, 03:27:48 PM »
Brad,
>>What kind of fishing do you like?
This Kind

>>Are you certified to dive in international waters? I don't have an
international Certification although I thought any dive card & the price of
admission would get you on any dive boat.  :D I have passed the Open Water,
Advanced, Rescue, Equipment Repair, Dive Master, and Instructor courses but no
international course. Can't remember how many dives, kinda lost track over the
years. Dive mostly in the Gulf, out of Hudson and down to St. Pete. We spend 10
days lobstering in the Keys every year for the past 15 and 5 to 10 days at a
friends house in the Bahamas every May for the past 8 years. That is except for
this past year. My dive buddy had a heart valve replaced after a bacterial
infection in his heart. But he is fine and we are looking forward to the next
15 years. My wife & his both dive & our friend & his wife, with the Bahamas house
both dive as well so we have a great time in May as we stay on a remote island.
Most days we don't even see another boat. I have a friend that just started his
inshore charter business so I lost the access to that boat. Guess I'll have to
get mine going again. Blown head gasket, but that isn't too big a project.

See what happens when you bring up Fishing & Diving. :)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

ronjonp

  • Needs a day job
  • Posts: 7529
Layer Merge
« Reply #7 on: April 13, 2005, 11:48:32 PM »
Nice pics Charles. I haven't seen that much lobster ever :).

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

One Shot

  • Guest
Layer Merge
« Reply #8 on: April 18, 2005, 05:36:15 PM »
I have done a lot of research for our new company standards.  I have to create the layers that are not in the drawing.  I added create new layer and it will not work.  I have to create something 250 layers to cover all of our old drawings.  We need to atleast bring them up to the new layering standards.  The lisp that is associated with this thread is a start.  Cab got me going in the right direction.

Can you please tell me what I did wrong and show how to fix it.  There are other old layers and new layers in this lisp.  I added a create layer command to test it out and I can not get it to work.

Thank you,

Brad




Code: [Select]

(defun MergeLayer (laylist / OldLay NewLay SelSet Index EntName EntDxf)
  (if (and laylist
           (listp laylist)
      )
    (foreach pair laylist

      (setq OldLay (car pair))
      (setq NewLay (cadr pair))
      (if (not (tblsearch "LAYER" NewLay))
        (alert (strcat "Your merge to layer "
                       NewLay
                       " do not exist"
                       "\n                   You have to create it."
               )
        )
        (progn
          (setq SelSet (ssget "_X" (list (cons 8 OldLay))))
          (if (and Selset (>= (sslength SelSet) 1))
            (progn
              (setq Index 0)
              (while (setq EntName (ssname SelSet Index))
                (setq EntDxf (entget EntName))
                (if (= (cdr (assoc 8 EntDxf)) OldLay)
                  (progn
                    (setq
                      EntDxf (subst (cons 8 NewLay) (assoc 8 EntDxf) EntDxf)
                    )
                    (entmod EntDxf)
                    (entupd EntName)
                  )
                  (setq Index (1+ Index))
                )
              )
            )
            (princ (strcat "No objects on layer " OldLay " found !"))
          )
        )
      )
    )
  )
)
(setq lyr "A-Wall" clr "7")
  (if (tblsearch "LAYER" lyr)
    (command "._Layer" "_Thaw" lyr "_On" lyr "_UnLock" lyr "_Set" lyr "")
    (command "._Layer" "_Make" lyr "_Color" (if (= lyr "") "_White" Clr) lyr
                        "LT" "Continuous" lyr "")
  (princ)
)
(setq lyr "A-Glaze" clr "3")
  (if (tblsearch "LAYER" lyr)
    (command "._Layer" "_Thaw" lyr "_On" lyr "_UnLock" lyr "_Set" lyr "")
    (command "._Layer" "_Make" lyr "_Color" (if (= lyr "") "_White" Clr) lyr
                        "LT" "Continuous" lyr "")
 
  (princ)
)

;;  Start here with a list of layer names
(defun c:fixlayers1 (/ LayList)
  ;;  Create a list of layer name pairs. ((oldlayer newlayer)....)
  (setq LayList '(("GENNOTE" "A-ANNO-NOTE")
                  ("AN_NOTES" "A-ANNO-NOTE")
                  ("DIMENSIONS" "A-ANNO-DIMS")
                  ("AN_DIMS" "A-ANNO-DIMS")
                  ("ARIWALL" "A-Wall")
                  ("AREWALL" "A-Wall")
                  )
  )
  (MergeLayer LayList)
  (princ)
)

;;  you can make up other layer pairs as needed
(defun c:fixlayers2 (/ LayList)
  ;;  Create a list of layer name pairs. ((oldlayer newlayer)....)
  (setq LayList '(("AR_DOOR" "A-DOOR)
                  ("AR_APPLIANCE" "A-FLOR-APPL")
                  ("ARWINDOW" "A-Glaz")
                  ("AR_WINDOW" "A-Glaz")
                  ("ARGLAZE" "A-Glaz")
                  ("ARFIREPLACE" "A-FLOR-APPL")
                  ("ARDOOR" "A-DOOR")
                  ("ARSCABINET" "A-Flor-Case")
                 )
  )
  (MergeLayer LayList)
  (princ)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Layer Merge
« Reply #9 on: April 18, 2005, 06:30:35 PM »
UNTESTED
Read the comments & look at the modified layer list in c:fixlayers1.
Code: [Select]
(defun MergeLayer (laylist / OldLay NewLay SelSet Index EntName EntDxf)
  (if (and laylist
           (listp laylist)
      )
    (foreach Lyr_data laylist

      (setq OldLay (car Lyr_data))
      (setq NewLay (cadr Lyr_data))
      (if (not (tblsearch "LAYER" NewLay))
        (CreateLayer Lyr_data)
        (progn
          (setq SelSet (ssget "_X" (list (cons 8 OldLay))))
          (if (and Selset (>= (sslength SelSet) 1))
            (progn
              (setq Index 0)
              (while (setq EntName (ssname SelSet Index))
                (setq EntDxf (entget EntName))
                (if (= (cdr (assoc 8 EntDxf)) OldLay)
                  (progn
                    (setq
                      EntDxf (subst (cons 8 NewLay) (assoc 8 EntDxf) EntDxf)
                    )
                    (entmod EntDxf)
                    (entupd EntName)
                  )
                  (setq Index (1+ Index))
                )
              )
            )
            (princ (strcat "No objects on layer " OldLay " found !"))
          )
        )
      )
    )
  )
)

(defun Createlayer (Lyr_data / lyr clr ltyp)
  (setq lyr  (cadr Lyr_data))
  (command "._Layer" "_Make" lyr "")
  (if (setq clr (nth 2 Lyr_data))
    (command "._Layer" "_Color" (if (= clr "") "_White" Clr) lyr "")
  )
  (if (setq ltyp (nth 3 Lyr_data))
    (command "._Layer" "LT" (if (= ltyp "") "Continuous" ltyp) lyr "")
  )
)



;;  Start here with a list of layer names
(defun c:fixlayers1 (/ LayList)
  ;;  Create a list of layer name Lyr_datas. ((oldlayer newlayer)....)
  ;;  Optional Color & Line Type, If included it will be used or "" will
  ;;  default to preset values, nil will use values in drawing
  ;;  Default Color  "" = White
  ;;  Default linetype "" = Continious
  (setq LayList '(("GENNOTE" "A-ANNO-NOTE")  ; use color & linetype set in dwg
                  ("AN_NOTES" "A-ANNO-NOTE" nil nil)  ; use color & linetype set in dwg
                  ("DIMENSIONS" "A-ANNO-DIMS" nil "DOT")  ; use color set in dwg
                  ("AN_DIMS" "A-ANNO-DIMS" "" "DOT")  ; use White & Dot
                  ("ARIWALL" "A-Wall" "White" "Continious") ; Use White & cont
                  ("AREWALL" "A-Wall" "White" "Continious")
                  )
  )
  (MergeLayer LayList)
  (princ)
)

;;  you can make up other layer Lyr_datas as needed
(defun c:fixlayers2 (/ LayList)
  ;;  Create a list of layer name Lyr_datas. ((oldlayer newlayer)....)
  (setq LayList '(("AR_DOOR" "A-DOOR")
                  ("AR_APPLIANCE" "A-FLOR-APPL")
                  ("ARWINDOW" "A-Glaz")
                  ("AR_WINDOW" "A-Glaz")
                  ("ARGLAZE" "A-Glaz")
                  ("ARFIREPLACE" "A-FLOR-APPL")
                  ("ARDOOR" "A-DOOR")
                  ("ARSCABINET" "A-Flor-Case")
                 )
  )
  (MergeLayer LayList)
  (princ)
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

One Shot

  • Guest
Layer Merge
« Reply #10 on: April 18, 2005, 07:01:12 PM »
Thank you CAB.  How was your weekend?  Did you go Fishing?

I am sorry for being dense this evening.  I had a long night last night drive home.   Do I edit this to say what layer I want to create correct?

Code: [Select]

(defun Createlayer (Lyr_data / lyr clr ltyp)
  (setq lyr  (cadr Lyr_data))
  (command "._Layer" "_Make" lyr "")
  (if (setq clr (nth 2 Lyr_data))
    (command "._Layer" "_Color" (if (= clr "") "_White" Clr) lyr "")
  )
  (if (setq ltyp (nth 3 Lyr_data))
    (command "._Layer" "LT" (if (= ltyp "") "Continuous" ltyp) lyr "")
  )
)

Quote
I think that I am correct.  Should it read like the following?

Code: [Select]


(defun Createlayer (Lyr_data / lyr clr ltyp)
  (setq lyr  (cadr Lyr_data))
  (command "._Layer" "_Make" A-Door "")
  (if (setq clr (nth 2 Lyr_data))
    (command "._Layer" "_Color" (if (= clr "") "_2" Clr) lyr "") {This color should be yellow}
  )
  (if (setq ltyp (nth 3 Lyr_data))
    (command "._Layer" "LT" (if (= ltyp "") "Continuous" ltyp) lyr "")
  )
)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Layer Merge
« Reply #11 on: April 18, 2005, 11:44:20 PM »
No, not there, don't mess with that subroutine.
In fact there is a missing ) so recopy the routine as I fixed it.

This is where you would add YELLOW:
Code: [Select]
(defun c:fixlayers2 (/ LayList)
  ;;  Create a list of layer name Lyr_datas. ((oldlayer newlayer)....)
  (setq LayList '(("AR_DOOR" "A-DOOR" "YELLOW")
                  ("AR_APPLIANCE" "A-FLOR-APPL" "YELLOW")
                  ("ARWINDOW" "A-Glaz" "YELLOW")
                  ("AR_WINDOW" "A-Glaz" "YELLOW")
                  ("ARGLAZE" "A-Glaz" "YELLOW")
                  ("ARFIREPLACE" "A-FLOR-APPL" "YELLOW")
                  ("ARDOOR" "A-DOOR" "YELLOW")
                  ("ARSCABINET" "A-Flor-Case" "YELLOW")
                 )
  )
  (MergeLayer LayList)
  (princ)
)


The list is
Code: [Select]
( OldLayer NewLayer Color LineType)

The Color & LineType are optional BUT if you nter a linetype you MUST add color
in the form of nil = use DWG set color, "" = use White, or enter a color name or number
in the form of a string  "7"
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

One Shot

  • Guest
Layer Merge
« Reply #12 on: April 19, 2005, 08:51:19 AM »
Thank you CAB!

One Shot

  • Guest
Layer Merge
« Reply #13 on: April 25, 2005, 04:29:25 PM »
Can someone please review this code.  It will not run for me.
Code: [Select]

(defun MergeLayerP (laylist / OldLay NewLay SelSet Index EntName EntDxf)
  (if (and laylist
           (listp laylist)
      )
    (foreach Lyr_data laylist

      (setq OldLay (car Lyr_data))
      (setq NewLay (cadr Lyr_data))
      (if (not (tblsearch "LAYER" NewLay))
        (CreateLayer Lyr_data)
        (progn
          (setq SelSet (ssget "_X" (list (cons 8 OldLay))))
          (if (and Selset (>= (sslength SelSet) 1))
            (progn
              (setq Index 0)
              (while (setq EntName (ssname SelSet Index))
                (setq EntDxf (entget EntName))
                (if (= (cdr (assoc 8 EntDxf)) OldLay)
                  (progn
                    (setq
                      EntDxf (subst (cons 8 NewLay) (assoc 8 EntDxf) EntDxf)
                    )
                    (entmod EntDxf)
                    (entupd EntName)
                  )
                  (setq Index (1+ Index))
                )
              )
            )
            (princ (strcat "No objects on layer " OldLay " found !"))
          )
        )
      )
    )
  )
)

(defun Createlayer (Lyr_data / lyr clr ltyp)
  (setq lyr  (cadr Lyr_data))
  (command "._Layer" "_Make" lyr "")
  (if (setq clr (nth 2 Lyr_data))
    (command "._Layer" "_Color" (if (= clr "") "_White" Clr) lyr "")
  )
  (if (setq ltyp (nth 3 Lyr_data))
    (command "._Layer" "LT" (if (= ltyp "") "Continuous" ltyp) lyr "")
  )
)



;;  Start here with a list of layer names
(defun c:fixlayers1 (/ LayList)
  ;;  Create a list of layer name Lyr_datas. ((oldlayer newlayer)....)
  ;;  Optional Color & Line Type, If included it will be used or "" will
  ;;  default to preset values, nil will use values in drawing
  ;;  Default Color  "" = White
  ;;  Default linetype "" = Continious
  (setq LayList '(("3DAREWALL" "A-Wall" "White" "Continious") ; Use White & cont
("3DARWINDOW" "A-Glas" "green" "Continious") ; Use green & cont
("A_Notes" "A-Anno-Note" nil nil)  ; use color & linetype set in dwg
("AN_DIMS" "A-Anno-Dims" "yellow" "Continious")  ; use yellow & cont
("AN_NOTES" "A-Anno-Note" nil nil)  ; use color & linetype set in dwg
("AN_POCHE" "A-Flor-Patt" 54 nil)  ; use 54 & linetype set in dwg
  ("AN_RM_NAMES" "A-Anno-Rnam" magenta "Continious")  ; magenta & linetype set in dwg
("AR_POCHE" "A-Flor-Patt" 54 nil)  ; use 54 & linetype set in dwg
("ARAPPLIANCE" "A-Flor-Appl" Red "Continious")  ; use Red & "Continious"
("ARBRKWALL" "A-Wall" "green" "Continious") ; Use green & cont
("ARDCABINET" "A-Flor-Case-Ovhd" "41" "Hidden") ; Use 41 & hidden
("ARDOOR" "A-Door" "yellow" "Continious") ; Use yellow & cont
("ARDOOR-BR" "A-Door" "yellow" "Continious") ; Use yellow & cont
("ARDOOR-SILL" "A-Door" "yellow" "Continious") ; Use yellow & cont
("AREA"  "A-Area-Nplt" "11" "Continious") ; Use 11 & cont
("AREWALL" "A-Wall" "White" "Continious") ; Use White & cont
("AREWALL-3_50" "A-Wall" "White" "Continious") ; Use White & cont
("AREWALL-5_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARFIREPLACE" "A-Flor-Appl" nil nil)  ; use color & linetype set in dwg
("ARGLAZE" "A-Glas" "green" "Continious") ; Use White & cont
("ARHEADER" "S-Beam" white Phamton2)  ; use white & Phamton2
("ARINTELEV"<==== purpe
("ARIWALL" "A-Wall" "White" "Continious") ; Use White & cont
("ARIWALL-1_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARIWALL-3_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARIWALL-5_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARKWALL" "A-Wall" "White" "Continious") ; Use White & cont
("ARKWALL-3_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARSCABINET" "A-Flor-Case-Ovhd" "41" "Hidden") ; Use 41 & hidden
("ARSOFFIT"<==== purpe
("ARSTAIR" "A-Flor-Strs" "green" "Continious") ; Use green & cont
("ARTRAP" "P-Fixt-Symb" "red" "Continious") ; Use red & cont
("ARWALL" "A-Wall" "White" "Continious") ; Use White & cont
("ARWALL-3_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARWALL-5_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARWINDOW" "A-Glas" "green" "Continious") ; Use green & cont
("BA_FL1_ARBRKWALL" "A-Wall" "green" "Continious") ; Use green & cont
("BA_FL1_ARDOOR" "A-Door" "yellow" "Continious") ; Use yellow & cont
("B_FL1_AREWALL" "A-Wall" "White" "Continious") ; Use White & cont
("BA_FL1_ARGLAZE" "A-Glas" "green" "Continious") ; Use green & cont
("BA_FL1_ARIWALL" "A-Wall" "White" "Continious") ; Use White & cont
("BA_FL1_ARWALL" "A-Wall" "White" "Continious") ; Use White & cont
("BA_FL1_ARWINDOW" "A-Glas" "green" "Continious") ; Use green & cont
("BA_FL1_DIMENSIONS" "A-Anno-Dims" "yellow" "Continious")  ; use yellow & cont
("BA_FL1_LIGHT" "A-Misc" "green" "Continious") ; Use green & cont
("BA_FL1_TITLES" "A-Anno-Dtit" magenta "Continious")  ; magenta & linetype set in dwg
("BA_FN1_GENNOTE" "A-Anno-Note" nil nil)  ; use color & linetype set in dwg
("BA_FN1_TITLES" "A-Anno-Dtit" magenta "Continious")  ; magenta & linetype set in dwg
("BEAM" "S-Beam" white Phamton2)  ; use white & Phamton2
("BLOCK" <==========================================================================================purge
("BLOCKTEXT" <==========================================================================================purge
("BRNOTE" <==========================================================================================purge
("BRTITLES" <==========================================================================================purge
("CONSTRUCTION" "A-Cons-Nplt" yellow "hidden2")  ; yellow & hidden2 set in dwg
("DASH1" "A-Misc" "green" "Continious") ; Use green & cont
("DASH2L" "A-Misc" "green" "Continious") ; Use green & cont
("DASH3L" "A-Misc" "green" "Continious") ; Use green & cont
("DETAIL" "A-Detl" "41" "Continious")  ; use 41 & cont
("DIMENSIONS" "A-Anno-Dims" "yellow" "Continious")  ; use yellow & cont
("DTL-3" "A-Detl" "41" "Continious")  ; use 41 & cont
("DWGTEXTURE" "A-Flor-Patt" 54 nil)  ; use color & linetype set in dwg
("LIGHT" "A-Misc" "green" "Continious") ; Use green & cont
("MEDIUM" "A-Misc" "magenta" "Continious") ; Use magenta & cont
("MPFIXTURE" "M-HVAC-Symb" magenta "Continious")  ; use magenta & cont
("OILHEAT" "M-HVAC-Symb" magenta "Continious")  ; use magenta & cont
("OPTION" "A-Misc" "green" "Continious") ; Use green & cont
("PR_POCHE" "A-Flor-Patt" 54 nil)  ; use 54 & linetype set in dwg
("REVISION" "A-Anno-Revs" cyan "Continious")  ; use cyan & cont
("S-DTL" "A-Detl" "41" "Continious")  ; use 41 & cont
("S-NOTES" "S-Anno-Note" nil nil)  ; use color & linetype set in dwg
("ST_NOTESMS" "S-Anno-Note" nil nil)  ; use color & linetype set in dwg
("ST_WBEAM" "S-Beam" white Phamton2)  ; use white & Phamton2
("Stdtl" "A-Detl" "41" "Continious")  ; use 41 & cont
("STFND" "S-Wall" "White" "Continious") ; Use White & cont
("STFTG" "S-Foot" green Hidden)  ; use green & Hidden
("STNOTE" "S-Anno-Note" nil nil)  ; use color & linetype set in dwg
("STSTEEL" "S-Beam" white Phamton2)  ; use white & Phamton2
("STWOOD" "S-Cols" white Phamton2)  ; use white & Phamton2
("S-WALLS" "S-Wall" "White" "Continious") ; Use White & cont
("TITLES" "A-Anno-Dtit" magenta "Continious")  ; magenta & linetype set in dwg
("TRAP" "P-Fixt-Symb" "red" "Continious") ; Use red & cont
           )
  )
  (MergeLayer LayList)
  (princ)
)

(defun c:fixlayers2 (/ LayList)
  ;;  Create a list of layer name Lyr_datas. ((oldlayer newlayer)....)
    (setq LayList '(("3DAREWALL" "A-Wall" "White" "Continious") ; Use White & cont
("3DARWINDOW" "A-Glas" "green" "Continious") ; Use green & cont
("A_Notes" "A-Anno-Note" nil nil)  ; use color & linetype set in dwg
("AN_DIMS" "A-Anno-Dims" "yellow" "Continious")  ; use yellow & cont
("AN_NOTES" "A-Anno-Note" nil nil)  ; use color & linetype set in dwg
("AN_POCHE" "A-Flor-Patt" 54 nil)  ; use 54 & linetype set in dwg
  ("AN_RM_NAMES" "A-Anno-Rnam" magenta "Continious")  ; magenta & linetype set in dwg
("AR_POCHE" "A-Flor-Patt" 54 nil)  ; use 54 & linetype set in dwg
("ARAPPLIANCE" "A-Flor-Appl" Red "Continious")  ; use Red & "Continious"
("ARBRKWALL" "A-Wall" "green" "Continious") ; Use green & cont
("ARDCABINET" "A-Flor-Case-Ovhd" "41" "Hidden") ; Use 41 & hidden
("ARDOOR" "A-Door" "yellow" "Continious") ; Use yellow & cont
("ARDOOR-BR" "A-Door" "yellow" "Continious") ; Use yellow & cont
("ARDOOR-SILL" "A-Door" "yellow" "Continious") ; Use yellow & cont
("AREA"  "A-Area-Nplt" "11" "Continious") ; Use 11 & cont
("AREWALL" "A-Wall" "White" "Continious") ; Use White & cont
("AREWALL-3_50" "A-Wall" "White" "Continious") ; Use White & cont
("AREWALL-5_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARFIREPLACE" "A-Flor-Appl" nil nil)  ; use color & linetype set in dwg
("ARGLAZE" "A-Glas" "green" "Continious") ; Use White & cont
("ARHEADER" "S-Beam" white Phamton2)  ; use white & Phamton2
("ARINTELEV"<==== purpe
("ARIWALL" "A-Wall" "White" "Continious") ; Use White & cont
("ARIWALL-1_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARIWALL-3_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARIWALL-5_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARKWALL" "A-Wall" "White" "Continious") ; Use White & cont
("ARKWALL-3_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARSCABINET" "A-Flor-Case-Ovhd" "41" "Hidden") ; Use 41 & hidden
("ARSOFFIT"<==== purpe
("ARSTAIR" "A-Flor-Strs" "green" "Continious") ; Use green & cont
("ARTRAP" "P-Fixt-Symb" "red" "Continious") ; Use red & cont
("ARWALL" "A-Wall" "White" "Continious") ; Use White & cont
("ARWALL-3_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARWALL-5_50" "A-Wall" "White" "Continious") ; Use White & cont
("ARWINDOW" "A-Glas" "green" "Continious") ; Use green & cont
("BA_FL1_ARBRKWALL" "A-Wall" "green" "Continious") ; Use green & cont
("BA_FL1_ARDOOR" "A-Door" "yellow" "Continious") ; Use yellow & cont
("B_FL1_AREWALL" "A-Wall" "White" "Continious") ; Use White & cont
("BA_FL1_ARGLAZE" "A-Glas" "green" "Continious") ; Use green & cont
("BA_FL1_ARIWALL" "A-Wall" "White" "Continious") ; Use White & cont
("BA_FL1_ARWALL" "A-Wall" "White" "Continious") ; Use White & cont
("BA_FL1_ARWINDOW" "A-Glas" "green" "Continious") ; Use green & cont
("BA_FL1_DIMENSIONS" "A-Anno-Dims" "yellow" "Continious")  ; use yellow & cont
("BA_FL1_LIGHT" "A-Misc" "green" "Continious") ; Use green & cont
("BA_FL1_TITLES" "A-Anno-Dtit" magenta "Continious")  ; magenta & linetype set in dwg
("BA_FN1_GENNOTE" "A-Anno-Note" nil nil)  ; use color & linetype set in dwg
("BA_FN1_TITLES" "A-Anno-Dtit" magenta "Continious")  ; magenta & linetype set in dwg
("BEAM" "S-Beam" white Phamton2)  ; use white & Phamton2
("BLOCK" <==========================================================================================purge
("BLOCKTEXT" <==========================================================================================purge
("BRNOTE" <==========================================================================================purge
("BRTITLES" <==========================================================================================purge
("CONSTRUCTION" "A-Cons-Nplt" yellow "hidden2")  ; yellow & hidden2 set in dwg
("DASH1" "A-Misc" "green" "Continious") ; Use green & cont
("DASH2L" "A-Misc" "green" "Continious") ; Use green & cont
("DASH3L" "A-Misc" "green" "Continious") ; Use green & cont
("DETAIL" "A-Detl" "41" "Continious")  ; use 41 & cont
("DIMENSIONS" "A-Anno-Dims" "yellow" "Continious")  ; use yellow & cont
("DTL-3" "A-Detl" "41" "Continious")  ; use 41 & cont
("DWGTEXTURE" "A-Flor-Patt" 54 nil)  ; use color & linetype set in dwg
("LIGHT" "A-Misc" "green" "Continious") ; Use green & cont
("MEDIUM" "A-Misc" "magenta" "Continious") ; Use magenta & cont
("MPFIXTURE" "M-HVAC-Symb" magenta "Continious")  ; use magenta & cont
("OILHEAT" "M-HVAC-Symb" magenta "Continious")  ; use magenta & cont
("OPTION" "A-Misc" "green" "Continious") ; Use green & cont
("PR_POCHE" "A-Flor-Patt" 54 nil)  ; use 54 & linetype set in dwg
("REVISION" "A-Anno-Revs" cyan "Continious")  ; use cyan & cont
("S-DTL" "A-Detl" "41" "Continious")  ; use 41 & cont
("S-NOTES" "S-Anno-Note" nil nil)  ; use color & linetype set in dwg
("ST_NOTESMS" "S-Anno-Note" nil nil)  ; use color & linetype set in dwg
("ST_WBEAM" "S-Beam" white Phamton2)  ; use white & Phamton2
("Stdtl" "A-Detl" "41" "Continious")  ; use 41 & cont
("STFND" "S-Wall" "White" "Continious") ; Use White & cont
("STFTG" "S-Foot" green Hidden)  ; use green & Hidden
("STNOTE" "S-Anno-Note" nil nil)  ; use color & linetype set in dwg
("STSTEEL" "S-Beam" white Phamton2)  ; use white & Phamton2
("STWOOD" "S-Cols" white Phamton2)  ; use white & Phamton2
("S-WALLS" "S-Wall" "White" "Continious") ; Use White & cont
("TITLES" "A-Anno-Dtit" magenta "Continious")  ; magenta & linetype set in dwg
("TRAP" "P-Fixt-Symb" "red" "Continious") ; Use red & cont
                 )
  )
  (MergeLayer LayList)
  (princ)
)

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Layer Merge
« Reply #14 on: April 25, 2005, 04:32:51 PM »
I never ran it but a cursory look suggests line types "Continious", "Phamtom" sometimes quoted, other times not may make the routine chuck a wobbly.

/guess
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Layer Merge
« Reply #15 on: April 25, 2005, 04:50:57 PM »
These should look like this.
Code: [Select]

       ("BLOCK" <==========================================================================================purge
       ("BLOCKTEXT" <==========================================================================================purge
       ("BRNOTE" <==========================================================================================purge
       ("BRTITLES" <==========================================================================================purge
       ("CONSTRUCTION" "A-Cons-Nplt" yellow "hidden2")  ; yellow & hidden2 set in dwg


Code: [Select]
      ("BLOCK")
       ("BLOCKTEXT")
       ("BRNOTE")
       ("BRTITLES")
       ("CONSTRUCTION" "A-Cons-Nplt" yellow "hidden2")  ; yellow & hidden2 set in dwg
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

One Shot

  • Guest
Layer Merge
« Reply #16 on: April 25, 2005, 04:56:41 PM »
Quote from: CAB
These should look like this.
Code: [Select]

       ("BLOCK" <==========================================================================================purge
       ("BLOCKTEXT" <==========================================================================================purge
       ("BRNOTE" <==========================================================================================purge
       ("BRTITLES" <==========================================================================================purge
       ("CONSTRUCTION" "A-Cons-Nplt" yellow "hidden2")  ; yellow & hidden2 set in dwg


Code: [Select]
      ("BLOCK")
       ("BLOCKTEXT")
       ("BRNOTE")
       ("BRTITLES")
       ("CONSTRUCTION" "A-Cons-Nplt" yellow "hidden2")  ; yellow & hidden2 set in dwg


I corrected that and it still will not run.



Cab,

I am planning to go shark fishing sometime over the summer!  That should be fun!

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Layer Merge
« Reply #17 on: April 25, 2005, 06:59:37 PM »
There are many errors, missing quotes.
Like this
Code: [Select]
      ("ARHEADER" "S-Beam" white Phamton2)  ; use white & Phamton2
should be this
Code: [Select]
      ("ARHEADER" "S-Beam" "white" "Phamton2")  ; use white & Phamton2
       
and incomplete code like this:
Code: [Select]
("ARINTELEV" ;<==== purpe

when in VLIDE you will not be allowed to load the code until you fix these incomplete code errors.
The missing quotes will cause errors when you try to run the code.

These items must be cleaned up.
If you don't have a new layer defined yet comment out the line
Code: [Select]
;; ("ARINTELEV" ;<==== purpe

Your function (defun MergeLayerP  has a P in the name but you call it with (MergeLayer LayList)
this will never work, the programming languages are very particular about such things.

Try again!


Yes shark fishing is a lot of fun. If you are not going to eat them put them back.
I have a few shark stories but I usually wait till I have a few rum & cokes before I
tell them. The fish always get bigger in proportion to the alcohol consumed. :)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

One Shot

  • Guest
Layer Merge
« Reply #18 on: April 25, 2005, 07:18:42 PM »
Cab,

I have fixed the error that you mentioned in your post.    Here is the last update of the lisp:  But I am getting - too few arguments - now.

Code: [Select]

(defun c:MergeLayer (laylist / OldLay NewLay SelSet Index EntName EntDxf)
  (if (and laylist
           (listp laylist)
      )
    (foreach Lyr_data laylist

      (setq OldLay (car Lyr_data))
      (setq NewLay (cadr Lyr_data))
      (if (not (tblsearch "LAYER" NewLay))
        (CreateLayer Lyr_data)
        (progn
          (setq SelSet (ssget "_X" (list (cons 8 OldLay))))
          (if (and Selset (>= (sslength SelSet) 1))
            (progn
              (setq Index 0)
              (while (setq EntName (ssname SelSet Index))
                (setq EntDxf (entget EntName))
                (if (= (cdr (assoc 8 EntDxf)) OldLay)
                  (progn
                    (setq
                      EntDxf (subst (cons 8 NewLay) (assoc 8 EntDxf) EntDxf)
                    )
                    (entmod EntDxf)
                    (entupd EntName)
                  )
                  (setq Index (1+ Index))
                )
              )
            )
            (princ (strcat "No objects on layer " OldLay " found !"))
          )
        )
      )
    )
  )
)

(defun Createlayer (Lyr_data / lyr clr ltyp)
  (setq lyr  (cadr Lyr_data))
  (command "._Layer" "_Make" lyr "")
  (if (setq clr (nth 2 Lyr_data))
    (command "._Layer" "_Color" (if (= clr "") "_White" Clr) lyr "")
  )
  (if (setq ltyp (nth 3 Lyr_data))
    (command "._Layer" "LT" (if (= ltyp "") "Continuous" ltyp) lyr "")
  )
)



;;  Start here with a list of layer names
(defun c:fixlayers1 (/ LayList)
  ;;  Create a list of layer name Lyr_datas. ((oldlayer newlayer)....)
  ;;  Optional Color & Line Type, If included it will be used or "" will
  ;;  default to preset values, nil will use values in drawing
  ;;  Default Color  "" = White
  ;;  Default linetype "" = "Continuous"
  (setq LayList '(("3DAREWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("3DARWINDOW" "A-Glas" "green" "Continuous") ; Use green & cont
("A_Notes" "A-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
("AN_DIMS" "A-Anno-Dims" "yellow" "Continuous")  ; use yellow & cont
("AN_NOTES" "A-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
("AN_POCHE" "A-Flor-Patt" "54" "Continuous")  ; use 54 & linetype set in dwg
  ("AN_RM_NAMES" "A-Anno-Rnam" "magenta" "Continuous")  ; magenta & linetype set in dwg
("AR_POCHE" "A-Flor-Patt" "54" "Continuous")  ; use 54 & linetype set in dwg
("ARAPPLIANCE" "A-Flor-Appl" "red" "Continuous")  ; use Red & "Continuous"
("ARBRKWALL" "A-Wall" "green" "Continuous") ; Use green & cont
("ARDCABINET" "A-Flor-Case-Ovhd" "41" "Hidden") ; Use 41 & hidden
("ARDOOR" "A-Door" "yellow" "Continuous") ; Use yellow & cont
("ARDOOR-BR" "A-Door" "yellow" "Continuous") ; Use yellow & cont
("ARDOOR-SILL" "A-Door" "yellow" "Continuous") ; Use yellow & cont
("AREA"  "A-Area-Nplt" "11" "Continuous") ; Use 11 & cont
("AREWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("AREWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
("AREWALL-5_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARFIREPLACE" "A-Flor-Appl" "red" "Continuous")  ; use color & linetype set in dwg
("ARGLAZE" "A-Glas" "green" "Continuous") ; Use White & cont
("ARHEADER" "S-Beam" "white" "Phanton2")  ; use white & "Phanton2"
("ARINTELEV")
("ARIWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("ARIWALL-1_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARIWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARIWALL-5_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARKWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("ARKWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARSCABINET" "A-Flor-Case-Ovhd" "41" "Hidden") ; Use 41 & hidden
("ARSOFFIT")
("ARSTAIR" "A-Flor-Strs" "green" "Continuous") ; Use green & cont
("ARTRAP" "P-Fixt-Symb" "red" "Continuous") ; Use red & cont
("ARWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("ARWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARWALL-5_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARWINDOW" "A-Glas" "green" "Continuous") ; Use green & cont
("BA_FL1_ARBRKWALL" "A-Wall" "green" "Continuous") ; Use green & cont
("BA_FL1_ARDOOR" "A-Door" "yellow" "Continuous") ; Use yellow & cont
("B_FL1_AREWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("BA_FL1_ARGLAZE" "A-Glas" "green" "Continuous") ; Use green & cont
("BA_FL1_ARIWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("BA_FL1_ARWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("BA_FL1_ARWINDOW" "A-Glas" "green" "Continuous") ; Use green & cont
("BA_FL1_DIMENSIONS" "A-Anno-Dims" "yellow" "Continuous")  ; use yellow & cont
("BA_FL1_LIGHT" "A-Misc" "green" "Continuous") ; Use green & cont
("BA_FL1_TITLES" "A-Anno-Dtit" "magenta" "Continuous")  ; magenta & linetype set in dwg
("BA_FN1_GENNOTE" "A-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
("BA_FN1_TITLES" "A-Anno-Dtit" "magenta" "Continuous")  ; magenta & linetype set in dwg
("BEAM" "S-Beam" "white" "Phanton2")  ; use white & "Phanton2"
("BLOCK")
        ("BLOCKTEXT")
        ("BRNOTE")
        ("BRTITLES")
("CONSTRUCTION" "A-Cons-Nplt" "yellow" "hidden2")  ; yellow & hidden2 set in dwg
("DASH1" "A-Misc" "green" "Continuous") ; Use green & cont
("DASH2L" "A-Misc" "green" "Continuous") ; Use green & cont
("DASH3L" "A-Misc" "green" "Continuous") ; Use green & cont
("DETAIL" "A-Detl" "41" "Continuous")  ; use 41 & cont
("DIMENSIONS" "A-Anno-Dims" "yellow" "Continuous")  ; use yellow & cont
("DTL-3" "A-Detl" "41" "Continuous")  ; use 41 & cont
("DWGTEXTURE" "A-Flor-Patt" "54" "Continuous")  ; use color & linetype set in dwg
("LIGHT" "A-Misc" "green" "Continuous") ; Use green & cont
("MEDIUM" "A-Misc" "magenta" "Continuous") ; Use magenta & cont
("MPFIXTURE" "M-HVAC-Symb" "magenta" "Continuous")  ; use magenta & cont
("OILHEAT" "M-HVAC-Symb" "magenta" "Continuous")  ; use magenta & cont
("OPTION" "A-Misc" "green" "Continuous") ; Use green & cont
("PR_POCHE" "A-Flor-Patt" "54" "Continuous")  ; use 54 & linetype set in dwg
("REVISION" "A-Anno-Revs" "cyan" "Continuous")  ; use cyan & cont
("S-DTL" "A-Detl" "41" "Continuous")  ; use 41 & cont
("S-NOTES" "S-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
("ST_NOTESMS" "S-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
("ST_WBEAM" "S-Beam" "white" "Phanton2")  ; use white & "Phanton2"
("Stdtl" "A-Detl" "41" "Continuous")  ; use 41 & cont
("STFND" "S-Wall" "White" "Continuous") ; Use White & cont
("STFTG" "S-Foot" "green" "Hidden")  ; use green & Hidden
("STNOTE" "S-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
("STSTEEL" "S-Beam" "white" "Phanton2")  ; use white & Phanton2
("STWOOD" "S-Cols" "white" "Phanton2")  ; use white & Phanton2
("S-WALLS" "S-Wall" "White" "Continuous") ; Use White & cont
("TITLES" "A-Anno-Dtit" "magenta" "Continuous")  ; magenta & linetype set in dwg
("TRAP" "P-Fixt-Symb" "red" "Continuous") ; Use red & cont
           )
  )
  (MergeLayer LayList)
  (princ)
)

(defun c:fixlayers2 (/ LayList)
  ;;  Create a list of layer name Lyr_datas. ((oldlayer newlayer)....)
  (setq LayList '(("3DAREWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("3DARWINDOW" "A-Glas" "green" "Continuous") ; Use green & cont
("A_Notes" "A-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
("AN_DIMS" "A-Anno-Dims" "yellow" "Continuous")  ; use yellow & cont
("AN_NOTES" "A-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
("AN_POCHE" "A-Flor-Patt" "54" "Continuous")  ; use 54 & linetype set in dwg
  ("AN_RM_NAMES" "A-Anno-Rnam" "magenta" "Continuous")  ; magenta & linetype set in dwg
("AR_POCHE" "A-Flor-Patt" "54" "Continuous")  ; use 54 & linetype set in dwg
("ARAPPLIANCE" "A-Flor-Appl" "red" "Continuous")  ; use Red & "Continuous"
("ARBRKWALL" "A-Wall" "green" "Continuous") ; Use green & cont
("ARDCABINET" "A-Flor-Case-Ovhd" "41" "Hidden") ; Use 41 & hidden
("ARDOOR" "A-Door" "yellow" "Continuous") ; Use yellow & cont
("ARDOOR-BR" "A-Door" "yellow" "Continuous") ; Use yellow & cont
("ARDOOR-SILL" "A-Door" "yellow" "Continuous") ; Use yellow & cont
("AREA"  "A-Area-Nplt" "11" "Continuous") ; Use 11 & cont
("AREWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("AREWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
("AREWALL-5_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARFIREPLACE" "A-Flor-Appl" "red" "Continuous")  ; use color & linetype set in dwg
("ARGLAZE" "A-Glas" "green" "Continuous") ; Use White & cont
("ARHEADER" "S-Beam" "white" "Phanton2")  ; use white & "Phanton2"
("ARINTELEV")
("ARIWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("ARIWALL-1_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARIWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARIWALL-5_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARKWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("ARKWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARSCABINET" "A-Flor-Case-Ovhd" "41" "Hidden") ; Use 41 & hidden
("ARSOFFIT")
("ARSTAIR" "A-Flor-Strs" "green" "Continuous") ; Use green & cont
("ARTRAP" "P-Fixt-Symb" "red" "Continuous") ; Use red & cont
("ARWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("ARWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARWALL-5_50" "A-Wall" "White" "Continuous") ; Use White & cont
("ARWINDOW" "A-Glas" "green" "Continuous") ; Use green & cont
("BA_FL1_ARBRKWALL" "A-Wall" "green" "Continuous") ; Use green & cont
("BA_FL1_ARDOOR" "A-Door" "yellow" "Continuous") ; Use yellow & cont
("B_FL1_AREWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("BA_FL1_ARGLAZE" "A-Glas" "green" "Continuous") ; Use green & cont
("BA_FL1_ARIWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("BA_FL1_ARWALL" "A-Wall" "White" "Continuous") ; Use White & cont
("BA_FL1_ARWINDOW" "A-Glas" "green" "Continuous") ; Use green & cont
("BA_FL1_DIMENSIONS" "A-Anno-Dims" "yellow" "Continuous")  ; use yellow & cont
("BA_FL1_LIGHT" "A-Misc" "green" "Continuous") ; Use green & cont
("BA_FL1_TITLES" "A-Anno-Dtit" "magenta" "Continuous")  ; magenta & linetype set in dwg
("BA_FN1_GENNOTE" "A-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
("BA_FN1_TITLES" "A-Anno-Dtit" "magenta" "Continuous")  ; magenta & linetype set in dwg
("BEAM" "S-Beam" "white" "Phanton2")  ; use white & "Phanton2"
("BLOCK")
        ("BLOCKTEXT")
        ("BRNOTE")
        ("BRTITLES")
("CONSTRUCTION" "A-Cons-Nplt" "yellow" "hidden2")  ; yellow & hidden2 set in dwg
("DASH1" "A-Misc" "green" "Continuous") ; Use green & cont
("DASH2L" "A-Misc" "green" "Continuous") ; Use green & cont
("DASH3L" "A-Misc" "green" "Continuous") ; Use green & cont
("DETAIL" "A-Detl" "41" "Continuous")  ; use 41 & cont
("DIMENSIONS" "A-Anno-Dims" "yellow" "Continuous")  ; use yellow & cont
("DTL-3" "A-Detl" "41" "Continuous")  ; use 41 & cont
("DWGTEXTURE" "A-Flor-Patt" "54" "Continuous")  ; use color & linetype set in dwg
("LIGHT" "A-Misc" "green" "Continuous") ; Use green & cont
("MEDIUM" "A-Misc" "magenta" "Continuous") ; Use magenta & cont
("MPFIXTURE" "M-HVAC-Symb" "magenta" "Continuous")  ; use magenta & cont
("OILHEAT" "M-HVAC-Symb" "magenta" "Continuous")  ; use magenta & cont
("OPTION" "A-Misc" "green" "Continuous") ; Use green & cont
("PR_POCHE" "A-Flor-Patt" "54" "Continuous")  ; use 54 & linetype set in dwg
("REVISION" "A-Anno-Revs" "cyan" "Continuous")  ; use cyan & cont
("S-DTL" "A-Detl" "41" "Continuous")  ; use 41 & cont
("S-NOTES" "S-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
("ST_NOTESMS" "S-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
("ST_WBEAM" "S-Beam" "white" "Phanton2")  ; use white & "Phanton2"
("Stdtl" "A-Detl" "41" "Continuous")  ; use 41 & cont
("STFND" "S-Wall" "White" "Continuous") ; Use White & cont
("STFTG" "S-Foot" "green" "Hidden")  ; use green & Hidden
("STNOTE" "S-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
("STSTEEL" "S-Beam" "white" "Phanton2")  ; use white & Phanton2
("STWOOD" "S-Cols" "white" "Phanton2")  ; use white & Phanton2
("S-WALLS" "S-Wall" "White" "Continuous") ; Use White & cont
("TITLES" "A-Anno-Dtit" "magenta" "Continuous")  ; magenta & linetype set in dwg
("TRAP" "P-Fixt-Symb" "red" "Continuous") ; Use red & cont
  )
  (MergeLayer LayList)
  (princ)


If I catch a shark, I will be keeping it.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Layer Merge
« Reply #19 on: April 25, 2005, 07:36:28 PM »
These lines are incomplete
Code: [Select]
("BLOCK")
("BLOCKTEXT")
("BRNOTE")
("BRTITLES")

try this new routine, it has a few more error traps.
Code: [Select]
(defun MergeLayer (laylist / OldLay NewLay SelSet Index EntName EntDxf)
  (if (and laylist ; not nil
           (listp laylist) ; and is a list
      )
    (foreach Lyr_data laylist
      ;; got new layer data and not in drawing already
      (if (and (setq NewLay (cadr Lyr_data))
               (not (tblsearch "LAYER" NewLay))
          )
        (CreateLayer Lyr_data)
      )
      (setq Index 0)
      (cond
        ((null NewLay)
         (princ "\n***  No new layer in data !")
        )
        ((null OldLay)
         (princ "\n***  No old layer in data !")
        )
        ;;  if old layer name and items on that layer
        ((and (setq OldLay (car Lyr_data))
              (setq SelSet (ssget "_X" (list (cons 8 OldLay))))
         )
         (while (setq EntName (ssname SelSet Index))
           (setq EntDxf (entget EntName))
           (if (= (cdr (assoc 8 EntDxf)) OldLay)
             (progn
               (setq
                 EntDxf (subst (cons 8 NewLay) (assoc 8 EntDxf) EntDxf)
               )
               (entmod EntDxf)
               (entupd EntName)
             )
             (setq Index (1+ Index))
           )
         )
        )
        ((prompt (strcat "\n***  No objects on layer " OldLay " found !")))
      ) ; end cond stmt
    ) ; foreach
  ) ; endif
) ; defun
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

One Shot

  • Guest
Layer Merge
« Reply #20 on: April 25, 2005, 07:40:57 PM »
I have to search our company Layering Standard to see what layer to put them on.

Thank you for your help.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Layer Merge
« Reply #21 on: April 25, 2005, 07:44:18 PM »
Just looked at your new code. The data list creator code looks ok with the exceptions
noted in my previous post. The new routine will catch those tough.
In your new code you named the subroutine c:MergeLayer
You can only call this by using (c:MergeLayer LayList)
Usually you only prefix a functions name with c: if you are going to call it from the command line
in ACAD and those type calls will not except passed variables.
I know there is a lot to learn but you are doing well in a short time, keep it up.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

One Shot

  • Guest
Layer Merge
« Reply #22 on: April 25, 2005, 07:50:09 PM »
Quote from: CAB
Just looked at your new code. The data list creator code looks ok with the exceptions
noted in my previous post. The new routine will catch those tough.
In your new code you named the subroutine c:MergeLayer
You can only call this by using (c:MergeLayer LayList)
Usually you only prefix a functions name with c: if you are going to call it from the command line
in ACAD and those type calls will not except passed variables.
I know there is a lot to learn but you are doing well in a short time, keep it up.


What does this mean:

bad argument type: consp nil
Command:
Command:
Command: MergeLayer
Unknown command "MERGELAYER"


Thank you,

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Layer Merge
« Reply #23 on: April 25, 2005, 08:14:54 PM »
Lets try one more time. :)
Note that there is no error trap for line types if not found, routine will crash.

Code: [Select]
(defun MergeLayer (laylist / OldLay NewLay SelSet Index EntName EntDxf)
  (if (and laylist ; not nil
           (listp laylist) ; and is a list
      )
    (foreach Lyr_data laylist
      ;; got new layer data and not in drawing already
      (if (and (setq NewLay (cadr Lyr_data))
               (not (tblsearch "LAYER" NewLay))
          )
        (CreateLayer Lyr_data)
      )
      (setq Index 0)
      (cond
        ((null NewLay)
         (princ "\n***  No new layer in data !")
        )
        ((null (setq OldLay (car Lyr_data)))
         (princ "\n***  No old layer in data !")
        )
        ;;  if old layer name and items on that layer
        ((and OldLay
              (setq SelSet (ssget "_X" (list (cons 8 OldLay))))
         )
         (while (setq EntName (ssname SelSet Index))
           (setq EntDxf (entget EntName))
           (if (= (cdr (assoc 8 EntDxf)) OldLay)
             (progn
               (setq
                 EntDxf (subst (cons 8 NewLay) (assoc 8 EntDxf) EntDxf)
               )
               (entmod EntDxf)
               (entupd EntName)
             )
             (setq Index (1+ Index))
           )
         )
        )
        ((prompt (strcat "\n***  No objects on layer " OldLay " found !")))
      ) ; end cond stmt
    ) ; foreach
  ) ; endif
) ; defun


(defun Createlayer (Lyr_data / lyr clr ltyp)
  (setq lyr  (cadr Lyr_data))
  (command "._Layer" "_Make" lyr "")
  (if (setq clr (nth 2 Lyr_data))
    (command "._Layer" "_Color" (if (= clr "") "_White" Clr) lyr "")
  )
  (if (setq ltyp (nth 3 Lyr_data))
    (command "._Layer" "LT" (if (= ltyp "") "Continuous" ltyp) lyr "")
  )
)



;;  Start here with a list of layer names
(defun c:fixlayers1 (/ LayList)
  ;;  Create a list of layer name Lyr_datas. ((oldlayer newlayer)....)
  ;;  Optional Color & Line Type, If included it will be used or "" will
  ;;  default to preset values, nil will use values in drawing
  ;;  Default Color  "" = White
  ;;  Default linetype "" = "Continuous"
  (setq LayList '(("3DAREWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("3DARWINDOW" "A-Glas" "green" "Continuous") ; Use green & cont
       ("A_Notes" "A-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
       ("AN_DIMS" "A-Anno-Dims" "yellow" "Continuous")  ; use yellow & cont
       ("AN_NOTES" "A-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
       ("AN_POCHE" "A-Flor-Patt" "54" "Continuous")  ; use 54 & linetype set in dwg
         ("AN_RM_NAMES" "A-Anno-Rnam" "magenta" "Continuous")  ; magenta & linetype set in dwg
       ("AR_POCHE" "A-Flor-Patt" "54" "Continuous")  ; use 54 & linetype set in dwg
       ("ARAPPLIANCE" "A-Flor-Appl" "red" "Continuous")  ; use Red & "Continuous"
       ("ARBRKWALL" "A-Wall" "green" "Continuous") ; Use green & cont
       ("ARDCABINET" "A-Flor-Case-Ovhd" "41" "Hidden") ; Use 41 & hidden
       ("ARDOOR" "A-Door" "yellow" "Continuous") ; Use yellow & cont
       ("ARDOOR-BR" "A-Door" "yellow" "Continuous") ; Use yellow & cont
       ("ARDOOR-SILL" "A-Door" "yellow" "Continuous") ; Use yellow & cont
       ("AREA"  "A-Area-Nplt" "11" "Continuous") ; Use 11 & cont
       ("AREWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("AREWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("AREWALL-5_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARFIREPLACE" "A-Flor-Appl" "red" "Continuous")  ; use color & linetype set in dwg
       ("ARGLAZE" "A-Glas" "green" "Continuous") ; Use White & cont
       ("ARHEADER" "S-Beam" "white" "Phanton2")  ; use white & "Phanton2"
       ("ARINTELEV")
       ("ARIWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARIWALL-1_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARIWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARIWALL-5_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARKWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARKWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARSCABINET" "A-Flor-Case-Ovhd" "41" "Hidden") ; Use 41 & hidden
       ("ARSOFFIT")
       ("ARSTAIR" "A-Flor-Strs" "green" "Continuous") ; Use green & cont
       ("ARTRAP" "P-Fixt-Symb" "red" "Continuous") ; Use red & cont
       ("ARWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARWALL-5_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARWINDOW" "A-Glas" "green" "Continuous") ; Use green & cont
       ("BA_FL1_ARBRKWALL" "A-Wall" "green" "Continuous") ; Use green & cont
       ("BA_FL1_ARDOOR" "A-Door" "yellow" "Continuous") ; Use yellow & cont
       ("B_FL1_AREWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("BA_FL1_ARGLAZE" "A-Glas" "green" "Continuous") ; Use green & cont
       ("BA_FL1_ARIWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("BA_FL1_ARWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("BA_FL1_ARWINDOW" "A-Glas" "green" "Continuous") ; Use green & cont
       ("BA_FL1_DIMENSIONS" "A-Anno-Dims" "yellow" "Continuous")  ; use yellow & cont
       ("BA_FL1_LIGHT" "A-Misc" "green" "Continuous") ; Use green & cont
       ("BA_FL1_TITLES" "A-Anno-Dtit" "magenta" "Continuous")  ; magenta & linetype set in dwg
       ("BA_FN1_GENNOTE" "A-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
       ("BA_FN1_TITLES" "A-Anno-Dtit" "magenta" "Continuous")  ; magenta & linetype set in dwg
       ("BEAM" "S-Beam" "white" "Phanton2")  ; use white & "Phanton2"
       ("BLOCK")
       ("BLOCKTEXT")
       ("BRNOTE")
       ("BRTITLES")
       ("CONSTRUCTION" "A-Cons-Nplt" "yellow" "hidden2")  ; yellow & hidden2 set in dwg
       ("DASH1" "A-Misc" "green" "Continuous") ; Use green & cont
       ("DASH2L" "A-Misc" "green" "Continuous") ; Use green & cont
       ("DASH3L" "A-Misc" "green" "Continuous") ; Use green & cont
       ("DETAIL" "A-Detl" "41" "Continuous")  ; use 41 & cont
       ("DIMENSIONS" "A-Anno-Dims" "yellow" "Continuous")  ; use yellow & cont
       ("DTL-3" "A-Detl" "41" "Continuous")  ; use 41 & cont
       ("DWGTEXTURE" "A-Flor-Patt" "54" "Continuous")  ; use color & linetype set in dwg
       ("LIGHT" "A-Misc" "green" "Continuous") ; Use green & cont
       ("MEDIUM" "A-Misc" "magenta" "Continuous") ; Use magenta & cont
       ("MPFIXTURE" "M-HVAC-Symb" "magenta" "Continuous")  ; use magenta & cont
       ("OILHEAT" "M-HVAC-Symb" "magenta" "Continuous")  ; use magenta & cont
       ("OPTION" "A-Misc" "green" "Continuous") ; Use green & cont
       ("PR_POCHE" "A-Flor-Patt" "54" "Continuous")  ; use 54 & linetype set in dwg
       ("REVISION" "A-Anno-Revs" "cyan" "Continuous")  ; use cyan & cont
       ("S-DTL" "A-Detl" "41" "Continuous")  ; use 41 & cont
       ("S-NOTES" "S-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
       ("ST_NOTESMS" "S-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
       ("ST_WBEAM" "S-Beam" "white" "Phanton2")  ; use white & "Phanton2"
       ("Stdtl" "A-Detl" "41" "Continuous")  ; use 41 & cont
       ("STFND" "S-Wall" "White" "Continuous") ; Use White & cont
       ("STFTG" "S-Foot" "green" "Hidden")  ; use green & Hidden
       ("STNOTE" "S-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
       ("STSTEEL" "S-Beam" "white" "Phanton2")  ; use white & Phanton2
       ("STWOOD" "S-Cols" "white" "Phanton2")  ; use white & Phanton2
       ("S-WALLS" "S-Wall" "White" "Continuous") ; Use White & cont
       ("TITLES" "A-Anno-Dtit" "magenta" "Continuous")  ; magenta & linetype set in dwg
       ("TRAP" "P-Fixt-Symb" "red" "Continuous") ; Use red & cont
     )
  )
  (MergeLayer LayList)
  (princ)
)

(defun c:fixlayers2 (/ LayList)
  ;;  Create a list of layer name Lyr_datas. ((oldlayer newlayer)....)
  (setq LayList '(("3DAREWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("3DARWINDOW" "A-Glas" "green" "Continuous") ; Use green & cont
       ("A_Notes" "A-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
       ("AN_DIMS" "A-Anno-Dims" "yellow" "Continuous")  ; use yellow & cont
       ("AN_NOTES" "A-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
       ("AN_POCHE" "A-Flor-Patt" "54" "Continuous")  ; use 54 & linetype set in dwg
       ("AN_RM_NAMES" "A-Anno-Rnam" "magenta" "Continuous")  ; magenta & linetype set in dwg
       ("AR_POCHE" "A-Flor-Patt" "54" "Continuous")  ; use 54 & linetype set in dwg
       ("ARAPPLIANCE" "A-Flor-Appl" "red" "Continuous")  ; use Red & "Continuous"
       ("ARBRKWALL" "A-Wall" "green" "Continuous") ; Use green & cont
       ("ARDCABINET" "A-Flor-Case-Ovhd" "41" "Hidden") ; Use 41 & hidden
       ("ARDOOR" "A-Door" "yellow" "Continuous") ; Use yellow & cont
       ("ARDOOR-BR" "A-Door" "yellow" "Continuous") ; Use yellow & cont
       ("ARDOOR-SILL" "A-Door" "yellow" "Continuous") ; Use yellow & cont
       ("AREA"  "A-Area-Nplt" "11" "Continuous") ; Use 11 & cont
       ("AREWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("AREWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("AREWALL-5_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARFIREPLACE" "A-Flor-Appl" "red" "Continuous")  ; use color & linetype set in dwg
       ("ARGLAZE" "A-Glas" "green" "Continuous") ; Use White & cont
       ("ARHEADER" "S-Beam" "white" "Phanton2")  ; use white & "Phanton2"
       ("ARINTELEV")
       ("ARIWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARIWALL-1_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARIWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARIWALL-5_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARKWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARKWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARSCABINET" "A-Flor-Case-Ovhd" "41" "Hidden") ; Use 41 & hidden
       ("ARSOFFIT")
       ("ARSTAIR" "A-Flor-Strs" "green" "Continuous") ; Use green & cont
       ("ARTRAP" "P-Fixt-Symb" "red" "Continuous") ; Use red & cont
       ("ARWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARWALL-3_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARWALL-5_50" "A-Wall" "White" "Continuous") ; Use White & cont
       ("ARWINDOW" "A-Glas" "green" "Continuous") ; Use green & cont
       ("BA_FL1_ARBRKWALL" "A-Wall" "green" "Continuous") ; Use green & cont
       ("BA_FL1_ARDOOR" "A-Door" "yellow" "Continuous") ; Use yellow & cont
       ("B_FL1_AREWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("BA_FL1_ARGLAZE" "A-Glas" "green" "Continuous") ; Use green & cont
       ("BA_FL1_ARIWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("BA_FL1_ARWALL" "A-Wall" "White" "Continuous") ; Use White & cont
       ("BA_FL1_ARWINDOW" "A-Glas" "green" "Continuous") ; Use green & cont
       ("BA_FL1_DIMENSIONS" "A-Anno-Dims" "yellow" "Continuous")  ; use yellow & cont
       ("BA_FL1_LIGHT" "A-Misc" "green" "Continuous") ; Use green & cont
       ("BA_FL1_TITLES" "A-Anno-Dtit" "magenta" "Continuous")  ; magenta & linetype set in dwg
       ("BA_FN1_GENNOTE" "A-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
       ("BA_FN1_TITLES" "A-Anno-Dtit" "magenta" "Continuous")  ; magenta & linetype set in dwg
       ("BEAM" "S-Beam" "white" "Phanton2")  ; use white & "Phanton2"
       ("BLOCK")
       ("BLOCKTEXT")
       ("BRNOTE")
       ("BRTITLES")
       ("CONSTRUCTION" "A-Cons-Nplt" "yellow" "hidden2")  ; yellow & hidden2 set in dwg
       ("DASH1" "A-Misc" "green" "Continuous") ; Use green & cont
       ("DASH2L" "A-Misc" "green" "Continuous") ; Use green & cont
       ("DASH3L" "A-Misc" "green" "Continuous") ; Use green & cont
       ("DETAIL" "A-Detl" "41" "Continuous")  ; use 41 & cont
       ("DIMENSIONS" "A-Anno-Dims" "yellow" "Continuous")  ; use yellow & cont
       ("DTL-3" "A-Detl" "41" "Continuous")  ; use 41 & cont
       ("DWGTEXTURE" "A-Flor-Patt" "54" "Continuous")  ; use color & linetype set in dwg
       ("LIGHT" "A-Misc" "green" "Continuous") ; Use green & cont
       ("MEDIUM" "A-Misc" "magenta" "Continuous") ; Use magenta & cont
       ("MPFIXTURE" "M-HVAC-Symb" "magenta" "Continuous")  ; use magenta & cont
       ("OILHEAT" "M-HVAC-Symb" "magenta" "Continuous")  ; use magenta & cont
       ("OPTION" "A-Misc" "green" "Continuous") ; Use green & cont
       ("PR_POCHE" "A-Flor-Patt" "54" "Continuous")  ; use 54 & linetype set in dwg
       ("REVISION" "A-Anno-Revs" "cyan" "Continuous")  ; use cyan & cont
       ("S-DTL" "A-Detl" "41" "Continuous")  ; use 41 & cont
       ("S-NOTES" "S-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
       ("ST_NOTESMS" "S-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
       ("ST_WBEAM" "S-Beam" "white" "Phanton2")  ; use white & "Phanton2"
       ("Stdtl" "A-Detl" "41" "Continuous")  ; use 41 & cont
       ("STFND" "S-Wall" "White" "Continuous") ; Use White & cont
       ("STFTG" "S-Foot" "green" "Hidden")  ; use green & Hidden
       ("STNOTE" "S-Anno-Note" "cyan" "Continuous")  ; use color & linetype set in dwg
       ("STSTEEL" "S-Beam" "white" "Phanton2")  ; use white & Phanton2
       ("STWOOD" "S-Cols" "white" "Phanton2")  ; use white & Phanton2
       ("S-WALLS" "S-Wall" "White" "Continuous") ; Use White & cont
       ("TITLES" "A-Anno-Dtit" "magenta" "Continuous")  ; magenta & linetype set in dwg
       ("TRAP" "P-Fixt-Symb" "red" "Continuous") ; Use red & cont
  ))
  (MergeLayer LayList)
  (princ)
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.