Assembly 4 workbench

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Assembly 4 workbench

Post by leoheck »

How can I get the current asm4 configuration name with python?
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

leoheck wrote: Wed Sep 28, 2022 2:29 pm How can I get the current asm4 configuration name with python?
I don't think you can. Configurations are read from the spreadsheet and applied, but there is no trace of it once it's done
try the Assembly4 workbench for FreCAD — tutorials here and here
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Assembly 4 workbench

Post by leoheck »

Oh. I see.

My idea was to use the name of the configuration in the BOM. So it generates a different BOM regarding the configuration in use.

So, if I have 2 configurations named ConfigA and ConfigB

I would end up having BOM_ConfigA and BOM_ConfigB.
This is the case when you would have hidden parts on different configurations.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Assembly 4 workbench

Post by adrianinsaval »

Is asm4 configuration different from the built-in configuration tables functionality? https://wiki.freecadweb.org/Spreadsheet ... ion_tables
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

adrianinsaval wrote: Wed Sep 28, 2022 5:35 pm Is asm4 configuration different from the built-in configuration tables functionality?
yes, it's easier.
try the Assembly4 workbench for FreCAD — tutorials here and here
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Assembly 4 workbench

Post by leoheck »

adrianinsaval wrote: Wed Sep 28, 2022 5:35 pm Is asm4 configuration different from the built-in configuration tables functionality? https://wiki.freecadweb.org/Spreadsheet ... ion_tables
I believe it is the same thing. But Asm4 sets the spreadsheet that is currently active, somehow.
And this is what I was looking for, a way to detect which configuration is set.
The Model could have a property called Configuration, and then the same list could appear there.
Then someone that wants to detect the configuration that is in use, could find it there.
But this is my naive opinion.
project4
Posts: 237
Joined: Fri Jul 12, 2013 12:53 pm

Re: Assembly 4 workbench

Post by project4 »

leoheck wrote: Thu Sep 29, 2022 12:07 am The Model could have a property called Configuration, and then the same list could appear there.
Then someone that wants to detect the configuration that is in use, could find it there.
But this is my naive opinion.
That's an endless rabbit hole...
Your proposal is easy to do, but what happens when you load a configuration and do some manual changes after that (hide/unhide parts)?
The variable will still show the last loaded configuration name, which probably is not related to the actual model.
When I added the configurations, I saw placements in my head, a preparation to normal and exploded states that I never had time to finish.
Hidden state was added later as far as I recall.
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Assembly 4 workbench

Post by leoheck »

Ok makes sense. It could have at least a property that the user cannot change showing the name of the current configuration.
Zolko wrote: Wed Sep 28, 2022 4:46 pm ...
Also, Zolko, when opening the Configurations Panel, the current configuration could be Highlighted by default.
This way it is easier for the user to remember what is in use, and it is helpful in the case of needing to overwrite the current configuration.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

leoheck wrote: Thu Sep 29, 2022 11:44 am the current configuration could be Highlighted by default.
there is no "current configuration " : a configuration is like a bookmark, a state that you can set and restore.
try the Assembly4 workbench for FreCAD — tutorials here and here
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Assembly 4 workbench

Post by leoheck »

I see, it would be useful to have the record of the last clicked configuration then.

I am thinking that I can have 2 assemblies for the same set of parts.
For instance, The Transformers, with the same set of parts, can be a Car or a Humanoid-Robot.

Configurations allow that. And having a record of the last used/selected configuration can be useful too in the case where set o parts are not used in one of the configurations.
Post Reply