Is There Documentation for Viewpoint Creation

Hi all, I’m trying to create a viewpoint which adds in another type of function and by following the available tutorials (videos) on cost viewpoints and looking through the code for the other viewpoints, I’ve managed to create a new Capella Object. In my PAB my new function can be placed in a physical deployed behaviour (blue box) similar to a function.
However, I can’t find any documentation on how to add extra functionality. For example, how can I add in functional exchange functionality? Ideally I want it to be a copy of the function but with some slight changes. Thanks

Hello Andrew,
If you want to create a specific kind of function, you should use the attribute “superClass” in vpdsl.
By doing so, your new kind of element (“MySpecificFunction” in my example) will inherit all the definition of the Capella element (the physical functions in this case).
It means that without defining anything else, elements of kind “MySpecificFunction” could be allocated to Behavior physical components, could be linked with functional exchanges, could be displayed on PAB, PDFB and PFBD diagrams just like you can do it with any physical function

Hi Aurélien,
Thanks for your response. My Class already has this but it isn’t working. I have currently only wrote the ‘diagrams’ file for the PAB. Are you saying that I would not need to write the diagrams file and that by declaring this class a superClass of a physical function it will already appear on the relevant physical diagrams?
Thanks,
Andrew

Hi. I tried out what I mentioned in the last post and it didn’t work, which leads me to believe there is something wrong with my diagrams file. I have coded the function to appear in the PAB and the code I currently have allows me to have my new function on the PAB inside behaviour physical components however I cannot link functional exchanges to and from it. Does something extra need to be added for this functionality to appear?
Is there something wrong with this? Thank you

Hello,
It’s a bit technical.
If you just declare your class using superClass related to physical function, and define nothing for diagrams, your new class will indeed behave like any other physical function.
You will be able to allocate your class to components, link them with functional exchange and display them on PAB diagrams.
However, the tool to create physical functions in PAB diagram (and in any other diagrams) will create regular physical functions and not elements related to your new class.
If however, you create elements related to your new class through the project explorer (right click, add Capella Element on a physical function), you will then be able to display your new kind of element on regular diagrams, and to create functional exchanges between you new kind of elements.
When you define the diagram in vpdsl, you define a mapping between graphical elements (container, node, edge) and model elements (physical function, physical component, functional exchange).
In your last example, you have thus define a new kind of graphical element in order to display your elements of your new class.
The problem is that the tool to create Functional Exchange in Capella is defined to be used on the regular graphical elements which display physical functions (but also your elements of your new class).
Thus you shall not define new mapping (in order to use the ones of Capella for regular physical functions) but only to define a new tool to create your specific kind of physical functions.
(and in order to do so, you need to directly edit odesign file without working with vpdsl language)

Hi Aurélien ,
Thanks for your response, this is very helpful. Do you know if there are any guides/documentation on editing the odesign file?
Kind regards,
Andrew

Hello Andrew,
Yes you can read the documentation of Sirius
https://www.eclipse.org/sirius/doc/ (also embedded in Eclipse).
When you generate your viewpoint with vpdsl, it creates a plugin called .design.
In this plugin, an odesign file is created under the folder description with a content based on the diagram definition provided in the .diagram.vptext file.
You can directly edit this odesign file in order to further customize the behavior of the diagrams.
If you want to regenerate the viewpoint at some time (because you modify the vpdsl description), think to modify the configuration of vpdsl first.
In the .conf.vptext file, change the OverwriteOdesign parameter to false.

Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.