/// <summary> /// Returns the GUID for a storey level, depending on whether we are using R2009 GUIDs or current GUIDs. /// </summary> /// <param name="level"> /// The level. /// </param> /// <returns> /// The GUID. /// </returns> public static string GetLevelGUID(Level level) { if (!ExporterCacheManager.ExportOptionsCache.Use2009BuildingStoreyGUIDs) { return(ExporterIFCUtils.CreateAlternateGUID(level)); } else { return(ExporterIFCUtils.CreateGUID(level)); } }
/// <summary> /// Get IFC GUID for element /// </summary> /// <param name="e">Revit Element</param> /// <returns>String IFCGUID</returns> public static string GetGUID(this Element e) { // generate IFC GUID using IFC API string ifcid = ExporterIFCUtils.CreateAlternateGUID(e); // fallback to uniqueId in case of error if (ifcid == null || ifcid == string.Empty) { return(e.UniqueId); } return(ifcid); }
/// <summary> /// Returns the GUID for a storey level, depending on whether we are using R2009 GUIDs or current GUIDs. /// </summary> /// <param name="level"> /// The level. /// </param> /// <returns> /// The GUID. /// </returns> public static string GetLevelGUID(Level level) { if (!ExporterCacheManager.ExportOptionsCache.GUIDOptions.Use2009BuildingStoreyGUIDs) { string ifcGUID = ExporterIFCUtils.CreateAlternateGUID(level); if (ExporterCacheManager.ExportOptionsCache.GUIDOptions.StoreIFCGUID) { ExporterCacheManager.GUIDsToStoreCache[new KeyValuePair <ElementId, BuiltInParameter>(level.Id, BuiltInParameter.IFC_GUID)] = ifcGUID; } return(ifcGUID); } else { return(CreateGUID(level)); } }
/// <summary> /// Returns the GUID for a storey level, depending on whether we are using R2009 GUIDs or current GUIDs. /// </summary> /// <param name="level"> /// The level. /// </param> /// <returns> /// The GUID. /// </returns> public static string GetLevelGUID(Level level) { if (!ExporterCacheManager.ExportOptionsCache.GUIDOptions.Use2009BuildingStoreyGUIDs) { string ifcGUID = ExporterIFCUtils.CreateAlternateGUID(level); if (ExporterCacheManager.ExportOptionsCache.GUIDOptions.StoreIFCGUID) { IFCStoredGUID.ElementIdToGUID[level.Id] = ifcGUID; } return(ifcGUID); } else { return(CreateGUID(level)); } }