Importing Logical Functions from Excel

Hi,
I wrote a python script to import a function tree from Excel.
I defined a property group with PVMT to associate a code and a level (in the function tree) to each LF.
The steps for building the function tree are the following:

  • import of flat list of LFs
  • refactor of function tree by assign child functions according the level

Just to share with other interested, the right way of refactoring is to modify the ownedFunctions of the parent using the java method getOwnedFunctions(), with the following code snippet

parentLf.get_java_object().getOwnedFunctions().add(lf.get_java_object())

1 Like