Ever had a problem where you can’t see the entire layer name when using the Xlist dialog box?
The solution is to modify the XLIST.LSP file. You can find it by using (findfile "xlist.lsp") at the Command line.
Open the file via the LISP editor (Vlide command) or simply with Notepad.
Put the entire DisplayDialog function in comment by putting a semicolon (;) character on each line.
OR paste the replacement DisplayDialog function shown below, AFTER the one currently in the file
(defun DisplayDialog ( / sAcad sAcadPath line1 line2 line3 line4 line5 line6 )
(setq sAcad (findfile "acad.exe"))
(setq sAcadPath (substr sAcad 1 (- (strlen sAcad) 8)))
(if (/= sBlockname "")(setq line1 (strcat "Block Name: " sBlockname " "))(setq line1 ""))
(if (/= sStyleName "")(setq line2 (strcat "Text Style: " sStyleName " "))(setq line2 ""))
(if (/= sObjectType "")(setq line3 (strcat "Object: " sObjectType " ")))
(if (/= sLayer "")(setq line4 (strcat "Layer: " sLayer " ")))
(if (/= sColor "")(setq line5 (strcat "Color: " sColor " ")))
(if (/= sLineType "")(setq line6 (strcat "Linetype: " sLineType " ")))
(alert (strcat Line1
Line2
line3
line4
line5
line6))
)
By using an alert box instead of a DCL file, it prevents AutoCAD from hiding some important information with long layer names. Additionally, it won't search for any DCL file.
If you have AutoLISP knoledge, you can use this function to show more information about the selected entities such as handle, elevation, coordinate points, etc.
You also can use acaddoc.lsp over a network to update the xlist.lsp file by adding this code in it.
(if (and
(setq oldxlist (findfile "xlist.lsp"))
(setq newxlist (findfile "serverPathLocationxlist.lsp"))
(/= (vl-file-size oldxlist) (vl-file-size newxlist))
)
(progn
(vl-file-delete oldxlist)
(vl-file-copy newxlist oldxlist)
)
)
)
Notes from Cadalyst tip review R.K. McSwain: This is a very nice solution to a Xlist command limitation that could prevent a long layer name from displaying correctly. With a little bit of AutoLISP knowledge and the instructions here, you can make this fix too. Thanks! |