예제 #1
0
        /// <summary>
        /// Create a new (or update an existing) face family in the model
        /// </summary>
        /// <param name="name">The name of the family.
        /// May be modified with a numerical suffix if the name already exists in
        /// the model.</param>
        /// <param name="exInfo">Optional.  The execution information of the current action.
        /// If an object has been created previously with matching execution information then
        /// instead of creating a new item this previous one will be updated and returned instead.
        /// This enables this method to be used parametrically.</param>
        /// <returns>The created or updated </returns>
        public BuildUpFamily BuildUpFamily(string name, ExecutionInfo exInfo = null)
        {
            BuildUpFamily result = new BuildUpFamily();

            result      = Model.History.Update(exInfo, result);
            result.Name = Model.Families.NextAvailableName(name, result);
            Model.Add(result);
            return(result);
        }
예제 #2
0
        /// <summary>
        /// Create a new (or update an existing) face family in the model
        /// </summary>
        /// <param name="exInfo">Optional.  The execution information of the current action.
        /// If an object has been created previously with matching execution information then
        /// instead of creating a new item this previous one will be updated and returned instead.
        /// This enables this method to be used parametrically.</param>
        /// <returns></returns>
        public BuildUpFamily BuildUpFamily(ExecutionInfo exInfo = null)
        {
            BuildUpFamily result = new BuildUpFamily();

            result = Model.History.Update(exInfo, result);
            if (result.Name == null)
            {
                result.Name = Model.Families.NextAvailableName("Build-Up", result, true);
            }
            Model.Add(result);
            return(result);
        }