In an assembly, I have a first part in which I have a 2 mm hole (this hole has the variable Ex: d22) in a second part, I made a 3 mm hole variable by default Ex: d50. I would like to give this 3 mm hole (d50) for example the function =d22+2.
It doesn't work.
If d22 and d50 are part of the same part no problem it works, but if these 2 variables belong to 2 different parts I can't do it.
Indeed, as Bastien says, the side-by-side relationship is not enough because your software will look for 2 dimensions in the same room. The link to the quote must also contain the link to the relevant part.
I understood your answers, and I had already tried to give the right variable by selecting it directly in the right room... but that's my problem, I can't display the sketch where my 3mm hole appears (part 2) and at the same time: the sketch of my 2mm hole (part 1) or the table showing the variable d22 corresponding to this Ø of 2mm. I looked again in the "Show" menu but I can't find anything.
In other words, when I am in my sketch room 2, it is impossible to have access to anything other than this sketch.
In both cases, I'm not a fan of this method which could modify parts by forgetting to modify the plans and all the sub-assemblies using this part.... Configuration management is a must...