Open spkane opened 4 months ago
There is a configuration table option in the menu. It's not exactly the same as the spreadsheet variety, but works similarly.
I'm trying to use configuration table with DD and it works for single object (PartDesign Body).
But I can't duplicate (link) a body and the modify the configuration for the new only, as I made with spreadsheet.
Because configuration tables in spreadsheet can be assigned to an object as property, but not the same with DD.
Is my fault or there is some workaround?
I haven't used spreadsheet configurations outside of some brief testing. Let's suppose you have a model consisting of a Body and you have your parameters as a configuration table in a dd object. Your goal is to create a new Body (Body001) that inherits all of Body's features, but that has a separate dd object with the same initial configuration table, but that can be modified without affecting the original Body, then I think the edit menu -> duplicate function is the choice here. Select the Body, edit menu -> duplicate, and in the dialog make sure the dd object is also checked to be duplicated. You will get a new Body001 and a new dd001 that are linked together the same way Body and dd are linked, and you can edit both without impacting the originals. Note that you can use copy instead of duplicate to copy this into memory and paste into a new document if you want separate documents.
You could also elect to copy only Body and not copy dd in that dialog. If you do it that way, both Body objects will be linked to the same dd object, and changes to dd properties will affect both Body objects. You could add new variables specifically to use in the new Body, for example if you're using "Height" for Body, maybe add "Height2" and only reference Height2 from the new Body001. To do this open the configuration again the configuration editor, up tick the Variable count to add a new variable, rename it Height2, and enter the values to use in the various enums, example: for small, medium, etc. Changes to Height won't impact Body because it doesn't reference Height2. Once Height2 is added you can leave the fields empty and open the copy dialog in DynamicData menu and set (not copy) the height2 list property to the height list property, and then go back into the configuration and change only the values you want to change. The difference between set and copy is set does not create a new property, but sets the value of an existing property.
@mwganson thanks for your answer and sorry for delay.
Ok, tried your suggestions and it works as described. Just I had to use the copy/paste command because using duplicate command I fall in this this issue : https://github.com/FreeCAD/FreeCAD/issues/6278
With copy&paste works in both cases: copying DD object and copying only the Body, referencing it to the same DD.
Good workflow in some cases.
But thinking about a case with a lot of body instances, each with different configuration, this could be messy due the duplication of DD object for each Body. And because is not possible to place DD inside the Body, could be a bit difficult to know quickly which DD is linked to each body. In the case of spreadsheet config table, it create a new property in the Body object, so is easy to relate to it.
But may be this use case is not so frequent.
You can put the dd object into the body if you want to. There is even a setting in the settings menu to automatically put new objects into the active body. Open the workbench, in the edit menu -> preferneces -> DynamicData -> Add to active container checkbox.
If the body is already created you can still add it to the body by editing the body's Group property to also include the dd object.
Note that even though the dd object is inside the body it is still always global in scope, meaning its property are accessible to other objects in other bodies the same as if it was not inside a body. Same is true for all FreeCAD objects. All expessions are global in scope.
Great, thanks! I didn't found because I was dragging dd in the treeview without success.
Is it already, or would it be possible to make Dynamic Data support the Configuration Table and Variable Link workflow, or something functionally similar?