-
Notifications
You must be signed in to change notification settings - Fork 15
Import Export
Antoine Fourmy edited this page Apr 3, 2017
·
4 revisions
For both import and export, NetDim relies entirely on Excel format. Two python libraries are used:
- xlrd to read the excel file at import
- xlwt to create the excel file at export
From the main menu, select the entry "Import graph".
The following rules are used at import:
- to import objects of a given subtype, the imported excel file must have a sheet named by the subtype
- each row defines an object, each column defines a property
- the first row is used to indicate which property the column relates to: the import of object starts from the second row.
- any property can be imported, even if it doesn't natively exist in NetDim's model. A property that does not exist is automatically added to the model.
- native properties do not necessarily need to be imported: if they're not in the file, they will be initialized to a default value.
- some properties are mandatory to create the object:
- a link is defined with a source node and a destination.
- an interface is defined with a node and a link.
From the main menu, select the entry "Export graph". All objects are exported, with all properties, following the data format described in the 'Import' section. If there is no object of a given subtype, no excel sheet is created for that subtype.