示例#1
0
        /// <summary>
        /// Create screw with hat and base
        /// </summary>
        /// <returns>true if operation successful; false in case of error</returns>
        private bool CreateScrew()
        {
            var screwManager = new ScrewManager(_kompasApp);

            screwManager.ScrewdriverType = ScrewdriverType;

            if (!screwManager.CreateDetail())
            {
                LastErrorCode = screwManager.LastErrorCode;
                return(false);
            }

            _kompasApp.ThreadStep = screwManager.ThreadStep;

            return(true);
        }
示例#2
0
        /// <summary>
        /// Create screw with hat and base
        /// </summary>
        /// <returns>true if operation successful; false in case of error</returns>
        private bool CreateScrew()
        {
            var screwManager = new ScrewManager(_kompasApp);

            if (screwManager.LastErrorCode != ErrorCodes.OK)
            {
                LastErrorCode = screwManager.LastErrorCode;
                return(false);
            }

            if (!screwManager.CreateDetail())
            {
                LastErrorCode = screwManager.LastErrorCode;
                return(false);
            }

            _kompasApp.ThreadStep = screwManager.ThreadStep;

            return(true);
        }