c# - 如何使用 C# 从 AVEVA E3D 获取报告
问题描述
有谁知道如何使用 C# 从 AVEVA E3D 中提取报告?例如,如何使用C#获取管道名称、设备名称。
除了 .NET 定制指南之外,是否有任何文档可以阅读有关 AVEVA E3D 和 C# 的信息?
解决方案
将其写入 .txt 文件:
-- this is a comment
-- Change the path directory, this is your output
!path=|C:\Users\XXX\Desktop\extract.csv|
-- Here you can choose between a lot of type element, like pipe or equi for the sample
-- var !c is a declaration of variable, collect is a collection of type, all equi means every equipment of my MDB (multi database).
var !c collect all equi
-- The first line of my array contains Name, you can delete this if you don't need
!tab = array()
!tab.append('Name')
-- For each values of my array !c which contains all equipment, I do this action
Do !x values !c
-- You can select your attribute, here I choose the name
!name = !x.dbref().name
-- I put the result of the name into my array
!tab.append(!name)
Enddo
!file = object file(!path)
-- I create a object file with the name of my output file, then I choose the Append option and put my array on the output file.
!file.writefile('Append', !tab)
将其保存到 .txt 文件后,必须将其调用到 E3D 中,打开 E3D,打开命令窗口并写入:“$m C:\Users\XXX\Desktop\YourMacroName.txt”
$m 调用宏,语法为$m PathName\FileName 可以写成.txt 格式的宏,或者像每个AVEVA 宏一样,可以选择.pmlmac 格式(pml 宏)。格式无关紧要,它只是识别 AVEVA 宏的简单方法。
推荐阅读
- rest - 在 Restful API 设计中应该返回空列表 [] 200/204 还是 404?
- android - 如何使用“sed”或其他 linux 终端实用程序解析其他两个之间的字符串片段?
- ansible - yum 模块不与 telnet 通话
- java - 创建一个 URI 模式匹配器以允许/禁止解码 JWT
- python - 将字符串转换为日期时间年份会将年份转换为毫秒位置
- java - Keycloak 管理客户端
- c# - 如何逐行添加底部行中的数据?
- ios - AVPlayerViewController 不显示整个持续时间标签
- typescript - 使用嵌套类方法创建 API (Typescript)
- c# - 无法访问 Android 模拟器上的数据目录