Ad

Monday, May 17, 2021

SHOWLAYERUSAGE

 There appears to be a setting in AutoCAD that will prevent layers from indicating if objects are on them or not. The system variable is SHOWLAYERUSAGE. A value of 0 turns of the ability of AutoCAD to show if objects are on a layer. A value of 1 enables the ability of AutoCAD to indicate if a layer is in use. 

It appears this variable was created to improve drawing performance. In Civil 3D the value defaults to 0, or OFF. So if you want to see layer usage then you will want to set the value to 1. Not sure how badly this affects drawing performance. It sure would be nice if Autodesk created another thread to do the work instead of having it on the UI thread that makes the drawing performance go down. 

I guess if you hear an Autodesk developer say they can't think of a reason why multithreading is necessary, you can point them to this workaround they did instead of utilizing multithreading.

Coordinate System - Status Bar

 It would be useful to show the coordinate system in the status bar. 

One way to accomplish the task is to use the Map command MAPSTATUSBAR and set the value to SHOW. 


This, unfortunately, adds a bunch of other junk that is most likely not wanted, especially when using a small monitor. 

Another way to accomplish the task is to add the information using ModeMacro. This allows you to populate a box on the StatusBar with information. To do so in LISP, you could copy and paste this line to the command line: 

(setvar "MODEMACRO" (getvar "CGEOCS"))

 This will get the current coordinate system string and add it to the ModeMacro field. 

To clear the value you can use the following line that will remove the coordinate system:

(setvar "MODEMACRO" "")

You can then expand the concept with more advanced code that tracks when the coordinate system changes, using PointMonitor. 

This blog post has an example of using the PointMonitor: 

    https://www.tek1.com.au/point-monitor-hello-world-autocad-net-api/ 

To get and set variables you can use the following code: 

var coordCode = Application.GetSystemVariable("CGEOCS");

Application.SetSystemVariable("MODEMACRO" coordCode);

LinkWithin

Blog Widget by LinkWithin

Ad