I allow myself to ask my question here, because after a few hours of searching, I have not found an answer.
I try to remove a function in a part via the equations of the assembly, but I can't. However, I manage to link the dimensions of the functions and sketches to the global variables of the assembly.
Method tried:
In the room: Binding the feature to a global variable in the room to bring the function's value to 1 (successful).
In assembly: Drive the global variable of the part by a global variable of the assembly (does not work). SW tells me that the equation is not valid.
Here are some images:
In the assembly, I would like the Rolls variable to condition the two highlighted functions.
Image 1
In the part, the Hole variable determines the above functions:
Image 2
But in the assembly, it is impossible to make the connection:
Image 3
When validating the equation Hole...=Rolls, it tells me "The equation is invalid".
For the assignment of the assembly global variable, look at capture 01, knowing that (and after doing some research) some procedures differ from the SW versions,
For the deletion of the function, assigning a repetition value "0" does not remove the function (or even not acceptable, you need a value >=2), for this it is possible to use the IIF() function, see screenshot 02
Take into consideration that deleting a parent function deletes the child functions, while undeleting the deletion of parent functions does not undo the deletion of the child function
So I found a solution, thanks Lynk, I hadn't thought about the If function. I thought that simply =0 or =1 would enable or disable the function.
The idea is to be able to automatically generate several conveyor versions. I've tried PilotAssembly (MyCAD Tools), but I find it a bit unpalatable. Is doing this with equations a good idea or is it worth looking into DriveWorks?
For small assemblies, the equations are usually enough. Otherwise if more complex, Driveworks, PiloteAssembly, macro or other solutions seem more appropriate.
For another solution
Why not put the equation in the room?
It is possible to retrieve a value driven by an equation of the assembly, then vary your part according to an equation.
See attached image to delete a function with an equation in a part.
Or rather than wanting to control the removal of a part function from the assembly, you may prefer to create the 2 configs of the part (with and without the 2 functions) and depending on your condition choose one or the other of the configs.