MaterialQuantities SDK sample and double byte characters

By Mikako Harada

If you are from a country of double byte characters, you may notice that MaterialQuantities from Revit API SDK Sample does not work well with double byte characters. We found that, for example, Korean characters were corrupted if material names are in Korean characters. You may wonder how to make the sample work with double byte characters.

This problem is not Revit API itself as Revit is handling Korean as Unicode. The problem is that this sample saves file as a csv, which then Excel file picks up as ascii. 

Two options to fix this problem:

  1. If you import it as Unicode UTF-8 (Excel >> Data >> From Text >> File Origin Unicode UTF-8), it read as Unicode. You should be able to read it. You can do this manually.
  2. Rewrite a code to write as an Excel sheet.  Fire Rating sample in the SDK is another sample that uses Excel and it uses workbook sheet.  You may convert the sample in a similar manner.

Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading