I needed a routine, either to create a new layer or to modify an existing layer and I made this one
;;; create_change_layer
;;; ------------------------------------------------------------------------------
(defun create_change_layer
(l_name l_linetype l_color l_status
) );;;end if
(if (and (> l_color
-256)(< l_color
256)) );;;endif
);;;end progn
);;;end 1 cond
(t
(cons 100 "AcDbSymbolTableRecord") (cons 100 "AcDbLayerTableRecord") );;;end first cond
(t "Continuous")
);;;end second cond
) ;;;end of conditions
);;;end of list
);;;end of setq
);;;end progn
);;;end 2 cond
);;;end condition
);;;end defunn
The problem I encounter:
When I want to change the status of an existing layer to freeze, it works.
When I want to change this layer to be active this layer does not appear even with <command “regen”>.
On the Layer Properties Manager seems to be active.
In the AutoCAD database exist with the settings I had done.
I found it, when in such a case I save the plan immediately after that procedure and when I opened the plan, that layer appeared normally with the settings that I had given.
I don't understand what is happening, I am confused, if any one knows let's help.
EDIT (John): Added code tags.