首页 > 编程语言 >c# aveva marine link folder

c# aveva marine link folder

时间:2023-06-11 21:11:55浏览次数:47  
标签:set Description get c# eleLinkDesc DbAttributeInstance folder marine public

public class LinkWorld
    {
        public static DbElement LinkWLD => Aveva.Pdms.Database.DbType.Design.FindElements(DbElementTypeInstance.LINKWLD).FirstOrDefault();
    }
    public class LinkDescription
    {
        public DbElement CurElement { get; set; }
        public string Description { get; set; }
        public string RefNo { get; set; }
        public DbElement LnkRef { get; set; }
        public DbElement[] LnkElements { get; set; }
        public string LnkUse { get; set; }
        public string Url { get; set; }
        public LinkDescriptorUsage LinkUsage { get; set; }
        public bool LnkRefMissOut => this.LnkRef == DbElement.GetElement();
        public LinkDescription(DbElement eleLinkDesc)
        {
            this.CurElement = eleLinkDesc;
            this.RefNo = eleLinkDesc.GetAsString(DbAttributeInstance.REF);
            this.Description = eleLinkDesc.GetAsString(DbAttributeInstance.DESC);
            this.LnkRef = eleLinkDesc.GetElement(DbAttributeInstance.LNKREF);
            this.LnkElements = eleLinkDesc.GetElementArray(DbAttributeInstance.LNKELE);
            this.Url = eleLinkDesc.GetAsString(DbAttributeInstance.URL);
            this.LnkUse = eleLinkDesc.GetAsString(DbAttributeInstance.LNKUSE);
            this.LinkUsage = this.LnkUse.GetEnum<LinkDescriptorUsage>();
        }
        public static List<LinkDescription> LinkDescriptions => LinkWorld.LinkWLD.FindElements(DbElementTypeInstance.LNDESC, c => c.Members().Any()).Select(c => new LinkDescription(c)).ToList();

        public static List<LinkDescription> LinkDesPlateGenFilesList => LinkWorld.LinkWLD.FindElements(DbElementTypeInstance.LNDESC, c => c.Members().Any()).Select(c => new LinkDescription(c)).Where(c => c.LinkUsage == LinkDescriptorUsage.UPMGEN).ToList();

        public static List<LinkDescription> LinkDesPlanePartGeneration => LinkWorld.LinkWLD.FindElements(DbElementTypeInstance.LNDESC, c => c.Members().Any()).Select(c => new LinkDescription(c)).Where(c => c.LinkUsage == LinkDescriptorUsage.DPPAN).ToList();

        public static List<LinkDescription> LinkDesProfileSketch => LinkWorld.LinkWLD.FindElements(DbElementTypeInstance.LNDESC, c => c.Members().Any()).Select(c => new LinkDescription(c)).Where(c => c.LinkUsage == LinkDescriptorUsage.DPROF).ToList();
    }

    public enum LinkDescriptorUsage
    {
        [Description("Profile nesting")]
        DPNEST = 0,
        [Description("Nested profile csv")]
        UNPRC = 1,
        [Description("Nested profile list")]
        UNPRL = 2,
        [Description("Weld report")]
        UWELDR = 3,
        [Description("Plate generic file")]
        UPMGEN = 4,
        [Description("Weight and centre of gravity sketch")]
        DWCOG = 5,
        [Description("Weight and centre of gravity csv")]
        UWCOG = 6,
        [Description("Parts list sketch - profiles")]
        DPRTPR = 7,
        [Description("Parts list sketch - plates")]
        DPRTPL = 8,
        [Description("Parts list - profiles")]
        UPRTPR = 9,
        [Description("Parts list - plates")]
        UPRTPL = 10,
        [Description("Mounting data profile")]
        UMNTPR = 11,
        [Description("Manstiff csv")]
        UMANSC = 12,
        [Description("Manstiff list")]
        UMANSL = 13,
        [Description("Profile sketch")]
        DPROF = 14,
        [Description("Profile generic file")]
        UPRGEN = 15,
        [Description("List of Split Plane Panel Parts")]
        UPPAN = 16,
        [Description("Plane panel parts generation")]
        DPPAN = 17
    }

 

标签:set,Description,get,c#,eleLinkDesc,DbAttributeInstance,folder,marine,public
From: https://www.cnblogs.com/NanShengBlogs/p/17473609.html

相关文章

  • opcenter camstar designer基础知识--Field
    Field界面为CDO中field的属性界面1. General常规 2. Options选项  3.AdvancedOptions高级选项  4.Expressions表达式  支持的表达式,仅CVE和DVE支持表达式;DV不支持。初始化对象时,系统会尝试从数据库中获取字段的值(如果存在)。注释:初始化时不计......
  • python编码decode和encode
                文章来源:https://www.cnblogs.com/skyflask/p/7622991.html ......
  • 【React工作记录九十九】ant design mobile实现tab滚动效果和闪屏小记
    前言大家好我是歌谣今天继续给大家带来前端工作中遇到的实际性问题如何实现一个tab效果以及闪屏问题效果演示(tab滚动效果)案例遇到问题先去查api查百度一开始我以为是安卓的功能直接api打开<DemoBlocktitle='超长自动滚动'padding='0'><TabsdefaultActiveKey=......
  • 文心一言 VS 讯飞星火 VS chatgpt (38)-- 算法导论5.4 2题
    二、假设我们将球投入到b个箱子里,直到某个箱子中有两个球。每一次投掷都是独立的并且每个球落入任何箱子的机会均等。请问投球次数期望是多少?文心一言:这是一个典型的鸽巢原理(PigeonholePrinciple)问题。假设每次投球时,每个箱子有1/b的概率被选中。我们设投球次数为x。我们首先考虑......
  • MS_SQL模糊查询like和charindex的对比
    like查询效率低下,网上搜了一下替代like查询的方法,都是说用charindex方法,自己对比了一下查询速度test1表中有一千两百多万条数据,我只给ID加了索引先看一下'%我%'这种模糊查询:declare@qdatetimeset@q=getdate()selectID,U_Name,U_Sex,U_Age,U_Addressfromtest1whereU_Na......
  • 文心一言 VS 讯飞星火 VS chatgpt (38)-- 算法导论5.4 2题
    二、假设我们将球投入到b个箱子里,直到某个箱子中有两个球。每一次投掷都是独立的并且每个球落入任何箱子的机会均等。请问投球次数期望是多少?文心一言:这是一个典型的鸽巢原理(PigeonholePrinciple)问题。假设每次投球时,每个箱子有1/b的概率被选中。我们设投球次数为x。我们首先......
  • 学习使用static的另一用法
    学习使用static的另一用法#include<stdio.h>intmain(){inti,num;num=2;for(i=0;i<3;i++){printf("num变量为%d\n",num);num++;{staticintnum=1;printf("内置模板num变量:%d\n&quo......
  • [GPT] 监测输入框被 js 设置了值 ?input 输入框被设置了 value 值,但是没有触发 change
    1.input输入框被设置了value值,但是没有触发change事件?如果输入框的value值是通过JavaScript代码直接设置的,那么不会触发change事件,这是正常的行为。change事件只会在用户手动更改输入框的值并使其失去焦点时触发。如果输入框的value值是通过用户交互(如键盘输入......
  • v831-openwrt-c开发
    准备:本次开发在linux环境下编译,使用gcc交叉编译,需要自己准备linux环境,并且建议不能太高,会有很多bug到sipeed的官网下载工具:libmaix工具链安装:工具链:具体工具链说明解压工具链后放到随便一个地方(记住路径)。参照快速安装脚本路径把arm-openwrt-gcc放到系统路径中(图中是我......
  • Windows驱动开发学习记录-ObjectType Hook之ObjectType结构相关分析
    1、目的  在一般情况下,对于系统的常规操作如创建进程、创建互斥体、创建文件等可以进行SSDTHook进行拦截,但在x64位系统下,有PG的保护,常规的SSDTHook会导致蓝屏。但基于ObjectType的一些Hook也可以做到相应的功能且不会导致系统BSOD。 2、相关结构分析2.1XP上的相关结构......