derived configurations: how to find out which ones in the tree drive a given parameter
Posted: Fri Jun 10, 2022 3:00 am
I have a configuration tree with top-level configuration(s) and derived configuration(s), arbitrarily nested.
For a given configuration (of any level) and a given parameter, I want to find out which configurations in the tree (root = given configuration) control the parameter.
How do I do that?
Note: There is not necessarily a design table present.
Clarification example:
Assume the following configuration tree (here just a chain):
A (top)
- A1 (derived from A)
-- A2 (derived from A1)
Assume the given IConfiguration object is A and the given parameter is the dimension D1@Sketch1.
There are 4 possibilities:
1. A and A1 and A2 control D1@Sketch1. (A1 overwrites A and A2 overwrites A1.)
2. A and A1 control D1@Sketch1. (A1 overwrites A.)
3. A and A2 control D1@Sketch1. (A2 overwrites A.)
4. A controls D1@Sketch1. (No overwrite.)
To clarify why I need this:
In my program/macro, I have to set a given parameter (like the dimension D1@Sketch1) to a given value (like 50) for a given configuration (like A) so that it affects the whole configuration tree, but so that I do not break or create any links of derived configurations below the given configuration.
So in case 4 I would only set the parameter for A. In case 3 I would set it for both A and A2. In case 1 I would set it for A and A1 and A2.
For a given configuration (of any level) and a given parameter, I want to find out which configurations in the tree (root = given configuration) control the parameter.
How do I do that?
Note: There is not necessarily a design table present.
Clarification example:
Assume the following configuration tree (here just a chain):
A (top)
- A1 (derived from A)
-- A2 (derived from A1)
Assume the given IConfiguration object is A and the given parameter is the dimension D1@Sketch1.
There are 4 possibilities:
1. A and A1 and A2 control D1@Sketch1. (A1 overwrites A and A2 overwrites A1.)
2. A and A1 control D1@Sketch1. (A1 overwrites A.)
3. A and A2 control D1@Sketch1. (A2 overwrites A.)
4. A controls D1@Sketch1. (No overwrite.)
To clarify why I need this:
In my program/macro, I have to set a given parameter (like the dimension D1@Sketch1) to a given value (like 50) for a given configuration (like A) so that it affects the whole configuration tree, but so that I do not break or create any links of derived configurations below the given configuration.
So in case 4 I would only set the parameter for A. In case 3 I would set it for both A and A2. In case 1 I would set it for A and A1 and A2.