The new IntegralPy library can be used to control INTEGRAL from Python-Script: loading grid data, editing grid data, start calculations.
Quick-start Video: (for better quality go to article media “Anhänge” → “Dateien” and download the video)
IMPORTANT NOTE TO VIDEO: in the current INTEGRAL versions the control paramaters for ProtobufGridIO & VisuService are visible by default. There is no need to activate them through macro command which is depicted in the video.
...
For comments, questions and access to IntegralPy Python-library (the wheel files from video) contact eimantas.survila@fgh-ma.de
VisuService Integral Start
...
grid.get_base_load_flow_results()
Prototype version (up to change in near future): returns a string which entails the result tables as CSV. The individual tables are separated by the following string: "== TABLE SEPERATION =="
grid.import_from_db(db_name, db_server_ip, db_username, db_password, db_server_port)
...
grid.get(type, attr, ids)
Returns either a single object or a list of objects
type is either list or single type from integralpy.Type
attr is a list of attributes from integralpy.Attribute
ids is either single id or list of idsreturns either a single object or a list of objects
The fields of the returned objects can be changed. For example
leitung.kurzname = “new short name”. See exmpla at the bottom of the page.
grid.write(objects)
Sends back the objects which could be altered in Python script back to INTEGRAL which updates its data model with new information from these objects.
objects is either a single object or list of objects
grid.create(type)
type is a single type
returns Creates a newly created objectnew object in INTEGRAL and returns it.
grid.remove_attribute(type, attr, ids)
Removes the given attributes from the given objects.
type is either list or single type from integralpy.Type
attr is a list of attributes from integralpy.Attribute
ids is either single id or list of ids
grid.remove(objects)
Removes the objects from INTEGRAL data model.
objects is either a single object or list of objects
Examples of using IntegralPy:
...