Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Macro for Button to Toggle Model Space Background Color in AutoCAD 2025

1 REPLY 1
Reply
Message 1 of 2
javierH485T
144 Views, 1 Reply

Macro for Button to Toggle Model Space Background Color in AutoCAD 2025

Hello, I wanted to know if there is a way to create a button that actually works with a macro to toggle the model space background between white and black in AutoCAD 2025. I found this:

https://www.cadforum.cz/en/qaID.asp?tip=6021

But it doesn’t work. Any suggestions for a macro that actually works with a button? Autodesk could implement a button to do this instantly... considering collaborative work.

 

Thanks.

1 REPLY 1
Message 2 of 2
cadffm
in reply to: javierH485T

Hi,

 

this Macro is for AutoCAD LT Version. Autocad doesn't have setenv/getenv command, it can't work.

 

In AutoCAD (and also in LT since version 2024) you can use Lisp to do the same.

 

 

^C^C(if (eq (getenv 'Background) "0") (setenv "Background"  "16777215") (setenv "Background" "0"));_TILEMODE;0;_TILEMODE;1;

 

Or a lispfunktion like that

https://cadpanacea.com/wp/?p=242

 

 

Sebastian

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report