Script to remove Quotation Marks from Object Names

Does anyone know of a way or a script to automatically remove quotation marks from a bunch of objects? Many objects that come from Revit are name something like 8" CMU. Using the batch UE4 FBX exporter exports objects based on their name. But you cannot name a file with a quotation mark in it. Is there any way to search the scene and remove just the " and ' from the names without manually doing it?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
fajar's picture

......

theres a way to that problem, its already answered by Barigazy sometimes ago, maybe you could trace it in this forum

pixamoon's picture

`

Hi,

I think you can use just:

for o in objects do (
	o.name = substituteString o.name "\"" ""
	o.name = substituteString o.name "'" ""
)

or for selection only

for o in selection do (
	o.name = substituteString o.name "\"" ""
	o.name = substituteString o.name "'" ""
)

Best,
Pixamoon

dmhokie's picture

That is perfect! Thank you.

That is perfect! Thank you. You have saved me a ton of time now.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.