Search found 388 matches

by gupta9665
Mon Sep 16, 2024 10:13 am
Forum: SW General
Topic: Applying updated templates to old documents
Replies: 11
Views: 333

Re: Applying updated templates to old documents

Sorry, but I do not think there is any other alternative. There might be some paid tools available but there won't be any less costly version.
by gupta9665
Sun Sep 15, 2024 11:02 am
Forum: SW General
Topic: Maintaining projects in multiple languages
Replies: 4
Views: 216

Re: Maintaining projects in multiple languages

It's the actual people/user downloading the macro. And since it is a weekend, may be we did not bothered to reply. And glad to know that you have found a solution, I was thinking to link to a Chinese to English macro for ideas https://forum.solidworks.com/thread/240672 https://www.youtube.com/watch?...
by gupta9665
Sun Sep 15, 2024 10:56 am
Forum: SW General
Topic: Applying updated templates to old documents
Replies: 11
Views: 333

Re: Applying updated templates to old documents

Have you tried insert part into part, and then breaking the link?
by gupta9665
Sat Sep 14, 2024 1:12 pm
Forum: Macro Library
Topic: Macro request
Topic: Macro request
Replies: 2
Views: 170

Re: Macro request

Select the desired features, and run the following codes. Please try on sample files first. Also not much error handling is added. Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swSelMgr As SldWorks.SelectionMgr Dim swFeat As SldWorks.Feature Dim selCount As Long Dim i As Long ...
by gupta9665
Wed Sep 11, 2024 1:02 am
Forum: API
Topic: Save weldment as assembly macro
Replies: 7
Views: 1091

Re: Save weldment as assembly macro

You can try getting the color for each body into an array. And once bodies are exported as parts, you can reapply the colors to them with values from the array.
by gupta9665
Wed Sep 11, 2024 12:58 am
Forum: API
Topic: Editing Config Specific Props from BOM question
Replies: 3
Views: 164

Re: Editing Config Specific Props from BOM question

AlexB, I'm opening the parts/assemblies as I'm going through a drawing BOM. I managed to get my code working today, much like I described. Now, to move them to the vault and check them in and figure out how the PDM API... Thank you for your offer of help. I might just take that you up on that. Plea...
by gupta9665
Tue Sep 03, 2024 7:17 am
Forum: API
Topic: Save weldment as assembly macro
Replies: 7
Views: 1091

Re: Save weldment as assembly macro

Thanks Gupta, this is close enough. However, there are still isssues I need to address. -It works for solid bodies but not for the cut list. -I want to use the Cut List folder name as the file name -I want to maintain the color that is set during the creation of the part. You may check this post fo...
by gupta9665
Mon Sep 02, 2024 12:58 pm
Forum: API
Topic: Save weldment as assembly macro
Replies: 7
Views: 1091

Re: Save weldment as assembly macro

by gupta9665
Sun Aug 11, 2024 2:09 pm
Forum: How To Questions
Topic: Display state sub-pane not sticking after modifying
Replies: 1
Views: 303

Re: Display state sub-pane not sticking after modifying

It is hard coded, and can not be changed.
by gupta9665
Thu Aug 08, 2024 12:31 pm
Forum: SW General
Topic: 256 character limit
Replies: 10
Views: 1115

Re: 256 character limit

It's a window limit unfortunately. And file extension is counted as well.
by gupta9665
Thu Aug 01, 2024 12:13 pm
Forum: SW General
Topic: I Learned Something Today
Replies: 3
Views: 580

Re: I Learned Something Today

Same is applicable for vertex option as well, just select the desired vertex without changing the end condition.

You can also RMB in the graphics area and select the desired end condition.
by gupta9665
Thu Jul 18, 2024 11:46 am
Forum: Welcome
Topic: import .dwg file to solidworks part file
Replies: 2
Views: 1098

Re: import .dwg file to solidworks part file

I do not see any codes in the API for this option. So I believe this is not implemented yet. Kindly email to your VAR to send this request. One workaround may be to put each sketch on their own sheet in the DXF file. And during importing, you can specify which sheet to import. And if this works, you...
by gupta9665
Wed Jul 17, 2024 1:55 am
Forum: How To Questions
Topic: Macro to change custom properties
Replies: 18
Views: 5624

Re: Macro to change custom properties

sooz wrote: Tue Jul 16, 2024 5:19 pm Is there a version of this that I can apply specific text to all cutlist items in a part file? This seems geared towards assembly files only. Thanks Deepak!
You can check the codes from the cut list related macros here https://www.codestack.net/solidworks-tools/#cut-list by @Artem
by gupta9665
Wed Jul 17, 2024 1:50 am
Forum: How To Questions
Topic: Macro to change custom properties
Replies: 18
Views: 5624

Re: Macro to change custom properties

Thanks for the update Deepak. I noticed that this only adds the custom property to the components of the top assembly. Any thoughts on how to add also to the components of sub-assemblies in the top assembly? Sorry for a late response (have missed your reply). The codes works for all components in t...
by gupta9665
Tue Jul 16, 2024 1:09 am
Forum: How To Questions
Topic: How to use "Delete/Keep Body" command in Sheet Metal Flatten mode?
Replies: 6
Views: 1001

Re: How to use "Delete/Keep Body" command in Sheet Metal Flatten mode?

No possible at the moment as you can have only one body flattened at a time.
by gupta9665
Mon Jul 15, 2024 4:50 am
Forum: API
Topic: Adding Custom material using SetMaterialPropertyName2
Replies: 2
Views: 789

Re: Adding Custom material using SetMaterialPropertyName2

I changed my material database name from Materials to SWaterials (such that it is not similar to default database names), it starts to work OK.

Thank you for your inputs @josh
by gupta9665
Sat Jul 13, 2024 10:17 am
Forum: SW General
Topic: Migrating legacy data with Z up to SW
Replies: 11
Views: 1651

Re: Migrating legacy data with Z up to SW

Try export the assembly as SW part, and then convert that multi bodies part into an SW assembly.
by gupta9665
Sun Jul 07, 2024 1:03 am
Forum: How To Questions
Topic: Mass delete property in weldment design table / configurations
Replies: 1
Views: 745

Re: Mass delete property in weldment design table / configurations

When you delete a property column in the design table, it won't automatically delete them. So if you are looking to delete the properties from bunch of files, you could create a macro to delete them.
by gupta9665
Sun Jul 07, 2024 1:01 am
Forum: API
Topic: Macro won't run if...
Replies: 5
Views: 1263

Re: Macro won't run if...

I have not seen this behavior earlier, so will it be possible for you to share your screen and show the issue?
by gupta9665
Fri Jul 05, 2024 10:01 am
Forum: API
Topic: Adding Custom material using SetMaterialPropertyName2
Replies: 2
Views: 789

Adding Custom material using SetMaterialPropertyName2

I'm trying to add a custom material from a material database which is on a network drive. Below is the line I'm using to add the desired material. And it is not working. If I move the material to default location a swPart.SetMaterialPropertyName2 sConfigName, "\\Master Material File\materials.s...
by gupta9665
Wed Jul 03, 2024 2:54 am
Forum: SW General
Topic: 2024 Install Failure
Replies: 8
Views: 1497

Re: 2024 Install Failure

This issue is due to FLEXnet licensing service included with SOLIDWORKS 2024. Read this information to find the solution https://www.goengineer.com/blog/current ... tion-error
by gupta9665
Tue Jul 02, 2024 2:32 am
Forum: Macro Library
Topic: Feature History (Whodunnut?)
Replies: 3
Views: 850

Re: Feature History (Whodunnut?)

josh wrote: Mon Jul 01, 2024 1:17 pm Ouch! Crashed drive is no fun! Hope you didn't lose too much other stuff!
Well lot of stuff was lost, along with some wonderful macros and standalone tools. But I think it is part of life!!
by gupta9665
Mon Jul 01, 2024 11:49 am
Forum: Macro Library
Topic: Feature History (Whodunnut?)
Replies: 3
Views: 850

Re: Feature History (Whodunnut?)

I recall making a similar tool many moons back, and that was destroyed with the crashed drive :(

Thank you for sharing.
by gupta9665
Tue Jun 25, 2024 2:33 pm
Forum: API
Topic: Renaming a Mate with VBA
Replies: 18
Views: 1245

Re: Renaming a Mate with VBA

Are you missing "=" in this line

Code: Select all

arrayMates(X).Name =  Left(swComp.Name, InStr(swComp.Name, "-") - 1) & "+" & arrayMates(X).Name
by gupta9665
Tue Jun 25, 2024 1:34 am
Forum: API
Topic: Renaming a Mate with VBA
Replies: 18
Views: 1245

Re: Renaming a Mate with VBA

Can you please share the complete macro to debug?
by gupta9665
Mon Jun 24, 2024 2:16 pm
Forum: API
Topic: Renaming a Mate with VBA
Replies: 18
Views: 1245

Re: Renaming a Mate with VBA

timied07 wrote: Sun Jun 23, 2024 3:13 pm
How do I push the name update back to SolidWorks?
Try force rebuild to reflect the new names.
by gupta9665
Sun Jun 23, 2024 11:57 am
Forum: API
Topic: Renaming a Mate with VBA
Replies: 18
Views: 1245

Re: Renaming a Mate with VBA

Use swFeature.GetTypeName2 to get if the type is Mate, and then use swFeature.Name to rename the mates.
by gupta9665
Thu Jun 06, 2024 4:46 am
Forum: SW General
Topic: Carryover of saved custom views
Replies: 14
Views: 1617

Re: Carryover of saved custom views

Here are the quick codes to delete all named views int he active model file. No error handling has been added. Option Explicit Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim vModelViewNames As Variant Dim i As Long Dim Errors As Long Dim Warnings As Long Sub Main() Set swApp = ...
by gupta9665
Wed Jun 05, 2024 1:45 pm
Forum: SW General
Topic: Carryover of saved custom views
Replies: 14
Views: 1617

Re: Carryover of saved custom views

I often run into this issue and now planning to make a macro to delete all the named views. May further enhance the macro to show the list and let the user select the one he/she desires to delete.
by gupta9665
Fri Apr 26, 2024 3:36 pm
Forum: SW General
Topic: Setting Image Quality For All Parts in an Assembly
Replies: 13
Views: 2556

Re: Setting Image Quality For All Parts in an Assembly

Yes you need to have write access to the files as you will be changing and then saving the files.
by gupta9665
Sun Apr 14, 2024 9:17 am
Forum: Macro Library
Topic: Some (hopefully) useful macros
Replies: 2
Views: 1301

Re: Some (hopefully) useful macros

Thank you for sharing!!
by gupta9665
Tue Mar 26, 2024 4:52 am
Forum: API
Topic: PDM Checkin with API
Replies: 7
Views: 1360

Re: PDM Checkin with API

Not much expertise with PDM API but you will have to check out the existing file first (using lockfile method) and ad your file to PDM and release (unlockfile).
by gupta9665
Sat Mar 23, 2024 2:42 am
Forum: How To Questions
Topic: How to calculate only external surface area?
Replies: 14
Views: 6628

Re: How to calculate only external surface area?

jasonwilger wrote: Wed Mar 20, 2024 5:47 pm The 3d content central does not work for newer Solidworks versions. Is there a newer macro for the updated releases?
I tested it on 2022, and it worked as expected. So, would like to ask if you are getting any errors?
by gupta9665
Wed Mar 20, 2024 2:37 am
Forum: How To Questions
Topic: How to find the version of the SLDPart file?
Replies: 21
Views: 2567

Re: How to find the version of the SLDPart file?

The key is given free but the subscription is not. If I'm understanding his situation correctly, he does not have a SolidWorks licence and is trying to work around that to somewhat work with SolidWorks files. OP mentioned that there are other CAD readers that can access SolidWorks types. So I assum...
by gupta9665
Tue Mar 19, 2024 3:00 pm
Forum: How To Questions
Topic: How to find the version of the SLDPart file?
Replies: 21
Views: 2567

Re: How to find the version of the SLDPart file?

How is that not saying the same thing? If you need an active subscription... than perhaps we are just splitting hairs of my wording. Are you saying it does not have significant cost that I would need to propose to my superiors? The key is given free. If you do not plan to upgrade or pay subscriptio...
by gupta9665
Tue Mar 19, 2024 7:35 am
Forum: How To Questions
Topic: How to find the version of the SLDPart file?
Replies: 21
Views: 2567

Re: How to find the version of the SLDPart file?

robertkjr3d wrote: Mon Mar 18, 2024 5:00 pm SolidWorks Document Manager API, also requires a License.
No it does not but you need to have SolidWorks Document Manager key and SolidWorks Document Manager installed on machine having no Solidworks.

The SolidWorks Document Manager key is provided only to customer on active subscription.
by gupta9665
Sat Mar 16, 2024 12:55 pm
Forum: How To Questions
Topic: How to find the version of the SLDPart file?
Replies: 21
Views: 2567

Re: How to find the version of the SLDPart file?

You might get this information using SolidWorks Document Manager API.
by gupta9665
Fri Mar 15, 2024 12:59 pm
Forum: SW General
Topic: Sheet Metal Parcel Boxes
Replies: 6
Views: 1295

Re: Sheet Metal Parcel Boxes

you can do tabs and slots to interlock pieces and avoid some fasteners. Also depending on the size and how much scrap you want to make you can make a full size box from a single piece. image.png This is a corner of a door I made, it's a miter flange all the way around. Usually the limitations are b...
by gupta9665
Fri Mar 15, 2024 12:58 pm
Forum: SW General
Topic: Sheet Metal Parcel Boxes
Replies: 6
Views: 1295

Re: Sheet Metal Parcel Boxes

This maybe too big: https://www.continest.com/ https://rackandshelf.com/product/storage-products/automotive/automotive-containers/collapsible-steel-containers/ https://www.steelking.com/products/collapsible-containers/ https://www.shippingcontainersuk.com/brands/foldable-steel-storage-containers.ph...
by gupta9665
Wed Mar 13, 2024 2:17 pm
Forum: SW General
Topic: Sheet Metal Parcel Boxes
Replies: 6
Views: 1295

Re: Sheet Metal Parcel Boxes

By knock-down, you mean broken down into parts? Is there any complexity to the box? If you could give more info I'll try and give some pointers. I guess it depends a lot on what the intent is. For instance we started by making our airboxes with each faces individually so that we could have a more e...
by gupta9665
Wed Mar 13, 2024 1:39 pm
Forum: SW General
Topic: Sheet Metal Parcel Boxes
Replies: 6
Views: 1295

Sheet Metal Parcel Boxes

Not a SolidWorks related question but looking on ideas/recommendations to design sheet metal parcel boxes which can be knock-down easily. Here is one which looks close. So looking for ideas on internal structure. And also how to assembly from inside only (without the fasteners being visible from out...
by gupta9665
Tue Mar 12, 2024 2:37 am
Forum: SW General
Topic: Batch Rename Bodies
Replies: 3
Views: 1101

Re: Batch Rename Bodies

zwei wrote: Tue Mar 12, 2024 12:22 am Thanks!

I was actually looking for a simpler and more flexible workflow (multiple select → rename, auto add prefix)... guess i need to create my own macro :|
I have made a customized one for a customer, so won't be able to share for free :roll:

I recall seeing more on the SW forums.
by gupta9665
Mon Mar 11, 2024 3:22 am
Forum: SW General
Topic: Batch Rename Bodies
Replies: 3
Views: 1101

Re: Batch Rename Bodies

Macro can do it.

Here is one from @Artem https://www.codestack.net/solidworks-ap ... st-bodies/
by gupta9665
Fri Mar 08, 2024 1:54 pm
Forum: SW General
Topic: Date change macro
Replies: 5
Views: 1230

Re: Date change macro

The macro I have shared above should work OK.

Did you changed the number in below line to Date?

cpm.Add3 "Number", swCustomInfoText, mValue, 1
by gupta9665
Fri Mar 08, 2024 1:07 pm
Forum: SW General
Topic: Date change macro
Replies: 5
Views: 1230

Re: Date change macro

Can you share one sample file to understand?
by gupta9665
Thu Mar 07, 2024 12:11 pm
Forum: How To Questions
Topic: Macro to change custom properties
Replies: 18
Views: 5624

Re: Macro to change custom properties

I just ran across this post and the original code to add a custom property "number" is just what I was looking for. But I would like to have it prompt for two different numbers to add. Sorry, missed your post and just found it today only. There are 2 ways: 1. You can add the number in the...
by gupta9665
Thu Mar 07, 2024 12:07 pm
Forum: SW General
Topic: Date change macro
Replies: 5
Views: 1230

Re: Date change macro

by gupta9665
Wed Feb 28, 2024 4:59 am
Forum: How To Questions
Topic: PROFILE CUTTING OPTIMIZATION CALCULATION
Replies: 5
Views: 3189

Re: PROFILE CUTTING OPTIMIZATION CALCULATION

Thank you for sharing.
by gupta9665
Tue Feb 27, 2024 11:13 am
Forum: How To Questions
Topic: Body Mass in Part
Replies: 10
Views: 1168

Re: Body Mass in Part

You can use GetMassProperties Method (IBody2) method.

https://help.solidworks.com/2021/englis ... rties.html
by gupta9665
Tue Feb 27, 2024 12:57 am
Forum: Macro Library
Topic: Save PDF to PDM
Replies: 16
Views: 2942

Re: Save PDF to PDM

When we save a PDF into a PDM folder it automatically adds to the vault based on our settings in PDM for adding file types. We only have PDM Standard so can't do PDM macros, but our save as PDF SolidWorks macro, puts the PDF in the right folder. The setting adds it. We then just have to check it in...