Hi! I'm trying to create batch scripts for SimSolid. Many of our parts have special characters and language-specific characters (å ä ö). The issue becomes obvious when trying to apply materials, for instance in this case:
study.applyMaterial({material: 'Steel', partNameMask: 'Disc Ø97:1'});
The part name just becomes "Disc" in SimSolid and no material is applied.
Do you know any way around this, except not using special characters, because that is unfortunately not an option?
SimSolid does read special characters correctly if I open a STEP file, so is there something hidden in the JavaScript API I can't find? Thank you for your time.
Hi Sam,
SimSolid’s JavaScript API can sometimes have trouble matching part names containing special or language-specific characters like “Ø,” “å,” “ä,” or “ö” when using name masks in scripts. While the software itself reads these characters correctly when importing STEP files, the scripting interface may not fully support them due to encoding or string-matching limitations. Unfortunately, there isn’t a documented workaround in the current API that allows direct matching of parts with special characters in their names using
partNameMask
. A common approach is to avoid relying solely on exact name matching with special characters; instead, consider using more general or partial masks that exclude special characters (e.g.,'Disc*'
) if that’s feasible. Alternatively, you could preprocess part names via scripting to replace or normalize special characters before applying materials. Since SimSolid reads the names correctly in the UI, this may be an API limitation rather than a data issue. If this is critical for your workflow, I recommend contacting Altair support to check if there’s an upcoming fix or hidden API parameter to handle Unicode or special characters more robustly in scripting. Meanwhile, using wildcard masks or creating a mapping between original part names and simplified scripting-friendly aliases might be practical workarounds.Regards,
Sourav