Macro to Remove Spaces and Quotes from Multiple Part Bodies
Macro to Remove Spaces and Quotes from Multiple Part Bodies
(OP)
I was on here about a year ago and had help creating a macro that would remove any specified symbol from the part body names.
The line of code i have is this:
This works great, I have added multiple similar lines with to the script with other symbols, but I have run into two issues.
1.Code to change spaces to underscores:
2.Code to change quotes to underscores:
Neither of these work, anybody have any ideas how to modify the code to get them to work?
Also, how would i modify my code to just remove specified symbol as opposed to replacing it with an underscore?
The line of code i have is this:
CODE --> CATScript
newName = Replace(newName, ".", newCharacter) 'replace all "." with "_"
This works great, I have added multiple similar lines with to the script with other symbols, but I have run into two issues.
1.Code to change spaces to underscores:
CODE --> CATScript
newName = Replace(newName, " ", newCharacter) 'replace all " " with "_"
2.Code to change quotes to underscores:
CODE --> CATScript
newName = Replace(newName, """, newCharacter) 'replace all """ with "_"
Neither of these work, anybody have any ideas how to modify the code to get them to work?
Also, how would i modify my code to just remove specified symbol as opposed to replacing it with an underscore?





RE: Macro to Remove Spaces and Quotes from Multiple Part Bodies
When you want to find more about a specific subject and you don't find in CATIA automation docs what you need, you can assimilate CATScript or catvbs language with vbs language. So, using Google I found this about spaces and this about quotes
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU