Macro to Create Weldment via a User Field
Macro to Create Weldment via a User Field
(OP)
Hello everyone,
I am looking to automate our process here at my office to simplify the part creation process.
We use Weldments to create all of our tubular pieces in SOLIDWORKS but the process is absolutely abysmal for us and repetitive as we have only two CAD Engineers. We are currently typing the Description, Part Number (PDM)/Number, Material and Document Properties on our own and I'm looking to automate this.
Below are my requests:
-Macro in which a form will be shown to ask for the Part Profile desired to be used and the length in which we want the said part to be.
-Creation of Part Properties after the fact to include these properties; Date, Author, Revision, Description, Number, Material and Weight
-Part Number (PDM) and Number to autogenerate based off Part Profile selected and Length provided
-Possible Miter option in which a dropdown shows different cut styles and angles needed, we do Long to Long cuts and Long to Short.
Another option is to take our Part Number that we have in house and see if a part can be created based off that, what are some of your ideas or thoughts as we work through this here. We do part numbers to where if it's an Aluminum Tubing, it is named ALT24-.125-(Length of final product) so I have a feeling we can pull the names from Part Profiles and merge it with the form box length the person would enter. Since all 2" X 4" .125 thick tube would start with ALT24-.125, this may be simpler.
SOLIDWORKS 2020 Professional and PDM 2020 Professional but will be moving to 2024 shortly for reference.
I am looking to automate our process here at my office to simplify the part creation process.
We use Weldments to create all of our tubular pieces in SOLIDWORKS but the process is absolutely abysmal for us and repetitive as we have only two CAD Engineers. We are currently typing the Description, Part Number (PDM)/Number, Material and Document Properties on our own and I'm looking to automate this.
Below are my requests:
-Macro in which a form will be shown to ask for the Part Profile desired to be used and the length in which we want the said part to be.
-Creation of Part Properties after the fact to include these properties; Date, Author, Revision, Description, Number, Material and Weight
-Part Number (PDM) and Number to autogenerate based off Part Profile selected and Length provided
-Possible Miter option in which a dropdown shows different cut styles and angles needed, we do Long to Long cuts and Long to Short.
Another option is to take our Part Number that we have in house and see if a part can be created based off that, what are some of your ideas or thoughts as we work through this here. We do part numbers to where if it's an Aluminum Tubing, it is named ALT24-.125-(Length of final product) so I have a feeling we can pull the names from Part Profiles and merge it with the form box length the person would enter. Since all 2" X 4" .125 thick tube would start with ALT24-.125, this may be simpler.
SOLIDWORKS 2020 Professional and PDM 2020 Professional but will be moving to 2024 shortly for reference.
RE: Macro to Create Weldment via a User Field
Yes all this can be done by macro.
Do you create several part with one extrusion each, then do an assembly with those?
RE: Macro to Create Weldment via a User Field
Yeah, we will have multiple parts within an assembly all created out of weldments. These parts will range in part profile selection but all of the Tube's are created via weldments as a Part. We save each individual part/weldment under a unique name based off of the tube itself, these are then inputted into the assembly 1-by-1. I have a UserForm made with a basic layout of how I envisioned it to be but I thought this would be a good place to start. Below is a photo of what I am working towards currently:
The drop down for Material will be the material the part will be made out of, this list should be compiled of our Favorite Materials that I have set (I'd like this to fattach the selection to the part as well to take the step out of our process). The drop down for material is the weldments/part profiles we'd like to use in the part generation. VBA would then take said information and generate the part described with the fields, all parts will be generated in the same position.
RE: Macro to Create Weldment via a User Field
RE: Macro to Create Weldment via a User Field
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
RE: Macro to Create Weldment via a User Field
Gupta65, would I need to contact my vendor for my licenses to add this? Sorry new to DriveWorks!
Cheers,
LR
RE: Macro to Create Weldment via a User Field
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog