[Python]PyCIM CIM 模型解析库

2020-06-12 发布 0条评论



下载地址:

https://github.com/rwl/PyCIM


安装方式:

py -3 -m pip install PyCIM



测试用法:


import uuid

from CIM14.IEC61970.Core import *
from PyCIM import *
node = ConnectivityNode(name='Node 1')
t = Terminal(name='T1')

t2 = Terminal()
node.addTerminals(t)
node.addTerminals(t2)


dictionary= {}
b110 =  BaseVoltage(110.0)
b110.UUID = str(uuid.uuid1())
dictionary[b110.UUID] =b110

b220 = BaseVoltage(220.0)
b220.UUID = str(uuid.uuid1())
dictionary[b220.UUID] =b220


cimwrite(dictionary ,"./test.cim")


发表评论