Beispiel #1
0
Created on Mon Jun 05 11:36:46 2017

@author: Steven
"""

# standard Python/SciPy libraries
import getpass, sys, os

# Python .NET interface
if not 'dotnet.seamless' in sys.modules:
    from dotnet.seamless import add_assemblies, load_assembly

# .NET related imports
if not 'PLEXOS7_NET.Core' in sys.modules:
    # load PLEXOS assemblies
    add_assemblies('C:/Program Files (x86)/Energy Exemplar/PLEXOS 7.4/')
    load_assembly('PLEXOS7_NET.Core')
    import PLEXOS7_NET.Core as plx

if not 'EEUTILITY.Enums' in sys.modules:
    # load PLEXOS assemblies
    add_assemblies('C:/Program Files (x86)/Energy Exemplar/PLEXOS 7.4/')
    load_assembly('EEUTILITY')
    from EEUTILITY.Enums import *

if not 'System' in sys.modules:
    from System import *

if not 'System.IO' in sys.modules:
    from System.IO import SearchOption
# -*- coding: utf-8 -*-
"""
Created on Mon Sep 11 12:54:57 2017

@author: Steven
"""

# Python .NET interface
from dotnet.seamless import add_assemblies, load_assembly  #, build_assembly

# load PLEXOS assemblies
plexos_path = 'C:/Program Files (x86)/Energy Exemplar/PLEXOS 7.4/'
add_assemblies(plexos_path)
load_assembly('EEUTILITY')

# .NET related imports
from EEUTILITY.Enums import *

fout = open('EEUTILITY_Enums.txt', 'w')

for t in type(ClassEnum).Assembly.GetTypes():
    if t.IsEnum:
        fout.write('{}\n'.format(t.Name))
        for en in t.GetEnumNames():
            fout.write('\t{}\n'.format(en))
        fout.write('\n')

fout.close()