Creating a feature chain expression for an action performance

Hi,

I read the following: How can I set a feature reference expression? - #8 by Daumantas
However, it doesn’t seem clear how to create the FeatureChainExpression for a scenario where I want to reference a performed action.

part part1 {
    action action1;
}
part part2 {
    perform part1.action1;
}

How do I create the feature chain expression in part1 (referencing to action1)?

Greetings,
Jasper

So I checked the CST Explorer and it looks like it is actually not a feature chaining expression that I need, rather it is the feature chaining type relationships:

Namespace [0, 0] - [8, 0]
  children: OwningMembership [0, 0] - [7, 1]
    target: Package [0, 0] - [7, 1]
      declaredName: NAME [0, 8] - [0, 9]
      children: OwningMembership [1, 1] - [3, 5]
        target: PartUsage [1, 1] - [3, 5]
          declaredName: NAME [1, 6] - [1, 11]
          children: FeatureMembership [2, 5] - [2, 20]
            target: ActionUsage [2, 5] - [2, 20]
              declaredName: NAME [2, 12] - [2, 19]
      children: OwningMembership [4, 4] - [6, 5]
        target: PartUsage [4, 4] - [6, 5]
          declaredName: NAME [4, 9] - [4, 14]
          children: FeatureMembership [5, 5] - [5, 27]
            target: PerformActionUsage [5, 5] - [5, 27]
              heritage: ReferenceSubsetting [5, 13] - [5, 26]
                target: Feature [5, 13] - [5, 26]
                  typeRelationships: FeatureChaining [5, 13] - [5, 18]
                    target: FeatureReference [5, 13] - [5, 18]
                      parts: NAME [5, 13] - [5, 18]
                  typeRelationships: FeatureChaining [5, 19] - [5, 26]
                    target: FeatureReference [5, 19] - [5, 26]
                      parts: NAME [5, 19] - [5, 26]

My question remains :slight_smile:

Greetings,
Jasper

Hi,

Chainings can be created with heritage.append_chain

_, chaining = perform.heritage.append_chain(
    syside.ReferenceSubsetting,
    (part1, action1)
)
1 Like

Thank you that works!
Somehow I missed that function :frowning: