-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A2Assembly, path incorrect when generating the BOM File #50
Comments
I couldn't reproduce the error. However, I've changed the code to try something. The A2plus workbench works differently than the others. it doesn't allow to get to the absolute paths. I've written code for that, which I tweaked. |
git checkout Patch-1 is rejected here origin/Develop I am happy, if you tell me which file I need to bring up to date to simply copy/paste the new code |
Sorry to be the bearer of bad news, it does not. My Python knowledge is at best sparse, so I can't really help debug, but I am happy to do more testing if it helps |
No a path relative to the main assembly ./tiroir/tiroir_assembly.FCStd |
Thank!, that's the problem. On my windows pc and my linux pc I have absolute paths when the items are on a different location then the assembly there are in. Probably this is different for some linux versions or with certain settings. Now I have something to go on and start to figure how to tackle this to cover both situations. |
I believe that I've found it. Can you update the WB to version 0.05.11 and give it a try? |
Update did not go as planned : I then deinstalled, went to the addons directory, removed a directory BillOfMaterials.backup1710312901.0584648 which was a leftover (may be from the manual updates I did yesterday) started, installed, installer said "version ..11", did the install and again I got version ..7 07:58:18 Initializing A2plus Workbench v0.4.64. |
Maybe it helps if you do a git pull from the command line? You have modified the files by hand. These can give a problem because these are no longer in sync with the versions in github. Maybe reverting the file and then update to the latest version helps. |
Something went wrong with the AddOn cache, so even if freecad was saying that I installed version 11, on the next start the version installed was .7. After removing freecad completely and reinstalling it afresh , I now have v11 installed. But I get this message |
Progress, but still not there yet, though. And I hate to waste your time. Original exception was: However, I would also like to test Assembly3, do you foresee any issues ? |
I for see no issues for the Assembly3 WB. the A2plus WB is a bit of a special case. Internally the assembly 3 (and 4) follow more the workings of FreeCAD self. I actually apricate it that you are willing to test my WB. As you switch to Assembly3 can I perhaps get a copy of your files that generate the latest error? Then I can see what is going on. I probably overlooked a usecase scenario. |
I am dead set on using your addon, I started using Freecad as I have many, quite complex furnitures to make in my house, and I don't want to desing by hand, and my ultimate goal is to go up to an optimized cutlist of plywood sheets (hence my enhancement request about width, length and offset) . As a software developper myself, I understand that these things take time and needs several or many iterations before being perfect, too bad I don't have the time to learn Python and Freecad's internals or I would have been happy to help more. Perhaps, this is a conversation we can have directly you and I. I am planning to look at assembly3, but A2Plus almost fit my needs (there are a few missing constraints like distance between planes, but it can be emulated with offsets, not as clean and straight forward as I would like). By all means, I am happy to carry on helping and I attach all my files, nothing is confidential, if you want e to try and test something, just say so. Note that it is work in progress, not yet finished, and again this is my first freecad project, so it my not follow Freecad's best practices, but please do keep us posted on your progress |
I've found the cause of the error. It was caused by items that were renamed. This is a totally fine practice. So no worries. In FreeCAD as default when you add parts twice or more, you get _001, _002, etc after the name. I've created a function to return the original part, so that in the BoM, the qty increases and avoid add them all separately. When you use one of the other assembly workbenches, you can expand the subassemblies in the tree. A2plus is different in this area. (as an answer to # #49) To explain a little about me, I'm actually not a professional software developer but a mechanical engineer. I'd like to program as a hobby and have learned my self Python, c# and VB.net. FreeCAD is for me the ideal program for all my projects. Both for design projects and programming. |
I wanted to check if importing a sub assembly woud work when creating a BOM.
I creatd the sub assemply in a sub sirectory, for practical reasons, A2plus, does not complain and it's parts list is fine.
But when generating the BOM list I get the following
16:02:05 File '/home/didier/Bureau/Cuisine/tiroir_assembly.FCStd' does not exist!
16:02:05 Traceback (most recent call last):
16:02:05 File "/home/didier/.local/share/FreeCAD/Mod/BillOfMaterials/./Load_BoM_Panel.py", line 286, in on_CreateBOM_clicked
16:02:05 GetBOM_A2plus.BomFunctions.Start(
16:02:05 File "/home/didier/.local/share/FreeCAD/Mod/BillOfMaterials/./GetBOM_A2plus.py", line 723, in Start
16:02:05 raise e
16:02:05 File "/home/didier/.local/share/FreeCAD/Mod/BillOfMaterials/./GetBOM_A2plus.py", line 701, in Start
16:02:05 self.GetTreeObjects(checkAssemblyType=CheckAssemblyType)
16:02:05 File "/home/didier/.local/share/FreeCAD/Mod/BillOfMaterials/./GetBOM_A2plus.py", line 74, in GetTreeObjects
16:02:05 self.GoThrough_Objects(
16:02:05 File "/home/didier/.local/share/FreeCAD/Mod/BillOfMaterials/./GetBOM_A2plus.py", line 179, in GoThrough_Objects
16:02:05 ObjectDocument = App.openDocument(FullPath, True)
16:02:05 OSError: File '/home/didier/Bureau/Cuisine/tiroir_assembly.FCStd' does not exist!
It is normal, that file does not exists, it is in /home/didier/Bureau/Cuisine/tiroir/tiroir_assembly.FCStd, notice the missing tiroir subdirectory
If that helps, I am happy to provide a new set of files
The text was updated successfully, but these errors were encountered: