CHZ20
Can't fillet selected objects because "Lines are non coplanar"?
Annoying drawing with all objects have different Z coordinates?
All layers in an xref drawing have been changed to a single colour but there are still a few objects remain in their own colours?
All blocks renamed individually after using command FLATTEN?
FLATTEN dies with the prompt "bad argument type: lselsetp nil Regenerating model"?
Can't change annotative multileader elevation?
Get rid of all dimension and MultiLeader color overrides?
Change objects in block to a certain layer such as Layer 0?
Set random thickness to polylines and circles to make a quick urban design 3d model?
Change the linetype scale of objects in blocks to show the hidden line effect without explode the block or go into the block editor?
Make changes to all xrefs automatically?
Please try CHZ20.
It can make following changes to selected objects / entire drawing / all xrefs:
Change Z coordinates to 0,
Change the thickness to 0 or in a random range,
Project entities to WCS plane if they are not parallel to it, including lines, 2d and 3dpolylines, lwpolylines, rays, xlines, mlines, and helixs.
Change the colour to Bylayer, Byblock, its layer color, true color or user-defined color matching rules optionally.
Change the linetype to Bylayer, Byblock, or user-defined linetype matching rules optionally.
Change the lineweight to Bylayer, Byblock, Default, or 0.00 mm.
Change the material to Bylayer, Byblock, or Global.
Change the entity transparency to Bylayer, Byblock, 0, 25, 50, or 75.
Change the linetype scale of to a certain number such as 1.0
Change the property of block itself and its definition including all nested objects or selected entity types.
Remove the color override in Mtext, MultiLeader and Dimension text contents.
Change the color settings in Dimension and MultiLeader styles to ByLayer or ByBlock.
Change the layer of subentity of blocks based on a matching rule file.
With the command line function, you can also incorporate it into a script file to run in over all drawings in certain folder.
INTRODUCTION
CHZ20 will go through every object in the selection and change their thickness, Z coordination value, extrusion, colour, linetype, lineweight, material, linetypescale, block subentity layer, etc to a widely accepted standard format.
You can select objects before using CHZ20. For example, you can filter out all texts first, then use CHZ20.
Command: CHZ20
Objects to be changed: All / <Select>:
Command line options:
Select
Only apply changes to selected objects.All
Verify and change all objects in the drawing automatically.
If you have selected objects before issuing CHZ20 command, it skips above step.
You can select various options from the setting dialogue as following.
Options in the setting dialogue:
Check blocks' definition
If there are blocks in the selection, this option becomes available and is selected as default. It enables all changes in options below apply to not only selected block themselves, but also their subentities' definition as well. This option is only avaiable in the registered version.Put subentities to layer
If there are blocks in the selection, this option becomes available. It changes all subentities (except "Apply to subentity of" is selected) including all embedded blocks and attributes to a selected layer in the pop-up list at right-hand side. The default layer is Layer 0. It doesn't affect objects on locked, freezed or turn-offed layers. It doesn't affect the layer of selected block itself. This option is only available in the registered version.By file
Change the layer of block subentities according to converting rules defined in a txt file.
You need create a layer matching rule file first, then click "By file" at end of layer list to select the file.
(Click here to download an example file)
For example, changing all red subentities to Layer "Outline"; change all subentities on Layer 0 with "Hidden" linetype to Layer "Hidden Objects"; Change all subentities to Layer 0 except for objects on Layer Defpoints; Change subentities in truecolor (225 38 5) or (255 1 1) to layer "New equipment", Change all subentities on layer name start with "Level 1" to "Floor" etc.
Click "By file" button again to change previous selected file.
See Notes below for more information.
Apply to subentity of
If there are blocks in the selection, this option becomes available. When selected, the edit box on the right-hand side becomes available. You can input entity type here to define which subentity types should the changes apply to. You can enter multiple types, separate each of them by a space. For example, Input "LINE ARC HATCH" here will only make changes to these 3 types of subentities in selected block.
Input "INSERT" to apply changes to subentity of block inserts only.
There is a special subentity type you can use. Input "INSERT1" to allow it applying changes to subentity of all block inserts but ignoring the last level of block inserts.Change Z to 0
This opion is selected by default. If you only want to change colors, you can keep the object Z coordinates as it is by de-selecting this option.Set random Z value
If selected, instead of change all Z coordinates of object to 0, it will set random Z coordinates to all objects. (See TIPS below)Set extrusion to 0
Sometime even the thickness and Z coordinates have been set to 0, the object may have an odd extrusion direction which make it not projected to WCS plane properly. If selected, it will change the extrusion direction of selected objects to normal settings as view from top. This option is enabled only when "Change Z to 0" is selected. This option doesn't affect the extrusion of following entities which is changed automatically as long as "Change Z to 0" is selected: Line, LWPolyline, 3dPolyline, 3dPolyline, PolygonMesh, PolyFaceMesh, Ray, Xline, Mline, and Helix.
(See NOTES below)Change thickness to 0
If selected (default), it will change the thickness of selected objects to 0.Set random thickness
This option is enabled when option "Change thickness to 0" is not selected. When this option is selected, you can input a random thickness range in "From" and "to" input boxes. The thickness range must be positive numbers, and "to" must be equal or larger than "From". It changes the thickness of selected object randomly. It is useful when you are working on a large-scale city master planning or an urban planning and want to set up some 3d model of buildings very quickly. The precision of new thickness is determined by the precision of "From" or "to" whichever has more digits after the decimal point. For instance, if "From" is 100.20, "to" is 200.8, the precision of new random thickness will be 2 digits after the decimal point. The new thickness results include numbers such as 150.23, 124.50, and 198.25.Remove Mtext/MLeader text content color override
It removes the overriding color format inside the texts of selected Mtext or MLeaders.Remove dimension color override
It removes the overriding color format inside the selected dimensions.Convert gradient fill to solid hatch
It converts all gradient hatches into single-colored solid hatches.Remove Non-Acad Xdata
It removes all xdata except AutoCAD build-in Xdata such as associative dimensions and text masks.Change color to
Select this option to enable all color changing related options below:ByLayer
Change the color of selected objects to ByLayerByBlock
Change the color of selected objects to ByBlockBy file
Change the color of selected objects according to converting rules defined in a txt file.
You need create a color matching rule file first, then click "By file" button to select the file.
(Click here to download an example file)
It converts a certain color to another color. For example, changing all red objects to yellow color, change all objects in color 8 to color 253, change all true color objects to the closest index color, etc.
Click "By file" button again to change previous selected file.Object layer color
Change selected objects to their layer color.Matching true color
Change selected objects to a matching true color.
For example, Red objects (either in red or on a red layer and its color set to ByLayer, as long as it looks red) will be converted to true color (255, 0, 0).Retain byblock color
If selected, color changes won't affect the objects in ByBlock color.Retain bylayer color
If selected, color changes won't affect the objects in ByLayer color.Retain true colors
If selected, color changes won't affect the objects in true color.Change dimension styles
If there are dimensions in selection, with this option selected, it will change the style of selected dimensions to ByLayer / ByBlock color and remove all override in selected dimensions as well. Do not select this option if you need keep some of the dimension overrides.Change MLeader styles
If there are MultiLeaders in selection, with this option selected, it will change the style of selected MultiLeaders to ByLayer / ByBlock color and change all color override in selected MultiLeaders to ByLayer / ByBlock as well.
Make changes to Linetype
Select one option from the right-hand side pop-up list as below:No change
Default option, it will not make any changes to objects' linetypeByLayer
Change the linetype of selected objects to ByLayerByBlock
Change the linetype of selected objects to ByBlockBy file
Change the linetype of selected objects based on the converting rules defined in a txt file.
You need create a linetype matching rule file first, then click this button to select the file.
(Click here to download an Example File)
It converts a certain linetype to another linetype. For example, changing all objects of "Hidden" linetype to "Bylayer", change all objects in a certain DGN linetype to a AutoCAD standard linetype, etc.
Click this button again to change previous selected rule file.
The conversion is skipped if a target linetype defined in the rules file is not loaded into current drawing.Object layer linetype
Change the linetype of selected objects to their layer linetype. Only object with "ByLayer" linetype will be affected.
If you need change object with other linetypes to its layer linetype, please change its linetype to "ByLayer" first, then change their linetype again with this option.
Make changes to Lineweight
Select one option from the right-hand side pop-up list as below: (see NOTES for AEC objects)No change
Default option, it will not make any changes to objects' lineweightByLayer
Change the lineweight of selected objects to ByLayerByBlock
Change the lineweight of selected objects to ByBlockDefault
Change the lineweight of selected objects to Default0.00 mm
Change the lineweight of selected objects to 0.00 mm
Make changes to Material
Select one option from the right-hand side pop-up list as below:No change
Default option, it will not make any changes to objects' materialByLayer
Change the material of selected objects to ByLayerByBlock
Change the material of selected objects to ByBlockGlobal
Change the material of selected objects to Global
Make changes to Transparency
Select one option from the right-hand side pop-up list as below:No change
Default option, it will not make any changes to objects' transparencyByLayer
Change the transparency of selected objects to ByLayerByBlock
Change the transparency of selected objects to ByBlock0, 25, 50, 75
Change the transparency of selected objects to 0, 25, 50, or 75.
Make changes to Linetype Scale
Input new linetype scale value in the edit box to change the linetype scale of selected objects.Help button
Bring you to this webpage.
If there is any block in the selectoin, it checks embedded blocks and blocks with attribute after the dialogue closing down. Sometimes it takes a few minutes to do so depending on the complicacy of the drawing.
If the drawing contains xrefs, it prompts after CHZ20 running:
Run CHZ20 in all xrefs? Yes/<No>:
Select Yes to run CHZ20 automatically in all xrefs, including attach and overlay xrefs. It will use current CHZ20 settings.
After CHZ20 running in all xrefs, it goes back to current drawing. You need reload all xref to show the changes.
Just remember changes to xrefs are not able to UNDO from current drawing. You have to retrieve the previous version from the .bak file.
LSP FUNCTION
You can create your own script file or lisp file to batch process thousands of dwg files.
CHZ20 has a command line function which can be used in such script files.
It uses saved settings which has been saved in the last settings dialogue box when you click OK.
(Chz20_cmd T)
This function runs without both setting dialogue box and object selection option.
(Chz20_cmd 1)
This function runs without setting dialogue box but with object selection option.
TIPS
1. Please do not select "Set radom Z value" except:
You want to make some troubles to other people who is not faithful and reliable but you have to issue your drawing without any payment guarantee.
Just for fun
2. If you want to convert all entities in all block definitions to ByBlock or Layer 0, but not affecting other objects in a drawing, please turn on all layers, use command "ERASE", "ALL" to delete all objects in current space first, then use CHZ20 to convert "All" to ByBlock color or Layer 0 (with "Check blocks' definition" selected), then use command "OOPS" to retrieve all objects deleted before and then retrieve previous layer status.
3. If you only need to change properties of sub-entities inside a block, not properties of the block insert itself, you can make a copy of that block insert before using CHZ20 to change its definition, then delete the copy after the procedure.
4. No all AutoCAD entities have the property of "thickness". A typical example of entities has the thickness property is a polyline.
5. The colour / linetype matching rule file used at last time become the default file at next time or in the command line function.
6. Run dialogue first and press OK to save all settings as default before you run the command line function in the script / lisp file.
7. You can use wildcard in the layer name matching file.
NOTES
If the extrusion direction of an insert, arc, ellipse or circle is not vertical to WCS plane and the Option of "Set Extrusion to 0" is selected, the result will not be the same as the original top view.
If the Z value of extrusion directon is -1.0, the object was drawn from 'Bottom View'. Force it to 1.0 will change the object position. New position is a mirror image of the original object along Y axis. Currently CHZ20 is albe to keep following objects stay at their original position and keep correct rotatition after changing their Z value of extrusion directon from -1.0 to 1.0: Arc, Block, Ellipse, Polyline, Mtext, Solid & Text. We will add in more object types in the future.
For some instances if FLATTEN command is used to change objects which extrusion direction is not vertical to WCS plane, it may convert the entitiy to another entitiy type, eg circle & arc to ellipse.
Following entity types will not be affected:
"3DSOLID" "BODY" "REGION" "OLEFRAME" "SECTION" "SUN" "SURFACE" "UNDERLAY".Try command FLATSHOT to convert 3dsolid entities to 2d.
Third party entities will not be affected. It will print such entity types in the command line report.
Change color to bylayer function is more powerful than command SETBYLAYER, because
If you choosed "All" at beginning, it will selected all objects in both model space and paper space.
It also changes dimension styles, dimension color overrides, Multileader styles and Multileader color overrides
Sometime you need change the color setting of a certain style instead of the color of the object itself to get the preferable result. For instance, table objects, some doors and windows in AutoCAD Architecture, etc.
If a dimension color hasn't been changed properly, please check settings of "Remove dimension color override" and "Change dimension styles".
It may takes a few minutes or longer to complete "Checking embedded blocks", "Checking blocks with attribute", "Checking blocks" or "Checking entities" if the drawing contains many complicated blocks or a lots of entities. AutoCAD may become idle, "No Responding", don't worry, it is still working at the background at high speed (now you wish you have a better computer...)
Blocks and tolerances can have various z-value in different annotative scales. CHZ20 only changes the z-value in current annotative scale.
If the drawing itself has errors and need recover, it may cause collapse when running CHZ20. Audit it first if not sure.
When using "By file" option in "Put subentities to layer", you can use True Color in the Layer matching rules.
When using "By file" option in "Put subentities to layer", if target layer does not exist, CHZ20 will create it, and the new layer name is in upper case.
When the format of matching rule file is incorrect, AutoCAD may stops running. So save your drawing before testing your matching rules.
EXAMPLE
How to format layer names in a drawing to company standard?
Set up a layer matching rule file in txt format.
Xref the file into the current drawing.
Use CHZ20 and select "Put subentities to layer" and "By file"
Select the layer matching rule file.
Input "Yes" when it prompts "Run CHZ20 in all xrefs?"
You need a full registrered CHZ20 to use this function.
Please simply email liugesen@126.com to find out the usage details.
TRIAL RESTRICTION
Trial version has some restrictions:
Only 20 objects can be changed at one time
Unable to change block definition
Unable to change block subentities' layer
Please simply email liugesen@126.com to get a free Registration Code.
SCREEN SHOT
CHZ20 settings dialogue box
BEFORE: Objects to be set random thickness
AFTER: Objects have been set random thickness
DISCUSSIONS
How do I project a 3D drawing onto a plane so that all points have a Z coordinate of 0?
My AutoCAD does not recognize the "flatten" coomand. What can I do?
How can I change Z-Value of Multileaders to zero to get the best printing result?
How to change block subentity to different layers according to different properties?
LISP to get layer color and linetype and apply to all objects
UPDATES
09 Apr 2024 'Check block's definition' remains selected but greys out when no block in the selection.
03 Aug 2023 Resolve the embedded dimension override colour display issue when updating blocks.
29 Apr 2023 Add a new option of "Remove dimension color override". New user interface.
04 Apr 2023 Allow changing xref entity layers based on the matching rule file.
01 Apr 2023 Allow wildcard to be used in the layer name matching file.
11 Jan 2023 Albe to change Z Extrusion Direction from -1 to 1 and leave following objects stay at the original position: Arc, Block, Ellipse, Polyline, Mtext, Solid, Text..
17 July 2022 Use MS Edge to open webpage when pressing help button.
17 Dec 2021 Only object with ByLayer linetype will be changed when "Object layer linetype" option is selected. Object with other linetypes are not affected.
01 Dec 2021 Fix a bug when Mleader use default blocks, "Check blocks' definition" grey out.
21 Nov 2021 Fix a bug when using "TRUE" in subentity layer matching file.
08 May 2021, Add "INSERT1" as a special subentity option to allow ignoring the last level of block inserts inside a block definition.
10 Jan 2021, Fix a bug when "Retain ByBlock" selected.
Fix a bug when "By File" selected and both source and target color are true color.
14 May 2020, Fix a bug when the last item of "Apply to subentity of" is ignored.
28 Jun 2019, Fix a bug when "Remove Non-Acad Xdata" is selected, it incorrectly removes leader line association.
03 Nov 2018, Fix a bug when "Remove Non-Acad Xdata" is selected, it incorrectly removes dynamic block definition data.
02 Jun 2018, Fix a bug which causes the "ByBlock" option is not available. Fix a bug when changing splines.
15 Dec 2017, 2 functions added: "Convert gradient fill to solid hatch" and "Remove Non-Acad Xdata".
29 Apr 2016, Fixed a bug when changing xrefs.
26 Apr 2016, Fixed a bug when changing object color.
24 Mar 2016, Able to change all true color objects to the closest index color.
22 Dec 2015, Add a command line function (CHZ20_cmd 1) to disable the setting dialogue box but allow object selection.
17 Mar 2015, Fixed a typo in the dialogue box.
15 Jan 2015, Able to change dynamic blocks definition.
18 Nov 2014, Able to verify truecolor subentities and change their layers based on a layer matching file.
Allow space in new layer name in the layer matching file.
Allow use both upper and lower case characters in new layer names.
17 Nov 2014, Resolved an issue when changing dynamic blocks.
Resolved an issue when changing MLeaders.
12 Nov 2014, Resolved an issue with a missing function when processing wipeouts & images.
06 Nov 2014, Resolved an issue when previous layer name matching file does not exist.
Add a new rule to layer name matching file which allow select all other objects except rules above.
Resolved an issue when number is used as layername such as Layer 0.
Provide a solution to keep objects on Layer defpoint while change all other objects to Layer 0.
26 July 2014, Able to change Z value of Wipeout and Image objects to 0.
18 July 2014, Able to change block subentity layer according to its properties such as color, linetype, etc which is defined in a txt file.
30 Jun 2014, Able to run CHZ20 in all xrefs automatically.
21 May 2014, Skip "Select matching list file" dialogue in the command line function
if ByFile is not selected previously as default Color or Linetype option.
18 May 2014, Resolved an issue when using "All" to select objects.
15 May 2014, When "Check block's definition" is selected, changes to properties only affect selected block inserts.
24 Dec 2013, Resolved an issue when 'Change color to' selected no sub-option is assigned as the default.
Resolved an issue whenc Cancel button is pressed in "Select matching list file" dialogue.
Allow select objects before using CHZ20.
31 Oct 2013, Resolved an issue when changing extrusion of ellipse object.
25 Oct 2013, Save previous settings as default.
Command line function uses saved settings.
Able to only apply changes to user selected subentity types.
Remove the summary pop-up box at the end.
Resolved an issue when changing MLeader color.
Resolved an issue when changing LWPolyline with 1e+99 Z coordinate.
11 July 2013, Compatible with AutoCAD 2007 and earlier versions.
07 Mar 2013, Resolved an issue which make AutoCAD idle in a drawing with errors.
25 Feb 2013, Resolved an issue which stops the routine in a drawing with errors.
12 Feb 2013, New item "Object layer linetype" added to Linetype changing options.
02 Jan 2013, New option added. Able to change object transparency to ByLayer, ByBlock, 0, 25, 50, or 75
20 Nov 2011, Resolved an issue in International Versions.
08 Nov 2011, Resolved an issue with drawing has invalid LwPolyline entities.
28 Oct 2011, Resolved an issue with updated dimension styles when related dimensions are on locked layer.
29 Jul 2011, Able to change z-value of annotative Mleaders, Blocks, Tolerances, and Attributes in current annotative scale.
If "Set Z to 0" is selected, it will project extruded objects to WCS as following, even without selecting the option of "Set extrusion to 0":
Line, LWPolyline, 3dPolyline, 3dPolyline, PolygonMesh, PolyFaceMesh, Ray, Xline, Mline, Helix
Able to change property of Jogged dimension entities.
Able to change Z-value of Table entities.
If "Change color to" is selected, it will audit selected old-style polyline and ensure Vertex and Seqend color match polyline color.
Able to remove true color override in Mtext and MLeader text contents.
Able to remove Mleader text color override when a color is set to the text style, not the text itself.
Able to set random thickness to old-style polylines
Able to change Z value and extrusion of Mline and Helix objects to 0.
Setting dialogue interface updated
Fixed a few bugs.
01 Jul 2011, Resolved an issue with anonymous blocks display updating and counting after changes.
AEC objects are not valid to change Lineweight
Changing block entities' layer doesn't affect objects on turn-offed layer
Able to change the color of block contained in selected Mleader objects
24 Jun 2011, New Options added: Put block subentities to selected layer, Set random thickness to objects,
Change object Lineweight, Material, and Linetype scale
30 May 2011, A few bugs fixed. Speed up at block checking and attribute checking processes
20 May 2011, A bug fixed.
14 Apr 2011, A bug fixed; Able to change Arc objects, all embedded block definition, and attributes with overwritten properties.
Process indicator added in block checking and updating.
14 Jan 2011, A few bugs fixed
23 Dec 2010, A few bugs fixed
12 Nov 2010, Changes apply to sub-object in TOLERANCE. Z value changes apply to all annotative objects except MultiLeaders.
23 Oct 2010, Add (CHZ20_CMD T) command line function to be used in a script file.