0

I'm using the forge viewer and would like to display a list of materials. Currently I'm finding the material name using the "tag" field of the render proxy's material (renderProxy.material.tag). This works for most formats, but I've noticed that it's an empty string for IFC imports. I've also tried finding the material name in the properties returned from viewer.model.getProperties(dbId, ...) but this shows an empty string too. Is there somewhere else I should look?

user3179594
  • 27
  • 1
  • 5
  • Hi @user3179594, I tested with one IFC file. It looks the tag is empty. but I checked some other formats, some are also empty (Fusion, or Revit format), some are index integer only in Viewer.impl.matman().materials array. could you share a snapshot on what kind of string that indicates material name? – Xiaodong Liang Nov 10 '17 at 07:03
  • @XiaodongLiang Here is screenshot from Archicad's attribute manager with a list of the material names: http://www.resene.co.nz/comn/services/picts/archicad2.jpg I'm unable to find this information in the Viewer.impl.matman(). I've seen the "tag" field populated with my rvt test models, but if it's not consistent I'll need to find another method of extracting the material names. – user3179594 Nov 13 '17 at 16:43
  • sorry, what I meant is when you said 'Currently I'm finding the material name using the "tag" field of the render proxy's material (renderProxy.material.tag). This works for most formats...', it sounds you can get valid tag from some formats, but at my side, I tested with some file formats, but have not got a case with the tag that indicates material name. So I'd like to take a look the working formats at your side, i,e, when you check the tag with Forge Viewer API, the tag is material name. Or could you simply tell me the file format? thank you – Xiaodong Liang Nov 14 '17 at 10:38
  • The tag field is populated for Sketchup formats. RVT is a different story, I thought it was working and that the material names were all set to numbers -- but it definitely makes for sense that they are just indexes. In any case, I'm still looking for a consistent method to extract material names. – user3179594 Nov 17 '17 at 19:11
  • Please bear with me checking with the corresponding engineer team if they have any comments on the tags – Xiaodong Liang Nov 19 '17 at 07:43
  • Hi @user3179594, the IFC extractor team asked me to log an internal ticket to investigate. I will watch the status and update with you when any info is available. The ticket number is NW-53965 – Xiaodong Liang Nov 30 '17 at 06:41

0 Answers0