protected override void Process(IFCAnyHandle ifcMaterialLayerSet)
        {
            base.Process(ifcMaterialLayerSet);

            IList <IFCAnyHandle> ifcMaterialLayers =
                IFCAnyHandleUtil.GetAggregateInstanceAttribute <List <IFCAnyHandle> >(ifcMaterialLayerSet, "MaterialLayers");

            if (ifcMaterialLayers == null)
            {
                Importer.TheLog.LogError(ifcMaterialLayerSet.Id, "Expected at least 1 IfcMaterialLayer, found none.", false);
                return;
            }

            foreach (IFCAnyHandle ifcMaterialLayer in ifcMaterialLayers)
            {
                IFCMaterialLayer materialLayer = null;
                if (materialLayer is IFCMaterialLayerWithOffsets)
                {
                    materialLayer = IFCMaterialLayerWithOffsets.ProcessIFCMaterialLayerWithOffsets(ifcMaterialLayer);
                }
                else
                {
                    materialLayer = IFCMaterialLayer.ProcessIFCMaterialLayer(ifcMaterialLayer);
                }

                if (materialLayer != null)
                {
                    MaterialLayers.Add(materialLayer);
                }
            }

            LayerSetName = IFCImportHandleUtil.GetOptionalStringAttribute(ifcMaterialLayerSet, "LayerSetName", null);
        }
        public static IFCMaterialLayerWithOffsets ProcessIFCMaterialLayerWithOffsets(IFCAnyHandle ifcMaterialLayerWithOffsets)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcMaterialLayerWithOffsets))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcMaterialLayerWithOffsets);
                return(null);
            }

            IFCEntity materialLayerWithOffsets;

            if (!IFCImportFile.TheFile.EntityMap.TryGetValue(ifcMaterialLayerWithOffsets.StepId, out materialLayerWithOffsets))
            {
                materialLayerWithOffsets = new IFCMaterialLayerWithOffsets(ifcMaterialLayerWithOffsets);
            }
            return(materialLayerWithOffsets as IFCMaterialLayerWithOffsets);
        }