Sanitize Object Names

1 vote
Date Updated: 

Removes special characters from object names which can cause issues with network rendering. These often appear when bringing in a model from Revit.

- Inch and feet characters (" and ') are replaced with in and ft.
- Both 's and s' are replaced with s.
- Most other common special characters are currently replaced with underscores.

The script does not currently address super-long object names that repeat a long string of text, e.g. "GCX_comm_cad_files-GCX_vhm_with_14in_ext_ergo_bracket GCX_comm_cad_files-GCX_vhm_with_14in_ext_ergo_bracket [264659]" but this may be addressed in a future version. ideally it would just remove the redundant text.

Additional Info: 

To run, go to MAXScript -> Run Script. It will perform its task automatically.

Here's the line of code which specifies all the characters that are handled:

sanitize_object_names_20141109.ms710 bytes