I have a AutoLISP file that runs when a fiile is opened. This file sets basic parimaters for AutoCAD that should not change. As part of this file the color, linetype and line weight are set to bylayer. This turns on the Hide/Show lineweights toggel. To turn it back off I set the lwdisplay to 0, but when the file opens it is still set to 1. What am I doing wrong?
ACADDOC.lsp:
(setvar "cmdecho" 0) ; Hides commands form desplaying on command line
(setvar "peditaccept" 1) ; Removes confirmation when slecting non-pnlylines with pedit
(setvar "plinegen" 1) ; sets polyline linetype generation to enabled
(command ".viewres" "y" 5000) ; Smoths cirves
(setvar "selectionannodisplay" 0) ; Turn off ghosting of annotative objects
(setvar "filedia" 1) ; Turns on dialog boxes
(setvar "plinetype" 2) ; convets all 2D polylines to optimized polylines
(command "taskbar" 1) ; Alows open drawing slection in Windowns 7
(command ".visretain" 1) ; Sets all VisRetain to 1, allowing x-ref laysers to be modifed
(command ".mirrtext" 0) ; Allows text to be mirrored without reversing the letters
(command "-color" "BYLAYER") ; Sets color property to by layer
(command "-linetype" "set" "BYLAYER" "") ; Sets linetype property to by layer
(command "-lweight" "BYLAYER") ; Sets lineweight property to by layer
(setvar "lwdisplay" 0) ; Toggles off the Show/Hide Lineweight button
(command "msltscale" 1) ; Turns on Modle Space line type scale
(command "geomarkervisibility" 0) ; Turns off Geo-spacial marker
(command "_layiso" "Settings" "off" "Off" "") ; Sets layer isolate to turn off layers not slected
(setvar "cmdecho" 1) ; Turns of the Hide command
Solved! Go to Solution.
Solved by scot-65. Go to Solution.
>> (command "-lweight" "BYLAYER") ; Sets lineweight property to by layer
(setvar 'CELWEIGHT -1)
Also look into CECOLOR, CELTYPE, CELTSCALE.
Old school "CE" method still works.
???
Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.
Thank You. I am still learning AutoLISP the hard way. I wish I could find a good book to learn from.
I have cleaned up the text to this:
(setvar 'cmdecho 0) ; Hides commands form displaying on command line
;;; Function
(setvar 'peditaccept 1) ; Removes confirmation when selecting non-pnlylines with pedit
(setvar 'filedia 1) ; Turns on dialog boxes
(setvar 'visretain 1) ; Sets all VisRetain to 1, allowing x-ref laysers to be modified
(setvar 'mirrtext 0) ; Allows text to be mirrored without reversing the letters
(command "taskbar" 1) ; Allows open drawing selection in Windows 7
;;; Display
(setvar 'selectionannodisplay 0) ; Turn off ghosting of annotative objects
(setvar 'mtjigstring "PKCE") ; Sets text sample string
(setvar 'plinegen 1) ; sets polyline linetype generation to enabled
(setvar 'lwdisplay 0) ; Toggles off the Show/Hide Lineweight button
(setvar 'msltscale 1) ; Turns on Model Space line type scale
(setvar 'geomarkervisibility 0) ; Turns off Geo-spacial marker
(setvar 'whiparc 0) ; Smooth circles
(command "_layiso" "Settings" "off" "Off" "") ; Sets layer isolate to turn off layers not selected
;;; Properties
(setvar 'CECOLOR "BYLAYER") ; Sets color property to by layer
(setvar 'CELTYPE "BYLAYER") ; Sets linetype property to by layer
(setvar 'CELWEIGHT -1) ; Sets the lineweight to "BYLAYER."
(setvar 'CELTSCALE 1) ; Sets the LTScale of new objects to 1.
(setvar 'plinetype 2) ; convents all 2D polylines to optimized polylines
I would like to remove the last two commands and only use the associated variable, but I don't know how to look that up.
I know this is old post but related to my question.
just started this strange issue.
Every file I open creates & changes the layer to revcld with this at the command prompt
s::startup-load
Here is the info when a file is loaded.
AutoCAD menu utilities loaded.
VSF.LSP for AutoCAD is loaded.
To view a slide of the fraction chart type VSF.
lrgflngs.LSP for AutoCAD is loaded.
To view a slide of the fraction chart type lrg_flngs.
PIPE.LSP for AutoCAD is loaded.
To view a slide of the Pipe properties chart type PIPE.
>> Draw revcld, please >>
Unknown command "REVCLD". Press F1 for help.
*Cancel*
Any ideas how to get rid of this behavior?
Thank you,
Mark
Do you have an acaddoc.lsp file that's doing these things? If you're not sure, type in:
(findfile "acaddoc.lsp")
and it will show you whether there is one, and if so, where it is. Open that in Notepad to see what's in it.
Where do I type this at?
Windows search bar, not in AutoCAD right??
Thanks