Author Topic: True Color  (Read 1410 times)

0 Members and 1 Guest are viewing this topic.

GDF

  • Water Moccasin
  • Posts: 2081
True Color
« on: July 04, 2018, 03:31:25 PM »
Need some help making this routine work for creating a layer with true color.

(ARCH:MLYR "NEW-MFC" 247,28,8 "Continuous" "0.01")

Code: [Select]
(defun ARCH:MLYR  (LA LC LT LW)
  (ARCH:LINETYPE)
  (command "cecolor" "bylayer")
  (setvar "cmdecho" 0)
  (if (tblsearch "layer" LA)
    (progn (command "layer" "Thaw" LA "") (command "layer" "Set" LA ""))
    (progn (command "layer" "Make" LA)
           (command "Color")
           (command "Truecolor" LC "")
           (command "Ltype" LT "" "LWeight" LW "" "")))
  (command "cecolor" "bylayer")
  (setvar "cmdecho" 1)
  (princ))
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

GDF

  • Water Moccasin
  • Posts: 2081
Re: True Color
« Reply #1 on: July 04, 2018, 03:34:18 PM »
oops

(ARCH:MLYR "NEW-MFC" "247,28,8" "Continuous" "0.01")
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

GDF

  • Water Moccasin
  • Posts: 2081
Re: True Color
« Reply #2 on: July 04, 2018, 03:55:54 PM »
Code: [Select]
(defun ARCH:LYR-RGB  (LA LC LT LW LD)
  (ARCH:LINETYPE)
  (command "cecolor" "bylayer")
  (setvar "cmdecho" 0)
  (if (tblsearch "layer" LA)
    (progn (command "layer" "Thaw" LA "") (command "layer" "Set" LA ""))
    (progn (command "layer" "Make" LA)
           (command "Color")
           (command "Truecolor" LC "")
           (command "Ltype" LT "" "LWeight" LW "" "")))
  (setq newLayer
         (vla-Add
           (vla-Get-Layers (vla-Get-ActiveDocument (vlax-Get-Acad-Object)))
           LA))
  (vla-Put-Description newLayer LD)
  (command "cecolor" "bylayer")
  (setvar "cmdecho" 1)
  (princ))
;;;(ARCH:LYR-RGB "NEW-MFC" "247,28,8" "Continuous" "0.01" "New MFC")
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: True Color
« Reply #3 on: July 06, 2018, 07:51:24 PM »
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.

GDF

  • Water Moccasin
  • Posts: 2081
Re: True Color
« Reply #4 on: July 07, 2018, 01:38:14 PM »
Thanks Alan and Lee
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64