AVEVA .Net 1.Introduction

3 篇文章 1 订阅
2 篇文章 1 订阅
AVEVA .NET 定制化用户指南指导有C#开发经验的软件工程师如何为AVEVA Plant和AVEVA Marine产品开发.NET定制。通过.NET API,可以访问包括图形用户界面、数据库和几何在内的产品各个方面。.NET定制架构引入了两种新方法,一种是通过.NET Addin,另一种是使用PML.NET,两者都允许动态加载.NET程序集。
摘要由CSDN通过智能技术生成

1 Introduction 介绍

Michael Wang 翻译到1.1.2章节

The .NET Customisation User Guide gives software engineers with experience of software development in C# using Visual Studio guidance on the development of .NET customisation for the AVEVA Plant and AVEVA Marine products.

这个用户指南介绍了如何用C# 开发AVEVA Plant 和 AVEVA Marine 插件。

1.1 .NET Customisation Architecture 架构

The introduction of a customisation capability using Microsoft .NET technology has opened up a whole new world of customisation and is particularly relevant for the integration of AVEVA products with other customer systems. .NET API’s provided access to various aspects of the product including Graphical User Interface, Database and Geometry.

使用Microsoft .NET技术为AVEVA产品与其它系统的整合打开了一个全新的世界。

As part of AVEVA’s strategy of ‘continual progression’ the .NET customisation capability has been introduced in such a way that it can be used alongside the existing PML based customisation. Through the use of PML.NET, an enhancement to PML which allows the PML programmer to call .NET code, customisation which utilizes the strengths of .NET compiled code and PML can be achieved.

作为AVEVA “持续进步” 策略的一部分,.Net扩展与已有的PML开发并行的方式引入。通过 PML.Net,PML可以调用.Net扩展。
.NET customisation Architecture
The above diagram illustrates the two new methods of customisation using .NET technology. The first is via the concept of a .NET Addin and the second using PML.NET. Both methods provide a mechanism whereby a .NET assembly (dll) can be dynamically loaded into a module at runtime.

上图说明了是用 .Net技术的两种方法,第一种通过 .Net Addin插件方式,第二种通过 PML.NET,两种方法都使用了将.Net动态库 (dll) 动态加载到产品中的机制。

1.1.1 Common Application Framework Interfaces

The Common Application Framework (CAF) is an extensible framework which provides the .NET programmer with access to various services which support both application development and customisation. The foundations of the CAF are provided by the two interface assemblies:

通用应用程序框架 (CAF)是一个可扩展框架,通过它程序员可以获取各种支持开发和定制的服务,CAF的基础是提供两个接口动态库:

  • Aveva.ApplicationFramework.dll
  • Aveva.ApplicationFramework.Presentation.dll

These interfaces provide the following major services:

这些接口提供以下主要服务:

Namespace: Aveva.ApplicationFramework

  • AddinManager: This class provides properties and methods for the management of ApplicationFramework Addins.

  • 插件管理器:这个类提供属性和方法来管理应用程序框架插件。

  • ServiceManager: This class defines an interface which provides a means by which the various components of the ApplicationFramework can publish their services. The ServiceManager also acts as a service provider responding to requests for services. It can also be used by applications and application addins to publish additional services.

  • 服务管理器:这个类定义一个接口,应用程序框架中的各种组件可以通过它发布服务。这个服务管理器本身作为一个服务提供者,也可以响应服务的请求,它还可以被应用程序和应用程序插件用于发布额外的服务。

  • SettingsManager: This class provides properties and methods for the management of application settings which are stored in settings groups which are persisted between sessions.

  • 设置管理器:这个类提供属性和方法管理应用程序设置,这些设置保存在设置组中,用于在不同的任务中保持一致。

Namespace: Aveva.ApplicationFramework.Presentation

  • CommandBarManager: This provides access to the menus and commandbars of a CAF based application. It also has methods to load the definition of menus and commandbars from User Interface customisation (UIC) files.

  • 命令条管理器:提供使用基于应用程序框架程序的菜单和命令条,也提供方法加载用户接口定制(UIC)文件中定义的菜单和命令条。

  • CommandManager: This class defines an interface to provide the presentation framework client with a mechanism for the management of command objects which can be associated with Tools or other User interface objects. The action of invoking a tool (e.g clicking a ButtonTool) will cause the execution of the associated command object. It is possible to associated the same command object with a number of different user interface objects (e.g. ButtonTool on a Menu and a LinkLabel) thereby allowing for the centralisation of these user interface objects action within a command. Various state-like properties of a command (e.g. enabled/checked) would also be reflected in all user interface objects associated with a command. For example, disabling a command would cause all associated user interface objects to be disabled. User interface objects are associated with a command via a CommandExecutor derived class.

  • 命令管理器:这个类定义一个接口来提供一种机制管理命令对象可以关联到工具栏和其他用户界面对象,当激活一个工具(比如点击一个按钮)将执行相应的命令对象。一些不同的用户界面对象可以关联相同的命令对象,因此可以在命令中集中控制那些用户界面对象的功能,命令的这种状态属性(例如可用/选中)将可以影响关联这个命令的所有用户界面对象,例如,命令设置为不可用后将导致所有关联的用户界面对象不可用,用户界面对象通过CommandExecutor派生类关联命令。

  • ResourceManager: This class defines an interface to provide Addins with a simplified mechanism to access localizable resources.The ResourceManager provides a number of methods which allows an addin to then access the various types of resources (string, image, cursor, icon etc.) which resource files may contain.

  • 资源管理器:这个类定义一个接口给插件提供一种简单的机制来存取本地资源。资源管理器提供一些方法允许插件存取资源文件包含的各种形式的资源(字符串,图像,光标,图标等等)

  • WindowManager: This provides access to the main application window, the StatusBar and a collection of MDI and docked windows. It also provides the addin writer with methods to create MDI and docked windows to host user controls.

  • 窗口管理器:提供存取主程序窗口,状态栏,多文档界面集合和可停靠窗口,也给开发者提供方法生成多文档界面和可停靠窗口来包含控件。

1.1.2 Database Interfaces

The database related interfaces are provided by the interface assemblies:

数据库相关的接口由以下动态库提供:

• Aveva.Pdms.Database.dll & PDMSFilters.dll

This interface has the following main classes:

这个接口包含以下主要的类:

Namespace: Aveva.Pdms.Database

  • DatabaseService: The sole purpose of this class is to open a project.
    这个类的唯一用途是打开一个项目

  • DbAttribute: The class has two purposes:
    这个类有两个用途:

  1. Instances of the class are used to identify and pass around attributes
    类的实例用于识别和传出属性

  2. The methods allow the retrieval of metadata about an attribute. e.g. type, size, Name, pseudo or not, etc. The class is valid for system attributes and UDAs.
    提供方法允许检索一个属性的元数据,例如类型,范围,名称,是否是隐含属性等等,这个类对于系统属性和用户自定义属性也有效。

  • DB: This class provides information on the opened DBs.
    这个类提供打开数据库的信息

  • DbElement: Instances of DbElement are used to identify an element. This is the main class for reading and writing to the database. The methods cover
    DbElement的实例用于识别一个元素,这个是读写数据库的主要类,它的方法涵盖了

    • element creation 元素创建

    • element deletion 元素删除

    • copy 拷贝

    • getting/setting attributes and rules 设置和获取属性和规则

    • navigating the DB 数据库导航

    • evaluating database expressions. 数据库表达式求值

  • DbElementType: The class has two purposes:
    这个类有两个用途:

  1. Instances of the class are used to identify and pass around Element types
    类的实例用于识别和传出元素类型
  2. The methods allow the retrieval of metadata about an Element type. e.g. Name, description, allowed attributes and members etc. The class is valid for system types and UDETs.
    提供方法允许检索一个元素类型的元数据,例如名称,描述,有效的属性和成员等等,这个类对于系统类型和用户自定义类型也有效。
  • DbEvents: This class contains the mechanisms for subscribing to database events. It covers savework, getwork, undo, redo, flush, refresh, drop events plus capturing general database changes.
    这个类包含了订阅数据库事件的机制,涵盖了保存,获取,回退,重做,清空,刷新,放弃事件,还可以捕获一般的数据库变化
  • DbExpression: Class to hold a database expression. These are the same as PML1 expressions. Methods to evaluate expressions are on the DbElement class.
    这个类控制数据库表达式,也就是PML表达式,表达式求值的方法在DbElement类里面。
  • DbPseudoAttribute: This Class allows pseudo attribute code to be plugged in for UDAs.
    这个类允许隐含属性码插入到用户自定义属性中
  • DbRule: Class to hold a database rule
    用于控制数据库规则
  • DbUserChanges: This is passed through by the ‘database change’ event. It contains a list of database changes made since the last ‘database change’ event was raised. Changes may be queried down to the attribute level.
    与’database change’事件相关,包含自从上一个’database change’ 事件引发后的一系列的数据库变化,这种变化可以向下到属性级别
  • MDB: Methods to do operations on an MDB. e.g. savework, getwork.
    操作一个数据库组,例如保存,获取
  • Table: Various classes to access the internal Dabacon tables. E.g. the name table.
    存取内部数据库表的类,例如名称表
  • Project: The main method is to open the MDB.
    主要方法是打开一个数据库组
    As well as the class methods there is a lot of functionality that can be accessed via pseudo attributes. The relevant pseudo attributes are listed where relevant.
    除了使用类的方法,还有很多功能可以通过隐含属性获取,相关的隐含属性在相关内容中提及
回答: 在AVEVA中,Form(窗体)是用来定义用户界面的窗体,它有自己的成员和方法。窗体可以定义窗口的停靠位置、浮动方式以及窗体的标题等属性。窗体还可以包含控件,控件可以通过全局变量进行处理。在PDMS命令窗口中,可以使用show命令加载并显示窗体,loadform命令加载但不显示窗体。窗体还有一些内置方法,如show、hide和shown,可以用来控制窗体的显示与隐藏。除了窗体,AVEVA还提供了Form Gadgets(窗体控件),它可以定义窗体内的控件,比如文本框、按钮等。在定义窗体控件时,可以设置控件的位置和大小等属性。在使用AVEVA form之前,需要确保引用了AVEVA.ApplicationFramework命名空间,并且派生自IAddin接口。另外,如果在使用AVEVA form之前对AVEVA进行了修改,需要使用pml rehash all命令重新加载修改后的内容。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [PDMS.NET开发](https://blog.csdn.net/u011498594/article/details/101690303)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [AVEVA PDMS 二次开发之PML语言基础 21/10/21 01.0.02](https://blog.csdn.net/weixin_43400347/article/details/120846864)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [AVEVA MARINE 二次开发学习总结](https://blog.csdn.net/u014653497/article/details/24305357)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值