Beispiel #1
0
        /// <summary>
        /// Sets string attribute for the handle.
        /// </summary>
        /// <remarks>
        /// If value is null, the attribute will be unset.
        /// </remarks>
        /// <param name="handle">The handle.</param>
        /// <param name="name">The attribute name.</param>
        /// <param name="value">The value.</param>
        /// <exception cref="ArgumentException">If the name is null or empty.</exception>
        public static void SetAttribute(IFCAnyHandle handle, string name, string value)
        {
            if (String.IsNullOrEmpty(name))
            {
                throw new ArgumentException("The name is empty.", "name");
            }

            if (value != null)
            {
                handle.SetAttribute(name, IFCData.CreateString(value));
            }
        }