当前位置: 首页>>代码示例>>C#>>正文


C# Model.GetModelObjectSelector方法代码示例

本文整理汇总了C#中System.ComponentModel.Model.GetModelObjectSelector方法的典型用法代码示例。如果您正苦于以下问题:C# Model.GetModelObjectSelector方法的具体用法?C# Model.GetModelObjectSelector怎么用?C# Model.GetModelObjectSelector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.ComponentModel.Model的用法示例。


在下文中一共展示了Model.GetModelObjectSelector方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetProperties

        public void GetProperties()
        {
            Model model = new Model();
            ModelObjectEnumerator modelobjenum = model.GetModelObjectSelector().GetSelectedObjects();
            if (modelobjenum.GetSize() == 1)
            {
                while (modelobjenum.MoveNext())
                {
                    if (modelobjenum.Current is Tekla.Structures.Model.BaseWeld)
                    {
                        BaseWeld weld = (BaseWeld)modelobjenum.Current;

                        refText = weld.ReferenceText;
                        if (weld.AroundWeld) around = Bool.True; else around = Bool.False;

                        sizeAbove = weld.SizeAbove.ToString();

                        if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_NONE) weldTypeAbove = WeldType.WELD_TYPE_NONE;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_FILLET) weldTypeAbove = WeldType.WELD_TYPE_FILLET;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_BEVEL_GROOVE_SINGLE_V_BUTT) weldTypeAbove = WeldType.WELD_TYPE_BEVEL_GROOVE_SINGLE_V_BUTT;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_BEVEL_GROOVE_SINGLE_BEVEL_BUTT) weldTypeAbove = WeldType.WELD_TYPE_BEVEL_GROOVE_SINGLE_BEVEL_BUTT;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_SQUARE_GROOVE_SQUARE_BUTT) weldTypeAbove = WeldType.WELD_TYPE_SQUARE_GROOVE_SQUARE_BUTT;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_SINGLE_V_BUTT_WITH_BROAD_ROOT_FACE) weldTypeAbove = WeldType.WELD_TYPE_SINGLE_V_BUTT_WITH_BROAD_ROOT_FACE;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_SINGLE_BEVEL_BUTT_WITH_BROAD_ROOT_FACE) weldTypeAbove = WeldType.WELD_TYPE_SINGLE_BEVEL_BUTT_WITH_BROAD_ROOT_FACE;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_U_GROOVE_SINGLE_U_BUTT) weldTypeAbove = WeldType.WELD_TYPE_U_GROOVE_SINGLE_U_BUTT;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_J_GROOVE_J_BUTT) weldTypeAbove = WeldType.WELD_TYPE_J_GROOVE_J_BUTT;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_FLARE_V_GROOVE) weldTypeAbove = WeldType.WELD_TYPE_FLARE_V_GROOVE;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_FLARE_BEVEL_GROOVE) weldTypeAbove = WeldType.WELD_TYPE_FLARE_BEVEL_GROOVE;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_EDGE_FLANGE) weldTypeAbove = WeldType.WELD_TYPE_EDGE_FLANGE;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_CORNER_FLANGE) weldTypeAbove = WeldType.WELD_TYPE_CORNER_FLANGE;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_PLUG) weldTypeAbove = WeldType.WELD_TYPE_PLUG;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_BEVEL_BACKING) weldTypeAbove = WeldType.WELD_TYPE_BEVEL_BACKING;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_SPOT) weldTypeAbove = WeldType.WELD_TYPE_SPOT;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_SEAM) weldTypeAbove = WeldType.WELD_TYPE_SEAM;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_SLOT) weldTypeAbove = WeldType.WELD_TYPE_SLOT;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_PARTIAL_PENETRATION_SINGLE_BEVEL_BUTT_PLUS_FILLET) weldTypeAbove = WeldType.WELD_TYPE_PARTIAL_PENETRATION_SINGLE_BEVEL_BUTT_PLUS_FILLET;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_PARTIAL_PENETRATION_SQUARE_GROOVE_PLUS_FILLET) weldTypeAbove = WeldType.WELD_TYPE_PARTIAL_PENETRATION_SQUARE_GROOVE_PLUS_FILLET;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_MELT_THROUGH) weldTypeAbove = WeldType.WELD_TYPE_MELT_THROUGH;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.STEEP_FLANKED_BEVEL_GROOVE_SINGLE_V_BUTT) weldTypeAbove = WeldType.STEEP_FLANKED_BEVEL_GROOVE_SINGLE_V_BUTT;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.STEEP_FLANKED_BEVEL_GROOVE_SINGLE_BEVEL_BUTT) weldTypeAbove = WeldType.STEEP_FLANKED_BEVEL_GROOVE_SINGLE_BEVEL_BUTT;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_EDGE) weldTypeAbove = WeldType.WELD_TYPE_EDGE;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_ISO_SURFACING) weldTypeAbove = WeldType.WELD_TYPE_ISO_SURFACING;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_FOLD) weldTypeAbove = WeldType.WELD_TYPE_FOLD;
                        else if (weld.TypeAbove == BaseWeld.WeldTypeEnum.WELD_TYPE_INCLINED) weldTypeAbove = WeldType.WELD_TYPE_INCLINED;
                        else Console.WriteLine(weld.TypeAbove);

                        if (weld.ContourAbove == BaseWeld.WeldContourEnum.WELD_CONTOUR_NONE) contourTypeAbove = ContourType.None;
                        else if (weld.ContourAbove == BaseWeld.WeldContourEnum.WELD_CONTOUR_FLUSH) contourTypeAbove = ContourType.Flush;

                        sizeBelow = weld.SizeBelow.ToString();

                        if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_NONE) weldTypeBelow = WeldType.WELD_TYPE_NONE;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_FILLET) weldTypeBelow = WeldType.WELD_TYPE_FILLET;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_BEVEL_GROOVE_SINGLE_V_BUTT) weldTypeBelow = WeldType.WELD_TYPE_BEVEL_GROOVE_SINGLE_V_BUTT;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_BEVEL_GROOVE_SINGLE_BEVEL_BUTT) weldTypeBelow = WeldType.WELD_TYPE_BEVEL_GROOVE_SINGLE_BEVEL_BUTT;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_SQUARE_GROOVE_SQUARE_BUTT) weldTypeBelow = WeldType.WELD_TYPE_SQUARE_GROOVE_SQUARE_BUTT;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_SINGLE_V_BUTT_WITH_BROAD_ROOT_FACE) weldTypeBelow = WeldType.WELD_TYPE_SINGLE_V_BUTT_WITH_BROAD_ROOT_FACE;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_SINGLE_BEVEL_BUTT_WITH_BROAD_ROOT_FACE) weldTypeBelow = WeldType.WELD_TYPE_SINGLE_BEVEL_BUTT_WITH_BROAD_ROOT_FACE;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_U_GROOVE_SINGLE_U_BUTT) weldTypeBelow = WeldType.WELD_TYPE_U_GROOVE_SINGLE_U_BUTT;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_J_GROOVE_J_BUTT) weldTypeBelow = WeldType.WELD_TYPE_J_GROOVE_J_BUTT;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_FLARE_V_GROOVE) weldTypeBelow = WeldType.WELD_TYPE_FLARE_V_GROOVE;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_FLARE_BEVEL_GROOVE) weldTypeBelow = WeldType.WELD_TYPE_FLARE_BEVEL_GROOVE;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_EDGE_FLANGE) weldTypeBelow = WeldType.WELD_TYPE_EDGE_FLANGE;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_CORNER_FLANGE) weldTypeBelow = WeldType.WELD_TYPE_CORNER_FLANGE;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_PLUG) weldTypeBelow = WeldType.WELD_TYPE_PLUG;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_BEVEL_BACKING) weldTypeBelow = WeldType.WELD_TYPE_BEVEL_BACKING;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_SPOT) weldTypeBelow = WeldType.WELD_TYPE_SPOT;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_SEAM) weldTypeBelow = WeldType.WELD_TYPE_SEAM;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_SLOT) weldTypeBelow = WeldType.WELD_TYPE_SLOT;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_PARTIAL_PENETRATION_SINGLE_BEVEL_BUTT_PLUS_FILLET) weldTypeBelow = WeldType.WELD_TYPE_PARTIAL_PENETRATION_SINGLE_BEVEL_BUTT_PLUS_FILLET;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_PARTIAL_PENETRATION_SQUARE_GROOVE_PLUS_FILLET) weldTypeBelow = WeldType.WELD_TYPE_PARTIAL_PENETRATION_SQUARE_GROOVE_PLUS_FILLET;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_MELT_THROUGH) weldTypeBelow = WeldType.WELD_TYPE_MELT_THROUGH;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.STEEP_FLANKED_BEVEL_GROOVE_SINGLE_V_BUTT) weldTypeBelow = WeldType.STEEP_FLANKED_BEVEL_GROOVE_SINGLE_V_BUTT;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.STEEP_FLANKED_BEVEL_GROOVE_SINGLE_BEVEL_BUTT) weldTypeBelow = WeldType.STEEP_FLANKED_BEVEL_GROOVE_SINGLE_BEVEL_BUTT;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_EDGE) weldTypeBelow = WeldType.WELD_TYPE_EDGE;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_ISO_SURFACING) weldTypeBelow = WeldType.WELD_TYPE_ISO_SURFACING;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_FOLD) weldTypeBelow = WeldType.WELD_TYPE_FOLD;
                        else if (weld.TypeBelow == BaseWeld.WeldTypeEnum.WELD_TYPE_INCLINED) weldTypeBelow = WeldType.WELD_TYPE_INCLINED;
                        else Console.WriteLine(weld.TypeBelow);

                        if (weld.ContourBelow == BaseWeld.WeldContourEnum.WELD_CONTOUR_NONE) contourTypeBelow = ContourType.None;
                        else if (weld.ContourBelow == BaseWeld.WeldContourEnum.WELD_CONTOUR_FLUSH) contourTypeBelow = ContourType.Flush;
                    }
                }
            }
            else
            {
                sizeAbove = "";
                weldTypeAbove = new WeldType();
                contourTypeAbove = new ContourType();
                sizeBelow = "";
                weldTypeBelow = new WeldType();
                contourTypeBelow = new ContourType();
                refText = "";
                around = new Bool();
            }
        }
开发者ID:jonselfphoto,项目名称:Tekla-Properties,代码行数:97,代码来源:ModelWeld.cs


注:本文中的System.ComponentModel.Model.GetModelObjectSelector方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。