Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
Bentley 中国优先社区
  • Welcome to Bentley Communities
  • Bentley's Communities
  • Bentley 中国优先社区
  • Cancel
Bentley 中国优先社区
技术资料库 Substation Plugin创建数据库表支持项目备份与恢复操作
    • Sign In
    Bentley 中国优先社区 requires membership for participation - click to join
    • -Bentley 中文技术资料库
      • +AutoPIPE
      • +Bentley Civil
      • +Bentley Navigator
      • -Bentley Substation
        • +00-版本更新
        • +01-常见问题
        • +02-快速入门视频及文档
        • +03-安装、激活、升级、库配置及PW集成
        • +04-图形与用户界面
        • +05-工程与图纸管理
        • +06-模型及符号库管理
        • 07-主接线图设计
        • +08-三维设备及导体布置
        • +08-操作文档
        • +09-防雷设计
        • +10-接地设计
        • +11-二维图及报表模块
        • +12-工程交付与数据检测
        • 13-校验计算
        • -14-二次开发
          • Bentley Substation二次开发入门
          • Substation Plugin创建数据库表支持项目备份与恢复操作
        • +Bentley Substation 中国工具包
        • +Bentley Substation 自述文件
        • +Bentley Substation软件使用
        • Substation 报表中定义序号
      • +BRCM
      • +BridgeMasterModeler/OpenBridgeModeler
      • +i-model / DgnDb
      • +LumenRT/ContextCapture
      • +MicroStation
      • +MOSES
      • +OpenBuildings Designer
      • +OpenFlows
      • +OpenPlant
      • +OpenPlant Electrical CCK
      • Plaxis 地质分析
      • +ProjectWise
      • +ProStructures
      • +SACS
      • +STAAD.Pro
      • +SYNCHRO Pro
      • +其 它
      • +建筑设计之思考(赵大师专作)
      • +桥梁大师<BridgeMaster>
      • +现浇箱梁
      • +软件激活及授权
    • +iTwin 数字孪生平台
    • Bentley二次开发资料库
    • +常见问题汇总
    • Bentley-Learn 官方教学平台-使用方法
    • +中国优先社区使用指南
    • +Bentley学习资料库
    • +Bentley用户成功活动精选
    • +服务合作伙伴计划

     
     Questions about this article, topic, or product? Click here. 

    Substation Plugin创建数据库表支持项目备份与恢复操作

    Bentley Substation提供了强大的二次开发接口,用户开发的工具可以以Plugin的方式在Substation中加载和调用,方便用户开发定制自己的Substation工具,进行应用的扩展。

    在Plugin开发过程中,Plugin相关数据也可以创建新表,保存在Substation SQL Server数据库中。同时,只要用户根据Plugin所创建表的信息编辑Tables.xml文件,并将文件添加至Plugin程序路径,Substation在备份和恢复功能中就会自动处理Plugin所创建表的数据。

    具体示例如下:

    1. 假设Plugin需要在Substation SQL Server数据库中创建新表PluginData, 表中包含Project_id信息及一个Plugin数据列:

    其中Project_id数据即Substation数据库中Project表中的id项,另外列支持的数据类型包括:int,datetime,float,ntext,varchar,nvarchar

    2. 创建并编辑Tables.xml文件,包含Plugin相关数据库表及Project_id列的信息:

    <?xml version="1.0" encoding="utf-8" ?> 
        <Tables IsCreated="0">
             <Table Name="PluginData" IdentityKey="" ProjectColumn="Project_id">
         </Table>
    </Tables>

    3. 将Tables.xml文件包含至Plugin程序的文件夹下,如:C:\Program Files (x86)\Bentley\Substation V8i\Substation\Promise\plugins\<Plugin Folder>;

    4. 定于与测试项目相关的Plugin数据,运行项目备份与恢复功能,可以看到Substation会根据Tables.xml定义信息自动处理Plugin数据库表中的数据,其中,Project_id列会根据恢复项目的Project ID自动更新。

    • Bentley Substation
    • Share
    • History
    • More
    • Cancel
    • xuehui.gong Created by Bentley Colleague xuehui.gong
    • When: Wed, Apr 20 2016 2:41 AM
    • Revisions: 1
    • Comments: 0
    • Sign in to reply
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies