Hello,
As we are using Pure variant, we would like to have a derived property column to get the configuration of a given MEDINI object according to the Pure variant applied to the project (e.g. Safety requirement).
Is that possible?
Romain, I think that's not possible out of the box, or only with unreasonable effort of awkward scripting inside the JS script.
However, the PV-medini integration layer should be capable of offering some scripting extensions for that.
So could you come up with some suggestions and ideas of how such a support could look like? I mean what exactly do you require in the first place?
You can imagine that the above mentioned layer could inject a new API or object into the scripting engine, e.g. lets assume we call it PureVariants so you can do stuff like:
// maybe some investigation functions?var ruleName = PureVariants.getRuleNames();...// maybe some lookup mapping function?var isIn = PureVariants.isMapped(mediniObject, "Foo");
Other interested users may comment here as well their ideas.
Happy Scripting
Jan
Hello,is there a possibility to get the PV information of an element in Medini? So that we can modify this by scripts?BestMichael
Hi Michael,
as mentioned above that's currently not possible and not easy to achieve as pure variants is holding all the data and has uni-directional references from their data world (actually XML) to our world (EMF).
Have you asked the pure guys whether they have a scripting API? Maybe we can bring both worlds together that way.
Hello Jan,
So i understand that is uni-directional references. But can we automatically (with script) create variant assignment ? as we do with the contextual menu in Medini analyze perspective?
Hm, that function is also contributed by PV but as mentioned we may find out what we can pass to the scriping engine to give you control over that, basically tunnel PV fucntions to the script.
Not impossible but needs some investigation I guess.
PS: I will try to make some very simple tests... main problem IMHO is that you need to load a mapping file first anyway, right?
Yes for the file. It is already loaded. But my need is to use a profiling column in Medini analyze (which represents the product allocation) to set automatically the right mapping. And then avoid to do it manually for each requirement using the contextual menu ("Pure variant / add existing condition")