/// <summary>
        /// Creates property if it not exist
        /// </summary>
        /// <param name="project">EPLAN project</param>
        /// <param name="identName">Identifying name</param>
        /// <returns>PropertyValue</returns>
        public static bool CheckIfPropertyExists(Project project, string identName)
        {
            UserDefinedPropertyDefinition userDefProp = project.UserDefinedPropertyDefinitions
                                                        .FirstOrDefault(u => u.IdentifyingName.Equals(identName));

            return(userDefProp != null);
        }
        public static PropertyValue CreateProjectPropertyIfNotExist(Project project, string identName)
        {
            UserDefinedPropertyDefinition userDefProp = project.UserDefinedPropertyDefinitions
                                                        .FirstOrDefault(u => u.IdentifyingName.Equals(identName));

            if (userDefProp == null)
            {
                UserDefinedPropertyDefinition.Create(project, identName,
                                                     UserDefinedPropertyDefinition.Enums.ClientType.Project);
            }
            return(null);
        }
        /// <summary>
        /// Returns Project property value with the given name
        /// </summary>
        /// <param name="project">EPLAN project</param>
        /// <param name="identName">Identifing name</param>
        /// <returns>PropertyValue</returns>
        public static PropertyValue GetProjectPropertyValue(Project project, string identName)
        {
            UserDefinedPropertyDefinition userDefProp = project.UserDefinedPropertyDefinitions
                                                        .FirstOrDefault(u => u.IdentifyingName.Equals(identName));

            if (userDefProp != null)
            {
                AnyPropertyId anyPropertyId = userDefProp.Id;
                PropertyValue propertyValue = project.Properties[anyPropertyId];
                return(propertyValue);
            }
            return(null);
        }
        /// <summary>
        /// Returns the PropertyValue
        /// </summary>
        /// <param name="function">Function</param>
        /// <param name="identName">Identifing name</param>
        /// <returns>PropertyValue</returns>
        public static PropertyValue GetFunctionPropertyValue(Function function, string identName)
        {
            UserDefinedPropertyDefinition userDefProp = function.Properties.ExistingIds
                                                        .Select(anyPropertyId => anyPropertyId.Definition)
                                                        .OfType <UserDefinedPropertyDefinition>()
                                                        .FirstOrDefault(obj => obj.IdentifyingName.Equals(identName));

            if (userDefProp != null)
            {
                AnyPropertyId anyPropertyId = userDefProp.Id;
                PropertyValue propertyValue = function.Properties[anyPropertyId];
                return(propertyValue);
            }
            return(null);
        }