## 主要改进 - 实现 /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>
83 lines
7.5 KiB
HTML
83 lines
7.5 KiB
HTML
<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>DbFieldFormat 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">DbFieldFormat Members
|
|
</h1>
|
|
</div>
|
|
</div>
|
|
<div id="nstext">
|
|
<p>
|
|
<a href="Aveva.Pdms.Database.DbFieldFormat.html">DbFieldFormat overview</a>
|
|
</p>
|
|
<h4 class="dtH4">Public Instance Constructors</h4>
|
|
<div class="tablediv">
|
|
<table class="dtTABLE" cellspacing="0">
|
|
<tr VALIGN="top">
|
|
<td width="50%">
|
|
<img src="pubmethod.gif" />
|
|
<a href="Aveva.Pdms.Database.DbFieldFormatConstructor.html">DbFieldFormat Constructor</a>
|
|
</td>
|
|
<td width="50%">Initializes a new instance of the <a href="Aveva.Pdms.Database.DbFieldFormat.html">DbFieldFormat</a> class.</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.DbFieldFormat.ArraySeparator.html">ArraySeparator</a></td><td width="50%"> String to use to separate individual array elements. Typically ', ' for a list </td></tr>
|
|
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbFieldFormat.DbRestriction.html">DbRestriction</a></td><td width="50%"> INTEGER database number to restrict elements to those from a certain database for certain special fields (e.g. owner and member types). 0 for no restriction. </td></tr>
|
|
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbFieldFormat.DefaultAction.html">DefaultAction</a></td><td width="50%"> Action to take if a value is found which does not match a specified mapping By default, this is GET_AS_STRING which will leave the value unchanged It may be set to FIXED_STRING so that any such (unmapped) string will be replaced by the DefaultString </td></tr>
|
|
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbFieldFormat.DefaultString.html">DefaultString</a></td><td width="50%"> String with which to replace any string for which no individual mapping has been defined (with AddMapping) Only used if the DefaultAction is FIXED_STRING </td></tr>
|
|
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbFieldFormat.ItemSeparator.html">ItemSeparator</a></td><td width="50%"> String to use to separate items within compound fields. Only used for special fields such as attributes and descriptions. Typically a tab or a colon </td></tr>
|
|
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbFieldFormat.NonEmptyPrefix.html">NonEmptyPrefix</a></td><td width="50%"> String to prepend to the result if and only if it is not the empty string </td></tr>
|
|
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbFieldFormat.NonEmptySuffix.html">NonEmptySuffix</a></td><td width="50%"> String to append to the result if and only if it is not the empty string </td></tr>
|
|
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbFieldFormat.RemoveDuplicates.html">RemoveDuplicates</a></td><td width="50%"> Whether or not duplicate array items are to be removed NB: Equality is checked AFTER any replacements and mappings </td></tr>
|
|
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbFieldFormat.SortValues.html">SortValues</a></td><td width="50%"> Whether or not array items are to be sorted into alphabetic order NB: Sorting is applied AFTER any replacements and mappings </td></tr>
|
|
<tr VALIGN="top"><td width="50%"><img src="pubproperty.gif"></img><a href="Aveva.Pdms.Database.DbFieldFormat.UndefinedString.html">UndefinedString</a></td><td width="50%"> String to substitute if no value is defined </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.DbFieldFormat.AddMapping.html">AddMapping</a></td><td width="50%"> Add a mapping; ie, a specification of a value which is to be replaced by another value </td></tr>
|
|
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbFieldFormat.AddReplace.html">AddReplace</a></td><td width="50%"> Add a replacement specification. Replacements are applied first, and will replace any and all occurences of the invalue in values returned with the rvalue </td></tr>
|
|
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassEqualsTopic.htm">Equals</a> (inherited from <b>Object</b>)</td><td width="50%">
|
|
Determines whether the specified <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">Object</a> is equal to the current <b>Object</b>.
|
|
</td></tr>
|
|
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.DbFieldFormat.Format_overloads.html">Format</a></td><td width="50%">Overloaded. Return the formatted value of a field for a given attribute </td></tr>
|
|
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassGetHashCodeTopic.htm">GetHashCode</a> (inherited from <b>Object</b>)</td><td width="50%">
|
|
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
|
|
</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="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassToStringTopic.htm">ToString</a> (inherited from <b>Object</b>)</td><td width="50%">
|
|
Returns a <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">String</a> that represents the current <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">Object</a>.
|
|
</td></tr></table>
|
|
</div>
|
|
<h4 class="dtH4">See Also</h4>
|
|
<p>
|
|
<a href="Aveva.Pdms.Database.DbFieldFormat.html">DbFieldFormat Class</a> | <a href="Aveva.Pdms.Database.html">Aveva.Pdms.Database Namespace</a></p>
|
|
|
|
<hr />
|
|
<div id="footer">©AVEVA Solutions Ltd 2007</div>
|
|
</div>
|
|
</body>
|
|
</html> |