Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Macro to Create Weldment via a User Field

Status
Not open for further replies.

LeRepeteur

Mechanical
Jan 17, 2023
30
0
0
US
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.
 
Replies continue below

Recommended for you

Hello @fifiririloulou

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:

Screenshot_2024-03-15_145350_irl47c.png



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.
 
You can use DriveWorksXpress (free add-in inside SW) to do the same without the need for the macro. Just create a master model and then set that up with DWX. And when you want to create a new model, enter/pick the desired value and new model will be created. You can have drawing generated as well (you need to have a master drawing too for this).

Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog


 
Thanks FiFi, I'll get a message to you. I'm also under the same name there.

Gupta65, would I need to contact my vendor for my licenses to add this? Sorry new to DriveWorks!

Cheers,
LR
 
Status
Not open for further replies.
Back
Top