/// <summary>
        /// 
        /// </summary>
        /// <param name="exporterIFC"></param>
        /// <param name="file"></param>
        /// <param name="element"></param>
        /// <param name="elemHnd"></param>
        /// <param name="location"></param>
        public static void CreateClassification(ExporterIFC exporterIFC, IFCFile file, Element element, IFCAnyHandle elemHnd, string location)
        {
            string paramClassificationCode = "";
            string classificationName = null;
            string classificationCode = null;
            string classificationDescription = null;
            // For now the support is fixed to 10 predefined classification code parameter names (to support limitation of schedule key that supports only one category per schedule key and needs one parameter for each)
            int noClassCodeParam = 10;
            string [] classCodeParamName = {"ClassificationCode", "ClassificationCode(2)", "ClassificationCode(3)", "ClassificationCode(4)", "ClassificationCode(5)",
                                           "ClassificationCode(6)", "ClassificationCode(7)", "ClassificationCode(8)", "ClassificationCode(9)", "ClassificationCode(10)"}; 
            int ret = 0;

            for (int n = 0; n < noClassCodeParam; n++)
            {
                // Create A classification, if it is not set.
                if (ParameterUtil.GetStringValueFromElementOrSymbol(element, classCodeParamName[n], out paramClassificationCode))
                {
                    ret = parseClassificationCode(paramClassificationCode, out classificationName, out classificationCode, out classificationDescription);

                    if (string.IsNullOrEmpty(classificationName))
                        classificationName = "Default Classification";

                    IFCAnyHandle classification;
                    if (!ExporterCacheManager.ClassificationCache.TryGetValue(classificationName, out classification))
                    {
                        IFCClassificationMgr savedClassificationFromUI = new IFCClassificationMgr();
                        IFCClassification savedClassification = new IFCClassification();

                        if (savedClassificationFromUI.GetSavedClassificationByName(element.Document, classificationName, out savedClassification))
                        {
                            if (savedClassification.ClassificationEditionDate == null)
                            {
                                IFCAnyHandle editionDate = IFCInstanceExporter.CreateCalendarDate(file, savedClassification.ClassificationEditionDate.Day, savedClassification.ClassificationEditionDate.Month, savedClassification.ClassificationEditionDate.Year);

                                classification = IFCInstanceExporter.CreateClassification(file, savedClassification.ClassificationSource, savedClassification.ClassificationEdition,
                                    editionDate, savedClassification.ClassificationName);
                            }
                            else
                                classification = IFCInstanceExporter.CreateClassification(file, savedClassification.ClassificationSource, savedClassification.ClassificationEdition,
                                    null, savedClassification.ClassificationName);
                        }
                        else
                            classification = IFCInstanceExporter.CreateClassification(file, "", "", null, classificationName);

                        ExporterCacheManager.ClassificationCache.Add(classificationName, classification);
                        if (!String.IsNullOrEmpty(savedClassification.ClassificationLocation))
                            ExporterCacheManager.ClassificationLocationCache.Add(classificationName, savedClassification.ClassificationLocation);
                    }

                    if (String.IsNullOrEmpty(location))
                    {
                        ExporterCacheManager.ClassificationLocationCache.TryGetValue(classificationName, out location);
                    }
                    InsertClassificationReference(exporterIFC, file, element, elemHnd, classificationName, classificationCode, classificationDescription, location);
                }
            }
        }
 /// <summary>
 /// initialization of IFCAssignemt class
 /// </summary>
 /// <param name="document"></param>
 public IFCAssignment()
 {
     m_newClassificationMgr = new IFCClassificationMgr(IFCCommandOverrideApplication.TheDocument);
     InitializeComponent();
 }
        /// <summary>
        /// Create a new ClassificationCache.
        /// </summary>
        /// <param name="doc">The document.</param>
        public ClassificationCache(Document doc)
        {
            IFCClassificationMgr savedClassificationFromUI = new IFCClassificationMgr(doc);

            // The UI currently supports only one, but future UIs may support a list.
            IList<IFCClassification> classifications;
            if (savedClassificationFromUI.GetSavedClassifications(doc, null, out classifications))
            {
                foreach (IFCClassification classification in classifications)
                {
                    bool classificationHasName = !string.IsNullOrWhiteSpace(classification.ClassificationName);
                    if (classificationHasName)
                        ClassificationsByName[classification.ClassificationName] = classification;
                    if (!string.IsNullOrWhiteSpace(classification.ClassificationFieldName))
                    {
                        string[] splitResult = classification.ClassificationFieldName.Split(new Char[] { ',', ';', '\t', '\n' }, StringSplitOptions.RemoveEmptyEntries);
                        for (int i=0; i<splitResult.Length; i++)
                        {
                            // found [<Classification Field Names>]
                            string classificationFieldName = splitResult[i].Trim();
                            CustomClassificationCodeNames.Add(classificationFieldName);
                            if (classificationHasName)
                                FieldNameToClassificationNames[classificationFieldName] = classification.ClassificationName;
                        }
                    }
                }
            }
        }