How can i filter BOM to show only parts that have "Laser Cut" checked in my Custom Property tab?
Haven use in a while.
You will need to hard code the location & name of the template file (sldbomtbt) in the Userform1 Code
The Excel side looks at column "F". if the cell in "F" is empty of "No", then the row is deleted. in the end only the rows with "Yes" in the "F" column remain.
If you want to change any of the excel stuff, everything is in the Excel_functions1 Module.
Hope this gets you partially where you want to go...with some tweaks..
Also i commented out some PDM vault code, its there if you need it, just un-comment it and alter as needed
If it's not already there, add a column in your BOM that calls out the "Laser Cut" property. Right-click at the top of the column and choose "Sort" from the drop-down. This should allow you to sort the BOM with all components having this property together at the top. Shirt+select the other rows, right-click, and choose Hide or Delete (personally I'd Hide, but it's up to you).
Thanks for you answer
I was thinking more of a Bom Template, that i would select and would only show parts with the "Laser Cut" property. The column is already there.
I don't believe there's any way to save a BOM template to show only components with a certain property, but someone may be able to write a macro to hide those rows automatically after the BOM is inserted. Or possibly run the macro in the Assembly, checking the box for "Exclude from bill of materials" in the Properties dialog box for those components. I know less than nothing about writing macros, but if you're interested in this you might Move this Discussion to the API section of the forum.
Or someone else might very well have a better idea.
I was planning to export the BOM to excel anyway, i will try moving it to the API section. Thanks for your help.
I have seen it done via a macro...
The macro i saw, was for a spare parts generator.
The most important thing was each detail you want to see has a custom property set to something particular. In this case ist was a custom property for "spare part"...variable would be "Yes"
The user would open their assembly, run the macro, the macro would generate a BOM based off of a predefined Special SolidWorks BOM Template. Then within the macro operation, it would delete all lines in the BOM that didn't have "Yes" in the "Spare Parts column. Then it saves the exported BOM as an Excel (xlsx)
Do you have the link to that macro?
It was something that was used at a previous company i was at, i should have something somewhere. I will look for it and let you know.
Thank you, i will wait
Do you have Microsoft excel, if so what version?
Yes i do, 2013
Create a configuration with just the components that are "laser cut"
Then when inserting the BOM, select the "Laser cut" components configuration to use to populate the BOM
Hi, thanks for your answer, but then i would have to create a configuration in each assembly i had to use the BOM. The intend for the BOM is that i could print the laser cut components and hand it over to the production along with the drawings so they could have a control on which parts were cut and which weren't. I need to have a practical and fast thing to use
Run this on the Assembly Model...
Thank you, that sure helps me. I'll change it and suit it to my needs
Just one more thing
The "OutPutPath" in the function has to be switched as well or will it pop up and ask in the end of the sub?
Oh, nevermind, i found it
Possible, i haven't used it in a few years we generate everything through EPDM, so i just pulled the macro off my library drive.
Hello! Bumped into the same problem, I need to make BOMs that include only parts that belong to a specific category defined by a Custom Property of the parts. For instance BOM of CNC machined parts or parts formed from sheet metal etc. One solutions is the mentioned above macro to sort and modify the excel table, I mean editing it and adapting it for every category I need and the second solution, I suppose, is what you said - generating the BOMs through EPDM. I'm having a hard time finding information how to do it though. Is there a chance you could give me some guidance? Thanks in advance.
The PDM version of the solution is to have Dispatch run the/a macro during a workflow transition.
Ok, i get it. Thank you. Which macro do you run during the workflow, the one that you attached above or another one especially made for the PDM system?
Its been a few years, i believe it was essentially the same but required some changes to fit the workflow and to integrate better and to work with dispatch.
Thanks a lot! Will try it! Have a nice day!
Retrieving data ...