导入文档(新增模式)
<p>[TOC]</p>
<p><center><strong><em>说明:本模式仅文档不存在系统中,才会进入!</em></strong></center></p>
<h4>请求</h4>
<h5>请求命令 CadCommand</h5>
<ul>
<li><code>EditBomLibrary_New 53</code> 或 <code>ImportDocument 1</code></li>
<li>两个命令均能打开 Bom编辑窗口,仅命令的值不一样。</li>
</ul>
<h5>请求方式</h5>
<ul>
<li><code>IPCClient.Instance.SendMessage</code></li>
</ul>
<h5>请求参数说明</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必填</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">dataModel</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">standard_model</td>
<td>集成标准数据模型,详见[这里](<a href="https://www.showdoc.com.cn/kingdeeplm/11558477351049674">https://www.showdoc.com.cn/kingdeeplm/11558477351049674</a> "这里")</td>
</tr>
</tbody>
</table>
<p><strong>standard_model 参数</strong></p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必填</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">fileModels</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">array[fileModel]</td>
<td>标准文档对象模型集合,具体详见[这里](<a href="https://www.showdoc.com.cn/kingdeeplm/11558477351049674">https://www.showdoc.com.cn/kingdeeplm/11558477351049674</a> "这里")</td>
</tr>
<tr>
<td style="text-align: left;">propModels</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">array[property]</td>
<td>标准属性对象模型集合,具体详见[这里](<a href="https://www.showdoc.com.cn/kingdeeplm/11558477351049674">https://www.showdoc.com.cn/kingdeeplm/11558477351049674</a> "这里")</td>
</tr>
<tr>
<td style="text-align: left;">useRootPropId</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">string</td>
<td>根属性对象的propModelId</td>
</tr>
</tbody>
</table>
<h5>完整请求示例</h5>
<pre><code>{
&quot;abstractCadType&quot;: &quot;_3d&quot;,
&quot;cadCommand&quot;: 53,
&quot;cadType&quot;: &quot;solidworks&quot;,
&quot;dataModel&quot;: {
&quot;fileModels&quot;: [
{
&quot;activeConfigPropId&quot;: &quot;d1c01226-dfa9-4453-8dd0-1423d257814c&quot;,
&quot;cadId&quot;: &quot;4eabf7f1-f2b3-460f-834a-8d5da4e474b3&quot;,
&quot;child&quot;: [
],
&quot;createDate&quot;: &quot;2024-12-26 17:22:21&quot;,
&quot;directoryPath&quot;: &quot;D:\\Repos\\非标CAD指导\\Kingdee.PLM.CAD.CustomPlugin\\Kingdee.PLM.CAD.CustomPlugin.Demo\\bin\\Debug\\素材&quot;,
&quot;displayName&quot;: &quot;未录入系统的装配件.SLDASM&quot;,
&quot;drawingDocs&quot;: [
],
&quot;fileHash&quot;: &quot;74E0C73846D16A97D67267E5F06F392325AD9FD6C2C5CE957298B9D4883F541F&quot;,
&quot;fileLevel&quot;: 0,
&quot;fileName&quot;: &quot;未录入系统的装配件.SLDASM&quot;,
&quot;fileType&quot;: 2,
&quot;hasBeenRecord&quot;: false,
&quot;isRoot&quot;: true,
&quot;isStandarPart&quot;: false,
&quot;modifyDate&quot;: &quot;2024-12-26 19:52:34&quot;,
&quot;pdfDocs&quot;: [
],
&quot;size&quot;: 23818
}
],
&quot;propModels&quot;: [
{
&quot;cadId&quot;: &quot;4eabf7f1-f2b3-460f-834a-8d5da4e474b3&quot;,
&quot;child&quot;: [
],
&quot;propExpressionInfo&quot;: {
},
&quot;propInfo&quot;: {
&quot;COLOUR&quot;: &quot;&quot;,
&quot;DRAWNO&quot;: &quot;44444455&quot;,
&quot;MATERIAL&quot;: &quot;&quot;,
&quot;PARTNAME&quot;: &quot;Jair.Test.003&quot;,
&quot;PARTNO&quot;: &quot;Jair.Test.003&quot;,
&quot;SPEC&quot;: &quot;&quot;,
&quot;VERSION&quot;: &quot;A&quot;
},
&quot;propInfoType&quot;: &quot;默认&quot;,
&quot;propModelId&quot;: &quot;d1c01226-dfa9-4453-8dd0-1423d257814c&quot;,
&quot;propTypeInfo&quot;: {
}
}
],
&quot;useRootPropId&quot;: &quot;d1c01226-dfa9-4453-8dd0-1423d257814c&quot;
},
&quot;msgSendWay&quot;: 0
}</code></pre>
<h4>客户端回调</h4>
<p>具体看【[保存/暂存文档时,客户端通知新属性](<a href="https://www.showdoc.com.cn/kingdeeplm/11558482257839657">https://www.showdoc.com.cn/kingdeeplm/11558482257839657</a> "保存/暂存文档时,客户端通知新属性")】</p>