## 主要改进 - 实现 /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>
77 lines
9.0 KiB
HTML
77 lines
9.0 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>MDB Methods</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">MDB Methods</h1>
|
||
</div>
|
||
</div>
|
||
<div id="nstext">
|
||
<p>The methods of the <b>MDB</b> class are listed below. For a complete list of <b>MDB</b> class members, see the <a href="Aveva.Pdms.Database.MDBMembers.html">MDB Members</a> topic.</p>
|
||
<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.MDB.Claim.html">Claim</a></td><td width="50%"> Claim elements. If claim fails, the method will still claim what it can. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.Close.html">Close</a></td><td width="50%"> Close MDB. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.DefaultType.html">DefaultType</a></td><td width="50%"> Retrieve the default DB type. e.g. DESI, CATA etc </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.Drop.html">Drop</a></td><td width="50%"> Drop changes from extract. Drop is actually done on a DB by DB basis. If a drop of a DB fails no changes will be droped for that DB. If a Drop of one DB fails, the others will still be done. </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.MDB.ExtractClaim.html">ExtractClaim</a></td><td width="50%"> Extract Claim elements. If claim fails, the method will still claim what it can </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.ExtractRelease.html">ExtractRelease</a></td><td width="50%"> Extract Release elements. If release fails, the method will still release what it can. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.FindElements_overloads.html">FindElements</a></td><td width="50%">Overloaded. Return all elements where name matches given int key. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.Flush.html">Flush</a></td><td width="50%"> Flush changes from extract. Flush is actually done on a DB by DB basis. If a flush of a DB fails no changes will be flushed for that DB. If a flush of one DB fails, the others will still be done. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.GetDB.html">GetDB</a></td><td width="50%"> Find the DB of a given number. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.GetDBArray_overloads.html">GetDBArray</a></td><td width="50%">Overloaded. List of DBs in MDB of given type. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.GetFirstDB.html">GetFirstDB</a></td><td width="50%"> Get First DB of given type. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.GetFirstWorld.html">GetFirstWorld</a></td><td width="50%"> Get First world on given type. </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="Aveva.Pdms.Database.MDB.GetLastDB.html">GetLastDB</a></td><td width="50%"> Get Last DB of given type. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.GetNextDB_overloads.html">GetNextDB</a></td><td width="50%">Overloaded. Get Next DB of given type. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.GetPreviousDB_overloads.html">GetPreviousDB</a></td><td width="50%">Overloaded. Get Previous DB of given type. </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.MDB.GetWork_overloads.html">GetWork</a></td><td width="50%">Overloaded. GetWork for given DBs. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.Issue.html">Issue</a></td><td width="50%"> Issue changes from extract. Issue is actually done on a DB by DB basis. If an issue of a DB fails no changes will be issued for that DB. If an issue of one DB fails, the others will still be done. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.Open.html">Open</a></td><td width="50%"> Open MDB. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.QuitWork_overloads.html">QuitWork</a></td><td width="50%">Overloaded. QuitWork for given DBs </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.Refresh_overloads.html">Refresh</a></td><td width="50%">Overloaded. Refresh dbs. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.Release.html">Release</a></td><td width="50%"> Release elements. If release fails, the method will still release what it can. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.ReleaseAll.html">ReleaseAll</a></td><td width="50%"> Release All elements. If release fails, the method will still release what it can. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.RetrieveErrors.html">RetrieveErrors</a></td><td width="50%"> Retrieve errors after a failed operation. i.e. where the method returns false. </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.SaveWork_overloads.html">SaveWork</a></td><td width="50%">Overloaded. Savework on specific Dbs. If a save of one DB fails, the others will still be done. Returns false if one of DB fails, use RetrieveErrors() in this case. </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>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.UpdateClaimsToLatest.html">UpdateClaimsToLatest</a></td><td width="50%"> Ensure that we are using the latest version of the claimlist Only needed prior to single claim queries </td></tr>
|
||
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Aveva.Pdms.Database.MDB.WriteMode.html">WriteMode</a></td><td width="50%"> Get the write mode for DBs of given type. </td></tr></table>
|
||
</div>
|
||
<h4 class="dtH4">See Also</h4>
|
||
<p>
|
||
<a href="Aveva.Pdms.Database.MDB.html">MDB 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> |