Hi,
I found a lot of questions about it in the previous forums but no answer
How to import massive data in Capella (such as logical function breakdown structures or logical component breakdown structures) coming from csv files (or xml files)?
thank you
david
Hi,
I found a lot of questions about it in the previous forums but no answer
How to import massive data in Capella (such as logical function breakdown structures or logical component breakdown structures) coming from csv files (or xml files)?
thank you
david
Hi David,
I donāt think there is a ready to use solution for this at the moment.
We can provide you some professional services to acheive this though.
Stephane
Hi David,
I donāt think there is a ready to use solution for this at the moment.
We can provide you some professional services to acheive this though.
Stephane
Capella Groovy is great for such tedious tasks. A little groovy programming knowledge is required though. Maybe we can add your use case to the zoo of examples that are already available, but youād need to be a little more specific on how your csv/xml files would look like.
Capella Groovy is great for such tedious tasks. A little groovy programming knowledge is required though. Maybe we can add your use case to the zoo of examples that are already available, but youād need to be a little more specific on how your csv/xml files would look like.
Maybe itās even simpler than that⦠If you say you have an xml file, look at the ācapellaā xml file format, hereās an example for a bunch of logical functions:
If you can produce something like this, you could simply insert this into the capellamodeller file at the right location? You can even save such a file as a .capellamodeller file, and in Capella right click and āOpen With⦠Capellamodeller Model Editorā. Noone ever uses that editor but itās good to know it exists⦠In that editor you can then load your ārealā capella model with right-click āLoad Resourceā¦ā, select your original .capellamodeller file and they you can just copy paste your functions into the model and save. Maybe thereās hickups with this approach, but surely itās worth a try. Make sure to backup your original model beforehand and then maybe use Capella GIT integration to verify the changes to your original model.
Maybe itās even simpler than that⦠If you say you have an xml file, look at the ācapellaā xml file format, hereās an example for a bunch of logical functions:
If you can produce something like this, you could simply insert this into the capellamodeller file at the right location? You can even save such a file as a .capellamodeller file, and in Capella right click and āOpen With⦠Capellamodeller Model Editorā. Noone ever uses that editor but itās good to know it exists⦠In that editor you can then load your ārealā capella model with right-click āLoad Resourceā¦ā, select your original .capellamodeller file and they you can just copy paste your functions into the model and save. Maybe thereās hickups with this approach, but surely itās worth a try. Make sure to backup your original model beforehand and then maybe use Capella GIT integration to verify the changes to your original model.
Hi Felix,
Thank you for your last suggestion. It works!
nethertheless, it is to be carefull with the compliancy of the xml file with capella model structure, but it is possible to do very interesting things with the capellamodellerā¦
Unfortunately, i donāt know what is Capella Groovy? can you give me more information?
we keep in touch,
david
Hi Felix,
Thank you for your last suggestion. It works!
nethertheless, it is to be carefull with the compliancy of the xml file with capella model structure, but it is possible to do very interesting things with the capellamodellerā¦
Unfortunately, i donāt know what is Capella Groovy? can you give me more information?
we keep in touch,
david
David, yes, you need to be careful with the capellamodeller editor. It is not fully functional. It lets you do things that capella does not allow. It also does not show the derived properties of objects, e.g. LogicalFunction.realizedSystemFunctions. Always make backups and compare/review changes via git/source control.
Capella Groovy is an addon to Capella that allows you to work on capella models with groovy scripts.
There is a
basic example. And
another example that exports some elements as csv. The cool thing about this one is that you donāt even need to download csv libraries. Groovy will do this automatically by looking at the @Grab instructions in the script itself.
The sad thing is that there is no funding whatsoever. It is 100% my voluntary work. I will only contribute free fixes and features as I have time and joy of doing it. I have both at this moment. If youāre interested, Iāll setup a small wiki page to explain installation, which at this moment is a bit more complicated than it should be, because of this Eclipse
bug.
Hi Felix,
Is there a place where I can look to install Groovy4Capella for Capella 1.4.0?
Also what would be your advice/favorite resource to learn groovy quikly.
Thanks
Stephane
Stephane, the instructions at https://github.com/eclipse/capella-tools/wiki should also apply for Capella 1.4.0. As for learning Groovy, if you know Java youāre already there. Valid Java is also valid Groovy. Maybe itās best to learn by example, look at the Capella Groovy Examples and try to understand themā¦