title: Converting from Forge externalId into IfcGuid [model-derivative-api]
body: <p>References:</p>
  
  <p><a href="https://thebuildingcoder.typepad.com/blog/2009/02/uniqueid-dwf-and-ifc-guid.html" rel="nofollow noreferrer">https://thebuildingcoder.typepad.com/blog/2009/02/uniqueid-dwf-and-ifc-guid.html</a></p>
  
  <p><a href="https://github.com/Autodesk-Forge/bim360appstore-model.derivative-nodejs-xls.exporter" rel="nofollow noreferrer">https://github.com/Autodesk-Forge/bim360appstore-model.derivative-nodejs-xls.exporter</a></p>
  
  <p><a href="https://gist.github.com/jsdbroughton/8ead390ad03f9e26658a80f461276472" rel="nofollow noreferrer">https://gist.github.com/jsdbroughton/8ead390ad03f9e26658a80f461276472</a></p>
  
  <p>Following the sample “bim360appstore-model.derivative-nodejs-xls.exporter” I’m able to export the metadata from a BIM360 model. Each forgeObject has a property “externalId” in format 8-4-4-4-12-8. I need to convert this into the IfcGuid (22 characters long).</p>
  
  <p>When using Revit C# API I have to call</p>
  
  <pre><code> Guid elemGuid = ExportUtils.GetExportId(element.Document, element.Id);
  
   String ifcGuid = IfcGuid.ToIfcGuid(elemGuid);
  </code></pre>
  
  <p>to get the ifcGuid. How can I do the same using JavaScript in Forge environment?</p>
  
  <p>I tried it, using the JS code from J. Broughton from the references above, but the input data for function fromFullToCompressed() is a 8-4-4-4-12 value, and not the 8-4-4-4-12-8 externalId.</p>
  
  <p>So how to do the first step converting from externalId to elemGuid?</p>