I have a lisp routine and am trying to add in features to set no plot, layer on/off and freeze. Here is the current routine. Any help wo (defun MakeLayer (name color ltype lweight desc / newLayer tcolor) (vl-load-com) (setq newLayer (vla-Add (vla-Get-Layers (vla-Get-ActiveDocument (vlax-Get-Acad-Object))) name)) (cond ((= (type color) 'INT) (setq tcolor (vla-Get-TrueColor newLayer)) (vla-Put-ColorIndex tcolor color)) ((= (type color) 'VLA-OBJECT) (setq tcolor color))) (cond (tcolor (vla-Put-TrueColor newLayer tcolor))) (cond (ltype (vla-Put-Linetype newLayer ltype))) (cond (lweight (vla-Put-Lineweight newLayer lweight))) (cond (desc (vla-Put-Description newLayer desc))) newLayer) ; return layer object <VLA-OBJECT IAcadLayer2 0a2e6ac4> (setq myColor (vla-GetInterfaceObject (vlax-Get-Acad-Object) "AutoCAD.AcCmColor.16")) <VLA-OBJECT IAcadAcCmColor 0a3072a0> (vla-SetRGB myColor 37 82 56) nil (MakeLayer "a010" 7 nil nil "Drawing Sheet/Title Block Lines" "0") <VLA-OBJECT IAcadLayer2 0a302cb4> (vlax-Release-Object myColor)
Have you tried using vla-put-plottable -- Autodesk Discussion Group Facilitator layer on/off and freeze. Here is the current routine.
How do you get the lweight value to work? But, if I remember correctly, you need to use the ActiveX constant instead of a number? acLineWeight enum; read-write acLnWtByLayer acLnWtByBlock acLnWtByLwDefault acLnWt000 acLnWt005 acLnWt009 acLnWt013 acLnWt015 acLnWt018 acLnWt020