TellmePdmsPluging/NetInterfaceReferenceFiles/Aveva.Pdms.Database/Aveva.Pdms.Database.DbAttributeMembers.html
root 3082148d7e 实现PDMS模型状态API并移除硬编码数据
## 主要改进
- 实现 /api/status/model 接口,返回真实PDMS模型状态信息
- 使用MDB.CurrentMDB、Project.CurrentProject等AVEVA API获取真实数据
- 移除硬编码的CurrentSession、PositionInfo、PdmsSpecific等复杂结构
- 简化数据模型,只保留核心的真实数据字段

## 技术实现
- 通过DbSession获取真实的用户名、会话开始时间和持续时间
- 通过WorldMembers()获取真实的模型元素统计
- 修复DateTime类型的null合并运算符编译错误
- 清理不使用的方法和类定义

## API返回数据
现在返回的数据主要包含真实的PDMS信息:
- ModelLoaded: MDB连接状态检查
- ProjectName: 真实的设计数据库名称
- MdsName: 真实的MDB名称
- UserName: 真实的数据库会话用户
- StartTime: 真实的会话创建时间
- TotalElements: 真实的模型元素数量统计

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 10:36:02 +08:00

92 lines
9.8 KiB
HTML
Raw Permalink Blame History

<html dir="LTR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
<title>DbAttribute Members</title>
<xml>
</xml>
<link rel="stylesheet" type="text/css" href="MSDN.css" />
</head>
<body id="bodyID" class="dtBODY">
<div id="nsbanner">
<div id="bannerrow1">
<table class="bannerparthead" cellspacing="0">
<tr id="hdr">
<td class="runninghead">AVEVA Database .NET Public Interface</td>
<td class="product">
</td>
</tr>
</table>
</div>
<div id="TitleRow">
<h1 class="dtH1">DbAttribute Members
</h1>
</div>
</div>
<div id="nstext">
<p>
<a href="Aveva.Pdms.Database.DbAttribute.html">DbAttribute overview</a>
</p>
<h4 class="dtH4">Public Static Methods</h4>
<div class="tablediv">
<table class="dtTABLE" cellspacing="0">
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="Aveva.Pdms.Database.DbAttribute.AttributeFieldType.html">AttributeFieldType</a></td><td width="50%"> The type of an attribute field </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="Aveva.Pdms.Database.DbAttribute.GetAllAttributes.html">GetAllAttributes</a></td><td width="50%"> List of all attributes </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="Aveva.Pdms.Database.DbAttribute.GetDbAttribute_overloads.html">GetDbAttribute</a></td><td width="50%">Overloaded. Create and return a new Attribute instance. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="Aveva.Pdms.Database.DbAttribute.HashValueToString.html">HashValueToString</a></td><td width="50%"> Convert a hash value to a string </td></tr></table>
</div>
<h4 class="dtH4">Public Static Operators</h4>
<div class="tablediv">
<table class="dtTABLE" cellspacing="0">
<tr VALIGN="top"><td width="50%"><img src="puboperator.gif"></img><img src="static.gif" /><a href="Aveva.Pdms.Database.DbAttribute.op_Equality.html">Equality Operator</a></td><td width="50%"> Test for equality between a pair of Attributes. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="puboperator.gif"></img><img src="static.gif" /><a href="Aveva.Pdms.Database.DbAttribute.op_Inequality.html">Inequality Operator</a></td><td width="50%"> Test for inequality between a pair of Attributes. </td></tr></table>
</div>
<h4 class="dtH4">Public Instance Properties</h4>
<div class="tablediv">
<table class="dtTABLE" cellspacing="0">
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.Category.html">Category</a></td><td width="50%"> Attribute category used for display </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.Description.html">Description</a></td><td width="50%"> Description of this Attribute </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.HashValue.html">HashValue</a></td><td width="50%"> Hash value for this Attribute </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.Hyperlink.html">Hyperlink</a></td><td width="50%"> True if attribute represents a hyperlink </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.IsArray.html">IsArray</a></td><td width="50%"> True, if this Attribute is an array </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.IsPseudo.html">IsPseudo</a></td><td width="50%"> True, if this Attribute is a pseudo-attribute </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.IsSynonym.html">IsSynonym</a></td><td width="50%"><EFBFBD></td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.IsUDA.html">IsUDA</a></td><td width="50%"> True, if this Attribute is a User-Defined Attribute </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.MaximumSize.html">MaximumSize</a></td><td width="50%"> Maximum size of this Attribute </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.Name.html">Name</a></td><td width="50%"> Name of this Attribute. This is always reinputable as valid syntax to PML </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.QueryText.html">QueryText</a></td><td width="50%"> Query text associated with this Attribute </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.ShortName.html">ShortName</a></td><td width="50%"> Short name for this Attribute </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.Type.html">Type</a></td><td width="50%"> Type of this Attribute </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.Units.html">Units</a></td><td width="50%"> Units of this Attribute </td></tr></table>
</div>
<h4 class="dtH4">Public Instance Methods</h4>
<div class="tablediv">
<table class="dtTABLE" cellspacing="0">
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.AllowedIntRanges.html">AllowedIntRanges</a></td><td width="50%"> Allowed range(s) for an integer UDA </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.AllowedRanges.html">AllowedRanges</a></td><td width="50%"> Allowed range(s) for a real UDA </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.AllowedValues.html">AllowedValues</a></td><td width="50%"> Allowed values for a text UDA </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.CompareTo.html">CompareTo</a></td><td width="50%"> Compare Attribute with generic object. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.Equals.html">Equals</a></td><td width="50%"> Test equality to Attribute. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.GetAsString_overloads.html">GetAsString</a></td><td width="50%">Overloaded. Get the value of any attribute field as a string; array valued fields will be returned as the elements concatenated together separated by commas </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.GetAsStringArray_overloads.html">GetAsStringArray</a></td><td width="50%">Overloaded. Get the value of any attribute field as an array of strings </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.GetBool.html">GetBool</a></td><td width="50%"> Get boolean value for the given Attribute field. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.GetHashCode.html">GetHashCode</a></td><td width="50%"> Return hash code for mapping Attributes, overriding Object.GetHashCode. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.GetInteger.html">GetInteger</a></td><td width="50%"> Get integer value for the given Attribute field. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.GetIntegerArray.html">GetIntegerArray</a></td><td width="50%"> Get integer array value for the given Attribute field. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.GetString.html">GetString</a></td><td width="50%"> Get text value from given field of Attribute. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassGetTypeTopic.htm">GetType</a> (inherited from <b>Object</b>)</td><td width="50%">
Gets the <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemTypeClassTopic.htm">Type</a> of the current instance.
</td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.NoClaim.html">NoClaim</a></td><td width="50%"> Query whether it is necessary to claim elements of the given type, in order to change this Attribute. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.PassObjectToCPP.html">PassObjectToCPP</a></td><td width="50%"> Pass object through to unmanaged C++. AVEVA USE ONLY. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbAttribute.ToString.html">ToString</a></td><td width="50%"> Gets the textual representation of this Attribute. </td></tr></table>
</div>
<h4 class="dtH4">See Also</h4>
<p>
<a href="Aveva.Pdms.Database.DbAttribute.html">DbAttribute Class</a> | <a href="Aveva.Pdms.Database.html">Aveva.Pdms.Database Namespace</a></p>
<hr />
<div id="footer">&copy;AVEVA Solutions Ltd 2007</div>
</div>
</body>
</html>