private static double GetProfileParameter(string aProfileName, int aNo)
        {
            CatalogHandler catalogHandler = new CatalogHandler();
            double         result         = -1.0;

            if (catalogHandler.GetConnectionStatus())
            {
                try
                {
                    LibraryProfileItem libraryProfile = new LibraryProfileItem();
                    libraryProfile.Select(aProfileName);
                    ArrayList            Parameters = libraryProfile.aProfileItemParameters;
                    ProfileItemParameter parameter  = (ProfileItemParameter)Parameters[aNo];
                    result = parameter.Value;
                }
                catch
                {
                    try
                    {
                        ParametricProfileItem parametricProfile = new ParametricProfileItem();
                        parametricProfile.Select(aProfileName);
                        ArrayList            Parameters = parametricProfile.aProfileItemParameters;
                        ProfileItemParameter parameter  = (ProfileItemParameter)Parameters[aNo];
                        result = parameter.Value;
                    }
                    catch { }
                }
            }
            return(result);
        }
 public static dynamic GetTSObject(ParametricProfileItem dynObject)
 {
     if (dynObject is null)
     {
         return(null);
     }
     return(dynObject.teklaObject);
 }
        private void CreateTaperedBeam(TSG.Point Point1, TSG.Point Point2)
        {
            ProfileItem item = null;

            ParametricProfileItem parametricItem = new ParametricProfileItem();

            if (parametricItem.Select(this.profile) && parametricItem.ProfileItemType == ProfileItem.ProfileItemTypeEnum.PROFILE_I)
            {
                item = parametricItem;
            }

            if (item == null)
            {
                LibraryProfileItem libraryItem = new LibraryProfileItem();
                if (libraryItem.Select(this.profile) && libraryItem.ProfileItemType == ProfileItem.ProfileItemTypeEnum.PROFILE_I)
                {
                    item = libraryItem;
                }
            }

            if (item != null)
            {
                foreach (ProfileItemParameter p in item.aProfileItemParameters)
                {
                    if (p.Symbol == "h")
                    {
                        this.webHeight = p.Value;
                    }
                    if (p.Symbol == "s")
                    {
                        this.webThickness = p.Value;
                    }
                    if (p.Symbol == "b")
                    {
                        this.flangeWidth = p.Value;
                    }
                    if (p.Symbol == "t")
                    {
                        this.flangeThickness = p.Value;
                    }
                }

                this.CreateTopFlangePlate(new TSG.Point(Point1), new TSG.Point(Point2));
                this.CreateBottomFlangePlate(new TSG.Point(Point1), new TSG.Point(Point2));
                this.CreateWebPlate(new TSG.Point(Point1), new TSG.Point(Point2));
            }
        }