I just tested this, and you're right, there is something fishy. Actually, it does work, because you can still change the variables in the original sub-assembly, and the parameters are transfered as they should, but the Variables object of the sub-assembly as shown in the tree of the link shows actually the Variables object of the higher-level assembly, and thus one cannot modify the variables of the sub-assembly directly in the tree of the assembly, it must be done in the window of the sub-assembly.
This is what was called Variant Links, and today no, it's not possible. The current App::Link implementation does allow to make exactly the feature you're asking-for, but it cannot be saved to disk. I've made a proof-of-concept about this possibility, but it was not well received. I too think that this feature would be remarkable and would put FreeCAD in another league of the CAD software, but I don't know how to proceed. If you have ideas please tell us/mejoe.belladonna wrote: ↑Sat Nov 09, 2019 10:16 pm
- Is it possible to "detach" link after linking, but to keep all the properties of a linked part? I would like to link my Box and then "detach" it and change Variables so my Box will have some specific dimensions. Then I would like to link my Box second time, but this time with different dimensions. That way, I will have two Boxes with all the properties of an original Box, but with different values.
Would it be possible to use something like in picture1. There, I have used "Override colors.." to override color of linked object. If we could override "Variables", then the problem would be solved . If we can get two linked Boxes with different colors, maybe it would be possible to override some other properties, like complete set of "Variables"?
the point is that App::Link shares the geometries of objects: if you only change the colour it doesn't change its shape, but if you change a variable it would change the shape. So it's not as simple as overriding the Variables object.joe.belladonna wrote: ↑Mon Nov 11, 2019 7:42 pmThere, I have used "Override colors.." to override color of linked object. If we could override "Variables", then the problem would be solved . If we can get two linked Boxes with different colors, maybe it would be possible to override some other properties, like complete set of "Variables"?
theoretically I think yes, but it's currently not implemented in Assembly4. If you have time to look into the code I'd be happy to include your contribution.
Yes, I think that that's the correct way. What I did was to copy objects to documents in RAM, created on-the-fly, not written to disk, and variables were set on these — volatile — objects, and everything worked fine. Except that you could not write to disk. Each variant link took some extra memory, but not disk-space.
what system are you using ? Which version of FreeCAD and Assembly4 ? I've played with your files, and they give me very strange results. These are my settings:
Code: Select all
OS: Ubuntu 18.04.3 LTS (KDE/plasma) Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.18714 (Git) AppImage Build type: Release Branch: master Hash: a7ad04ba4aefb486fbc5e7c68da3dd488443b08c Python version: 3.7.3 Qt version: 5.12.5 Coin version: 4.0.0a OCC version: 7.3.0 Locale: English/United Kingdom (en_GB)
1) you're exploring domains nobody has tried, so you're encountering dragons and princesses for the first time: good luck.
This is my FreCAD version:
Code: Select all
OS: Windows 10 (10.0) Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.18686 (Git) Build type: Release Branch: master Hash: f0cdad7f708c0185961cd7185e366df22e041d02 Python version: 3.6.7 Qt version: 5.12.1 Coin version: 4.0.0a OCC version: 7.3.0 Locale: Serbian/Serbia (sr_RS)