Parameter calculated from relationships (between 2 different parts)

Hello

I would like to determine a parameter by an "angle" function (via a formula) which is based on geometric elements (2 lines) that belong respectively to 2 different parts in a product.

Here is a screenshot of the formula made as well as the error message received:

Error message zoomed in:

"You can't use objects in product-level relationships if those objects aren't in the same container"

I can only make this type of formula work on entities within the same part but not between geometric elements belonging to two different parts?

I'll leave you with a copy of my test piece.

Do you have any ideas for me to calculate this parameter using the "angle" function based on entities from two different parts?

Thank you in advance for your help.


exemple.zip

Hello.

The easiest way is to keep the angle measure between the two lines.

 

We can also create a part in which we copy the two lines with a link

(so we can use the formula "Measurements"  "angles (Right, Right): angle"

Hello Franck,

Thank you for your answer. On the other hand, I would have liked other solutions more appropriate to my problem.

Indeed, I am looking to build calculated parameters in order to use the "oriented angles" functions of the formula tool.

In your proposal 1, it only works for measurements and moreover, I'm not sure that the measured angle is oriented.

In your proposal 2, the idea of building "non-physical" parts just to put elements in order to be able to apply formulas to them seems a bit complicated to me and will quickly make a small gas plant.

Wouldn't you have other ideas to be able to calculate parameters using functions (e.g. angleoriented(,) ) of the formula tool in a product (with ASSEMBLY)? 

One avenue I have in mind would perhaps be to create external parameters or references  at the product level (and not at the level of an additional part) and to be able to apply the functions between these elements.

Thank you in advance for your help.

1 For measurements you can't automatically have a polarity reversal, it's manual with the "invert result" box that changes the measurement to negative.

You also can't count a number of turns (angle up to 360°).

In assembly you can replace the angle measurement function with an "angle constraint" in which you select the "measurement" box. 

 2 These are not non-physical parts, they are a single physical part since we glue the elements on which we want to calculate the angles (duplication of the geometry).

In assembly there is no geometry so the only external refs you can create at the assembly level are on type parameters (length, string, boolean etc).