什么是Add-Ons

和Add-ins有什么区别

附加组件是功能或数据包,它们为EPLAN产品变体增加了额外的功能或提供了额外的数据。这些附加组件可以是EPLAN提供的,也可以是用户创建的。在许多情况下,EPLAN附加组件的功能包也可以作为独立的独立版本提供。例如,EPLAN Fluid既可以作为独立版本使用,也可以作为EPLAN Electric P8 Professional的附加组件购买。

Add-ons = Add-ins + 设置 + 图片 + 脚本 + XML + …

一系列内容组成的扩展包。而Add-in只是指由dll组成的插件程序。

文件夹结构

每个附加组件都有相同的文件夹结构。当文件夹名称是可选并且可以由附加组件开发者更改时,这些名称会用 <> 标记。

注意: 这个附加组件文件夹可以存在于磁盘上的任何位置!

一个附加组件总是由相同的文件夹结构组成,基本上看起来是这样的:

<Add-on>
          <Add-on version>

                        BIN         这里安装了附加组件的所有二进制文件。

                        CFG         这里安装了所有的XML文件和 install.xml 文件。install.xml 文件是基础数据。
                                        文件夹的名称在 install.xml 中列出,用于将数据复制到EPLAN基础数据中。

          <Images>

          <Scripts>

          <XML>

          <…>

文件

最重要的文件是 install.xml。它包含了关于附加组件和EPLAN版本的所有信息。

本段展示了一个由 EplAddonUtility.exe 创建的 install.xml 文件示例。

提示: 有关如何使用 EplAddonUtility.exe 创建附加组件及应遵循的条款和条件的更多信息,请参阅 "EplAddonUtility" 文档。

<Settings format="2">
  <CAT name="INSTALL">
    <MOD name="AF">
<!—The application modifier is the unique identifier for this add-on. Either spaces or dots are allowed. Otherwise, the registration is not possible then. -->
      <Setting name="ApplicationModifier" type="string" info="Name modification for specific application configuration">
        <Val>MyAddon</Val>
      </Setting>
    </MOD>
  </CAT>
  <CAT name="STATION">
    <MOD name="SYSTEM">
      <LEV1 name="MyAddon">
<!—This is the path to the xml file. This setting is patched by the installer -->
        <Setting name="XMLPath" type="string" info="patched path to install.xml">
          <Val>C:\\Users\\ Username \\Desktop\\MyAddon\\CFG\\</Val>
        </Setting>
<!—This is the version of the add-on this setting is patched by the installer. -->
        <Setting name="Version" type="string" info="version nr of this addon">
          <Val>1.0.0</Val>
        </Setting>
<!—This node describe the main versions, this add-on belongsto.. -->
        <LEV2 name="MainVersion">
          <LEV3 name="Basic">
<!—This setting is the license identifier for the main version. All these licences MUST be available, only then this add-on will be registered -->
            <Setting name="Licences" type="string" info="Licence of Main Product to identify it">
              <Val>700</Val>
            </Setting>
<!—This setting is the version identifier for the main version. By multiple versions, ONE of this licenc-es MUST be identical to the main version number, then this add-on is registered. -->
            <Setting name="Versions" type="string" info="Version of Main Product to identify it">
              <Val>2.9.0</Val>
            </Setting>
          </LEV3>
          <LEV3 name="FLUID">
            <Setting name="Licences" type="string" info="Licence of Main Product to identify it">
              <Val>703</Val>
            </Setting>
            <Setting name="Versions" type="string" info="Version of Main Product to identify it">
              <Val>2.9.0</Val>
            </Setting>
          </LEV3>
          <LEV3 name="VIEWER">
            <Setting name="Licences" type="string" info="Licence of Main Product to identify it">
              <Val>701</Val>
            </Setting>
            <Setting name="Versions" type="string" info="Version of Main Product to identify it">
              <Val>2.9.0</Val>
            </Setting>
          </LEV3>
          <LEV3 name="EDUCATION">
            <Setting name="Licences" type="string" info="Licence of Main Product to identify it">
              <Val>790</Val>
            </Setting>
            <Setting name="Versions" type="string" info="Version of Main Product to identify it">
              <Val>2.9.0</Val>
            </Setting>
          </LEV3>
          <LEV3 name="CPM">
            <Setting name="Licences" type="string" info="Licence of Main Product to identify it">
              <Val>786</Val>
            </Setting>
            <Setting name="Versions" type="string" info="Version of Main Product to identify it">
              <Val>2.9.0</Val>
            </Setting>
          </LEV3>
          <LEV3 name="TRIAL">
            <Setting name="Licences" type="string" info="Licence of Main Product to identify it">
              <Val>702</Val>
            </Setting>
            <Setting name="Versions" type="string" info="Version of Main Product to identify it">
              <Val>2.9.0</Val>
            </Setting>
          </LEV3>
          <LEV3 name="Preplanning">
            <Setting name="Licences" type="string" info="Licence of Main Product to identify it">
              <Val>1132</Val>
            </Setting>
            <Setting name="Versions" type="string" info="Version of Main Product to identify it">
              <Val>2.9.0</Val>
            </Setting>
          </LEV3>
          <LEV3 name="FluidHoseConfigurator">
            <Setting name="Licences" type="string" info="Licence of Main Product to identify it">
              <Val>1192</Val>
            </Setting>
            <Setting name="Versions" type="string" info="Version of Main Product to identify it">
              <Val>2.9.0</Val>
            </Setting>
          </LEV3>
          <LEV3 name="ProPanel">
            <Setting name="Licences" type="string" info="Licence of Main Product to identify it">
              <Val>565</Val>
            </Setting>
            <Setting name="Versions" type="string" info="Version of Main Product to identify it">
              <Val>2.9.0</Val>
            </Setting>
          </LEV3>
        </LEV2>
      </LEV1>
<!—Now the base data the add-on has will be copied to the EPLAN base data. Define as many pathes as possible. -->
      <LEV1 name="Basedata">
        <LEV2 name="MyAddon">
<!—Copy all files behind this setting pathes to pathes for master data… -->
          <Setting name="CopyTo" type="string" info="copy-to pathes for masterData">
            <Val>USER.TrDMProject.Masterdata.Pathnames..Projects</Val>
            <Val>USER.TrDMProject.Masterdata.Pathnames..Templates</Val>
            <Val>USER.TrDMProject.Masterdata.Pathnames..Symbols</Val>
            <Val>USER.TrDMProject.Masterdata.Pathnames..Forms</Val>
            <Val>USER.TrDMProject.Masterdata.Pathnames..Frames</Val>
            <Val>USER.TrDMProject.Masterdata.Pathnames..FctDefs</Val>
            <Val>USER.TrDMProject.Masterdata.Pathnames..Revisions</Val>
            <Val>USER.TrDMProject.Masterdata.Pathnames..Images</Val>
            <Val>USER.TrDMProject.Masterdata.Pathnames..DXFDWG</Val>
            <Val>USER.TrDMProject.Masterdata.Pathnames..MechanicalModels</Val>
            <Val>USER.SYSTEM.Pathnames..ExternalDocuments</Val>
            <Val>USER.SYSTEM.Pathnames..Scheme</Val>
          </Setting>
        </LEV2>
<!—…from pathes for master data. The count of the settings of “CopyTo” and “CopyFrom” has to be identical. -->
        <Setting name="CopyFrom" type="string" info="copy-from pathes for masterData">
          <Val>USER.TrDMProject.Masterdata.Pathnames.MyAddon.Projects</Val>
          <Val>USER.TrDMProject.Masterdata.Pathnames.MyAddon.Templates</Val>
          <Val>USER.TrDMProject.Masterdata.Pathnames.MyAddon.Symbols</Val>
          <Val>USER.TrDMProject.Masterdata.Pathnames.MyAddon.Forms</Val>
          <Val>USER.TrDMProject.Masterdata.Pathnames.MyAddon.Frames</Val>
          <Val>USER.TrDMProject.Masterdata.Pathnames.MyAddon.FctDefs</Val>
          <Val>USER.TrDMProject.Masterdata.Pathnames.MyAddon.Macros</Val>
          <Val>USER.TrDMProject.Masterdata.Pathnames.MyAddon.Images</Val>
          <Val>USER.TrDMProject.Masterdata.Pathnames.MyAddon.DXFDWG</Val>
          <Val>USER.TrDMProject.Masterdata.Pathnames.MyAddon.MechanicalModels</Val>
          <Val>USER.SYSTEM.Pathnames.MyAddon.ExternalDocuments</Val>
          <Val>USER.SYSTEM.Pathnames.MyAddon.Scheme</Val>
        </Setting>
      </LEV1>
    </MOD>
  </CAT>
  <CAT name="USER">
    <MOD name="TrDMProject">
      <LEV1 name="Masterdata">
        <LEV2 name="Pathnames">
          <LEV3 name="MyAddon">
            <Setting name="Projects" type="string" info="file path to masterData">
              <Val>C:\\Users\\ Username \\Desktop\\MyAddon\\CFG\\MyAddon\\Projects</Val>
            </Setting>
            <Setting name="Templates" type="string" info="file path to masterData">
              <Val>C:\\Users\\ Username \\Desktop\\MyAddon\\CFG\\MyAddon\\Templates</Val>
            </Setting>
            <Setting name="Symbols" type="string" info="file path to masterData">
              <Val>C:\\Users\\ Username \\Desktop\\MyAddon\\CFG\\MyAddon\\Symbols</Val>
            </Setting>
            <Setting name="Forms" type="string" info="file path to masterData">
              <Val>C:\\Users\\ Username \\Desktop\\MyAddon\\CFG\\MyAddon\\Forms</Val>
            </Setting>
            <Setting name="Frames" type="string" info="file path to masterData">
              <Val>C:\\Users\\ Username \\Desktop\\MyAddon\\CFG\\MyAddon\\PlotFrames</Val>
            </Setting>
            <Setting name="FctDefs" type="string" info="file path to masterData">
              <Val>C:\\Users\\ Username \\Desktop\\MyAddon\\CFG\\MyAddon\\FunctionDefinition</Val>
            </Setting>
            <Setting name="Macros" type="string" info="file path to masterData">
              <Val>C:\\Users\\ Username \\Desktop\\MyAddon\\CFG\\MyAddon\\Macros</Val>
            </Setting>
            <Setting name="Images" type="string" info="file path to masterData">
              <Val>C:\\Users\\ Username \\Desktop\\MyAddon\\CFG\\MyAddon\\Images</Val>
            </Setting>
            <Setting name="DXFDWG" type="string" info="file path to masterData">
              <Val>C:\\Users\\ Username \\Desktop\\MyAddon\\CFG\\MyAddon\\DXF_DWG</Val>
            </Setting>
            <Setting name="MechanicalModels" type="string" info="file path to masterData">
              <Val>C:\\Users\\ Username \\Desktop\\MyAddon\\CFG\\MyAddon\\Mechanical models</Val>
            </Setting>
            <Setting name="Scripts" type="string" info="file path to masterData">
              <Val>C:\\Users\\ Username \\Desktop\\MyAddon\\CFG\\MyAddon\\Documents</Val>
            </Setting>
            <Setting name="Scheme" type="string" info="file path to masterData">
              <Val>C:\\Users\\Username\\Desktop\\MyAddon\\CFG\\MyAddon\\Schemes</Val>
            </Setting>
          </LEV3>
        </LEV2>
      </LEV1>
    </MOD>
    <MOD name="System">
      <LEV1 name="Pathnames">
        <LEV2 name="MyAddon" />
      </LEV1>
    </MOD>
  </CAT>
</Settings>

设置信息

ApplicationModifier: 附加组件的标识符。必须是一个没有空格和点的唯一名称。