c# aveva marine link folder
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 }
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!