It's all about the answers!

Ask a question

Extract InstanceSlots from Rhapsody with RPE


Calum Button (1314) | asked Feb 14 '22, 11:32 a.m.

 Hi,


I am beginning to use RPE with Rhapsody and can mostly navigate the schema to extract some Rhapsody elements.  However, I am now stuck and am looking for some help.

Would anyone be able to offer advice on how to extract the information contained in an InstanceSlot?  At the moment I have used NestedElements but simply get InstanceSlot 0 etc. rather than the name and values of the element associated with the InstanceSlot.

Apologies if the question is a bit garbled.

Many thanks in advance

Calum

2 answers



permanent link
Pierre Bentkowski (131517) | answered Feb 22 '22, 1:18 p.m.
edited Feb 22 '22, 1:21 p.m.

Hello
I have:
Block A with Value Properties X
InstanceSpecification a:A with InstanceSlots X = "abc"

I can extract the InstanceSlots Name with
Projects/Project/
  Packages/Package/
    InstanceSpecifications/InstanceSpecification   ( name is  a)
      instanceSlots/InstanceSlot  ( name is  instanceslot_0)
        SlotProperty/ModelElement
          name ( will return 'X' )

According to the return XML from the query the Instance slot value "abc" should be here:
InstanceSpecifications/InstanceSpecification/instanceSlots/instanceSlot/Values/ValueSpecification/value

But the Rhapsody PUB Schema do not contain the trailing "value" element
I will keep looking into it.


Comments
Calum Button commented Feb 24 '22, 4:11 a.m.
Thanks Pierre,

I tihnk that's where I am, but I'm trying some other cast to types having read your answer - I'm sure it can be done...

Pierre Bentkowski commented Mar 30 '22, 8:28 p.m.
I still cannot access the "value" element.
I believe it is a defect and have opened a support case.
I will  update you when I have news.


permanent link
Reginald Heller (111) | answered Feb 23 '22, 2:41 a.m.

  My library won't load. I recently updated my windows 10 and it seems to have broken something such as my discord.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.