现在,我们再来添加一条规则。此规则会更新集成块的某些 iProperty。
对于标准零部件,我们可以在嵌入式电子表单中查找零件代号。然后,使用 model_code 单元中的值为零件设置零件代号特性。使用“代码段”区域的“iProperty”节点中提供的 iProperties.Value 函数。

If component_type = "standard" Then
i = GoExcel.FindRow("3rd Party:Embedding 1", "Sheet1", "port_size", "=", port_a_size)
iProperties.Value("Project", "Part Number") = GoExcel.CurrentRowValue("model_code")

Else
iProperties.Value("Project", "Part Number") = "HomeMade"
End If
规则已经完成。