Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Polarsys » Capella General » import logical function and component breakdown structuress (how to import logical Function Breakdown Structures and logical Component Breakdown Structures in Capella coming from csv files or xml files)
import logical function and component breakdown structuress [message #1829597] Tue, 07 July 2020 13:06 Go to next message
david Plancq is currently offline david PlancqFriend
Messages: 17
Registered: May 2020
Junior Member
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
Re: import logical function and component breakdown structuress [message #1829612 is a reply to message #1829597] Tue, 07 July 2020 15:37 Go to previous messageGo to next message
Stephane LACRAMPE is currently offline Stephane LACRAMPEFriend
Messages: 217
Registered: July 2009
Senior Member
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


Stephane LACRAMPE
Obeo Canada
Re: import logical function and component breakdown structuress [message #1829639 is a reply to message #1829612] Wed, 08 July 2020 07:19 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
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.
Re: import logical function and component breakdown structuress [message #1829647 is a reply to message #1829639] Wed, 08 July 2020 08:54 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
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:
<?xml version="1.0" encoding="UTF-8"?>
<org.polarsys.capella.core.data.la:LogicalFunction xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org.polarsys.capella.core.data.la="http://www.polarsys.org/capella/core/la/1.4.0"
    name="root">
  <ownedFunctions xsi:type="org.polarsys.capella.core.data.la:LogicalFunction" name="f1"/>
  <ownedFunctions xsi:type="org.polarsys.capella.core.data.la:LogicalFunction" name="f2"/>
</org.polarsys.capella.core.data.la:LogicalFunction>


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.



Re: import logical function and component breakdown structuress [message #1829721 is a reply to message #1829647] Thu, 09 July 2020 13:49 Go to previous messageGo to next message
david Plancq is currently offline david PlancqFriend
Messages: 17
Registered: May 2020
Junior Member
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

Re: import logical function and component breakdown structuress [message #1829756 is a reply to message #1829721] Fri, 10 July 2020 09:02 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
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.

Re: import logical function and component breakdown structuress [message #1829760 is a reply to message #1829756] Fri, 10 July 2020 09:23 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
I just edited https://github.com/eclipse/capella-tools/wiki to explain the installation shortly.
Re: import logical function and component breakdown structuress [message #1830454 is a reply to message #1829760] Mon, 27 July 2020 01:43 Go to previous messageGo to next message
Stephane LACRAMPE is currently offline Stephane LACRAMPEFriend
Messages: 217
Registered: July 2009
Senior Member
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 LACRAMPE
Obeo Canada
Re: import logical function and component breakdown structuress [message #1831452 is a reply to message #1830454] Thu, 20 August 2020 07:41 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
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..

[Updated on: Thu, 20 August 2020 07:42]

Report message to a moderator

Previous Topic:Capella 1.3.3 has been released
Next Topic:Future of patterns
Goto Forum:
  


Current Time: Tue Nov 05 22:49:16 GMT 2024

Powered by FUDForum. Page generated in 0.04341 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top