ChangeColor

ChangeColor

Win32 and 64, English

hap
Changes colors of entities in a drawing to any other color.

General Usage Instructions

How to use ChangeColor

The changecolor app will allow you to change the colors of all entities/objects in a drawing.
You can change a color from BYLAYER, BYBLOCK and vice versa.
It is also possible to change the colors of entities inside the blocks in the drawing.
You can use custom script or script routine to change the color of the entities. 

Run the command ‘changecolor’ and it will display main dialog box.
To know more about Main dialog box please refer Main dialog-chapter.

If you want to use your own script, then add the following routines to your script.
(load "changecolor")
(changeallcolors "Oldcolor" "Newcolor")

Use the quotation-marks "" for the colors to avoid "bad argument type: stringp".

If you want to change color Blue (colornumber 5) to Cyan (colornumber 4) then make the following modification.
(load "changecolor")
(changeallcolors "5" "4")

The next example will change all colors that are BYLAYER to the color red.
(load "changecolor")
(changeallcolors "BYLAYER" "1")

If you don't want to change the colors inside the blocks in a drawing use the following routine.
(load "changecolor")
(setq cc-var-inside-block nil)
(changeallcolors "Oldcolor" "Newcolor")

Setting the variable cc-var-inside-block "AFTER" loading the change color will give you control over changing entities inside the blocks.

Screenshots

Commands

Ribbon/Toolbar Icon Command Command Description

ChangeColor

The command ChangeColor will launch the ChangeColor dialog

Installation/Uninstallation

The installer that ran when you downloaded this plug-in from Autodesk App Store has already installed the plug-in. You may need to restart the Autodesk product to activate the plug-in. To uninstall this plug-in, click Control Panel > Programs > Programs and Features (Windows 7/8/8.1) or Control Panel > Add or Remove Programs (Windows XP), and uninstall as you would any other application from your system.

Additional Information

You can use ChangeColor in a script file, so that you can change the colors of multiple drawings.
Use the following lines in your own script file:
(load "changecolor")
(changeallcolors "Oldcolor" "Newcolor") 

Use quotation-marks "" for the colors or you will get "bad argument type: stringp". 
"Oldcolor" is the existing color number.
"Newcolor" is the number that you want to change the color.

If you want to change color Blue (colornumber 5) to Cyan (colornumber 4) then make the following modification.
(load "changecolor")
(changeallcolors "5" "4")

Add these lines to a text file (be careful, do not add empty lines).
Save this text file for example as myscrip1.scr.
Please refer sample file myscript1.scr inside thee bundle.

In AutoCAD® type the command "script" and in the following dialog open myscript.scr
The blue colors in the drawing will change to cyan.
You can also use the menu option "Tools->Run" script to open and run myscript.scr. 

The next example will change all colors that are BYLAYER to the color red.
(load "changecolor")
(changeallcolors "BYLAYER" "1") 

If you don't want to change the colors inside the blocks in a drawing then set the variable cc-var-inside-block to nil. This will prevent the program from entering blocks inside the drawing. The default value of cc-var-inside-block is T for true. 

For example: 
(load "changecolor")
(setq cc-var-inside-block nil)
(changeallcolors "Oldcolor" "Newcolor") 
Setting the variable cc-var-inside-block "AFTER" loading change color will give you control over changing entity's inside blocks.
See file myscript2.scr

Known Issues

None

Contact

Company Name: hap
Company URL: http://www.hap.nu
Support Contact: paul@hap.nu

Author/Company Information

hap

Support Information

If you have any queries, please email to paul@hap.nu.

Version History

Version Number Version Description

1.0.0

Initial release

Go top