Search found 7 matches

by Wasermelone
Thu Jul 07, 2022 9:27 am
Forum: API
Topic: Save weldment as assembly macro
Replies: 7
Views: 1309

Save weldment as assembly macro

Hi everyone, I'm trying to write a macro that would save part that is made from weldments as an assembly. I'm trying to use the CreateSaveBodyFeature method but can't get it to work, it seems that I don't fully understand how this method works. Maybe someone knows a better solution on how to achieve...
by Wasermelone
Mon May 23, 2022 3:03 am
Forum: API
Topic: How to skip identical parts with GetComponents
Replies: 3
Views: 1098

Re: How to skip identical parts with GetComponents

I start by making a list of unique components and then loop through it. as demonstrated by the code below Option Explicit Sub main() Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swUniqueCompList() As SldWorks.Component2 Dim swComp As SldWorks.Component2 Dim vComp As Variant ...
by Wasermelone
Fri May 20, 2022 7:46 am
Forum: API
Topic: How to skip identical parts with GetComponents
Replies: 3
Views: 1098

How to skip identical parts with GetComponents

Hello everyone, I have written a macro that goes trough all components in the assembly and subassemblies and makes drawings from all the parts. However I have a problem that if the part is used more than once in a assembly (on the top level and/or in the subassembly) it makes a drawing for each inst...
by Wasermelone
Tue Mar 01, 2022 2:10 am
Forum: SW General
Topic: Toolbox/Smart fasteners problem
Replies: 2
Views: 1440

Re: Toolbox/Smart fasteners problem

So I have seem to figured out what the problem was. After changing hole standards to default DIN all of the items have appeared. It seems like custom holes didn't work properly with custom fasteners?
by Wasermelone
Mon Feb 28, 2022 8:10 am
Forum: SW General
Topic: Toolbox/Smart fasteners problem
Replies: 2
Views: 1440

Toolbox/Smart fasteners problem

Hello everyone, I have a problem regarding smart fasteners/toolbox. I have made custom toolbox components, they are just copied bolts and washers with changed names, config names and some added sizes. However when I'm trying to use smart fasteners command and add something to top or bottom stack it'...
by Wasermelone
Fri Dec 10, 2021 1:25 am
Forum: API
Topic: Macro for new file naming
Replies: 3
Views: 972

Re: Macro for new file naming

Thank you for responding! Can you tell me more about this? I'm really new into macros and don't know a lot of things.

Thank you.
by Wasermelone
Wed Dec 01, 2021 6:00 am
Forum: API
Topic: Macro for new file naming
Replies: 3
Views: 972

Macro for new file naming

Hello everyone, I have a macros that automatically names every new part or assembly created. For example- I choose template that names part- 100,101 etc. and other template names assembly- XX-1, XX-2 etc. However when making new part in assembly everything works fine, macros names part as it should,...