Sanitize Object Names

2 votes
Version: 
v1.0
Date Updated: 
11/09/2014

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:

AttachmentSize
sanitize_object_names_20141109.ms710 bytes