Search found 420 matches

by gupta9665
Thu Dec 12, 2024 5:53 am
Forum: How To Questions
Topic: Change multi-sheet DWG export names
Replies: 1
Views: 152

Re: Change multi-sheet DWG export names

This is hard coded inside the software, and will give same results with the manual export. But you can use a macro to export the files with the desired names.
by gupta9665
Wed Dec 11, 2024 1:50 pm
Forum: CAM
Topic: SolidWorks Cam Vba
Replies: 2
Views: 440

Re: SolidWorks Cam Vba

You may find some Cam related macro here https://www.3dcontentcentral.com/Search ... tor=Macros
by gupta9665
Wed Dec 11, 2024 2:51 am
Forum: API
Topic: API help needed
Replies: 8
Views: 518

Re: API help needed

SWE runs inside SW only when you do the drawings. Share some files and pictures to explain what you are trying to accomplish.
by gupta9665
Tue Dec 10, 2024 11:41 pm
Forum: Macro Library
Topic: Macro help to display part of filename
Replies: 9
Views: 908

Re: Macro help to display part of filename

Deepak, Rather than plugging this into another property within the drawing/part, would it be possible to create a property that is linked to the filename but always displays the number after the dash? This way it is always up-to-date regardless of if the filename has changed. This can only be done ...
by gupta9665
Mon Dec 02, 2024 3:56 am
Forum: SW General
Topic: 3D to web browser
Replies: 5
Views: 414

Re: 3D to web browser

Composer SVG file might work without the need to download.

There was a plugin available called COLORWAY but it is retired now I believe. Also check this one https://www.webrotate360.com/

Other option is to create 360° images of the model, and upload to the website.
by gupta9665
Mon Dec 02, 2024 2:29 am
Forum: How To Questions
Topic: How to calculate only external surface area?
Replies: 16
Views: 8714

Re: How to calculate only external surface area?

What SW version you are currently using? And are you running the macro from macro button, via editor or keyboard shortcut? Make sure you run the main sub only.
by gupta9665
Sat Nov 30, 2024 1:53 pm
Forum: API
Topic: How to quickly identify unused variables?
Replies: 1
Views: 276

Re: How to quickly identify unused variables?

For vba macros, I comment out most of them (except the few which I can easily spot) and add Option Explicit at the top. Now when running the macro, SW will prompt for the undefined variables, and I remove comment from them. And keep on doing it until all done. There are some tools available, but I h...
by gupta9665
Wed Nov 27, 2024 10:26 am
Forum: Macro Library
Topic: Macro help to display part of filename
Replies: 9
Views: 908

Re: Macro help to display part of filename

Replace this line Set swCustPropMgr = swModel.Extension.CustomPropertyManager("Default") with If swModel.GetType = 3 Then Set swCustPropMgr = swModel.Extension.CustomPropertyManager("") Else Set swCustPropMgr = swModel.Extension.CustomPropertyManager("Default") End If A...
by gupta9665
Wed Nov 27, 2024 1:35 am
Forum: SW General
Topic: Hide All Sketches Macro
Replies: 17
Views: 4182

Re: Hide All Sketches Macro

Ömür Tokman wrote: Tue Nov 26, 2024 1:21 pm Wow I didn't know there was a second version. I don't know the difference between the two. If you have the second version, can you share it?
The first version was crashing new versions of SW as far as I remember. Here is link to version 2 https://www.esoxrepublic.com/freeware/BlankDatums2.php
by gupta9665
Tue Nov 26, 2024 12:09 pm
Forum: SW General
Topic: Hide All Sketches Macro
Replies: 17
Views: 4182

Re: Hide All Sketches Macro

Ömür Tokman wrote: Tue Nov 26, 2024 2:32 am Maybe a little late reply but it is a very useful macro, I recommend it.



BlankDatums.swp

obAxM5e_d.jpg
Make sure you are using version 2 of this macro.
by gupta9665
Sat Nov 23, 2024 8:47 am
Forum: Macro Library
Topic: Macro help to display part of filename
Replies: 9
Views: 908

Re: Macro help to display part of filename

Here is another version, it can be simplified but I prefer it. Option Explicit Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim FileName As String Sub main() Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc FileName = swModel.GetPathName FileName = Mid(FileName, InS...
by gupta9665
Sat Nov 23, 2024 8:46 am
Forum: Macro Library
Topic: Batch file renaming with filters (Pack and Go)
Replies: 2
Views: 407

Re: Batch file renaming with filters (Pack and Go)

I have seen Pack and GO macro but have not seen a one that suits your case. But it can be made.
by gupta9665
Sat Nov 23, 2024 8:42 am
Forum: SW General
Topic: Top Ten List Live
Replies: 52
Views: 3572

Re: Top Ten List Live

AlexLachance wrote: Fri Nov 22, 2024 11:00 am Link doesn't work. Seems the community is private perhaps

image.png
I'm able to enter thru the back door, but then I can not submit the idea as I get timeout error hhhh
by gupta9665
Wed Nov 13, 2024 12:59 am
Forum: Macro Library
Topic: Automated part numbering
Replies: 6
Views: 935

Re: Automated part numbering

Check the macro by @artem here
by gupta9665
Sun Nov 10, 2024 11:41 pm
Forum: How To Questions
Topic: sketch for etch not showing on SM DXF file
Replies: 6
Views: 821

Re: sketch for etch not showing on SM DXF file

Open a new drawing, and make sure sketches are set to show. Delete sheet format or anything from the drawing, and save as drawing template (may be name as DXF). Make sure sheet/template scale is set to 1:1, and you can also have the bend lines set to show. Finally set this template as the default te...
by gupta9665
Sat Nov 09, 2024 12:01 am
Forum: SW General
Topic: Equation function "INT" doesn't seem to work
Replies: 16
Views: 1932

Re: Equation function "INT" doesn't seem to work

You may have to use a macro that counts the total sheet, subtract 1 and update the custom property. Downside, run macro every time you add/remove a sheet. A macro or add-in to run in the background and act on file save might help updating the sheet count.
by gupta9665
Wed Nov 06, 2024 4:39 am
Forum: SW General
Topic: Colored Drawings
Replies: 27
Views: 3117

Re: Colored Drawings

The hatch color is controlled by the layer unless some overwrite it by unchecking the default checkbox in the line color window, and/or selecting a different color. See below image. Once you select the default option, the hatch will use the layer color. Line Color.png And I'm getting the correct col...
by gupta9665
Tue Oct 29, 2024 11:02 pm
Forum: How To Questions
Topic: How to unselect "Display sheet Format" in VBA
Replies: 6
Views: 724

Re: How to unselect "Display sheet Format" in VBA

You need to get the current sheet, and then turn off the sheet format visibility. Try Option Explicit Dim swApp As SldWorks.SldWorks Dim swModel As ModelDoc2 Dim currentsheet As Sheet Dim boolstatus As Boolean Sub main() Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc boolstatus = Par...
by gupta9665
Mon Oct 28, 2024 6:48 am
Forum: Macro Library
Topic: Macro to delete tree features
Replies: 12
Views: 1510

Re: Macro to delete tree features

You would need to change the macro reference libraries to suit your SW version. Check this video
by gupta9665
Fri Oct 11, 2024 12:25 pm
Forum: Macro Library
Topic: Macro: Delete Empty Sheet(s)
Replies: 0
Views: 381

Macro: Delete Empty Sheet(s)

Here's another #SOLIDWORKS #macro requested by the #community. This macro deletes empty sheets from the currently active drawing. There are two versions available: 1. V1 deletes all sheets that have no views but keeps sheets with empty views or views with missing models. 2. V2 deletes sheets with no...
by gupta9665
Mon Oct 07, 2024 2:52 pm
Forum: How To Questions
Topic: Shaded with edges view, saves to PDF as shaded.
Replies: 7
Views: 1161

Re: Shaded with edges view, saves to PDF as shaded.

Check if view display is set to high quality. You click on the view and check the view property manager, and under display state/tyle, you will see the high quality toggle.
by gupta9665
Mon Oct 07, 2024 11:36 am
Forum: API
Topic: How to add configuration-specific Cut List properties?
Replies: 12
Views: 1317

Re: How to add configuration-specific Cut List properties?

I believe this is not yet supported thru API. Reach out to your VAR, and ask them to verify.

Here is a similar post https://r1132100503382-eu1-3dswym.3dexp ... mDbQAjb8mQ
by gupta9665
Mon Oct 07, 2024 6:20 am
Forum: SW General
Topic: How to attach a note to a dimension
Replies: 16
Views: 2188

Re: How to attach a note to a dimension

Make sure the Note is attached to the view in which you have the hole callout. And only then group option will show up.
by gupta9665
Mon Oct 07, 2024 3:53 am
Forum: SW General
Topic: How to attach a note to a dimension
Replies: 16
Views: 2188

Re: How to attach a note to a dimension

You can place a note below the dimension line, and then can group the hole callout and that note.
by gupta9665
Mon Oct 07, 2024 2:42 am
Forum: SW General
Topic: How to attach a note to a dimension
Replies: 16
Views: 2188

Re: How to attach a note to a dimension

You can type the desired text in the dimension property manager. I had been doing this since a long time.
Hole Callout.png
by gupta9665
Mon Sep 30, 2024 9:45 am
Forum: API
Topic: Non-existent cut-list members found while iterating over
Replies: 4
Views: 669

Re: Non-existent cut-list members found while iterating over

I always reply on body count as SW API will count for hidden items as well.
by gupta9665
Sun Sep 29, 2024 11:09 pm
Forum: SW General
Topic: Sheet Metal Mirror Issue, Help Please
Replies: 2
Views: 599

Re: Sheet Metal Mirror Issue, Help Please

Seems to be working OK for me. Can you share the file with mirror feature added?
by gupta9665
Fri Sep 27, 2024 6:28 am
Forum: How To Questions
Topic: Cannot copy a pattern on a drawing
Replies: 3
Views: 624

Re: Cannot copy a pattern on a drawing

Sorry reread your initial post. I think the best would be to make a block of the lines and then pattern the block using copy/paste method.
by gupta9665
Fri Sep 27, 2024 3:07 am
Forum: How To Questions
Topic: Cannot copy a pattern on a drawing
Replies: 3
Views: 624

Re: Cannot copy a pattern on a drawing

Use sketch pattern instead in drawings.
by gupta9665
Wed Sep 25, 2024 11:51 am
Forum: API
Topic: Non-existent cut-list members found while iterating over
Replies: 4
Views: 669

Re: Non-existent cut-list members found while iterating over

This is a issue with API, as it would count the bodies even if you have deleted (using delete feature) them. So you would need to check the body count for each cut list, and if it is great than 0, then only add the ID value.
by gupta9665
Mon Sep 23, 2024 2:18 pm
Forum: Macro Library
Topic: New or exsisting macro
Replies: 4
Views: 806

Re: New or exsisting macro

Thanks for the help Deepak. I downloaded it and ran it but it did nothing. Is there any restriction on where the file needs to be or anything else that stop it from running? It should work on active file. Make sure you have set the references correctly to your installed version. Refer this video ht...
by gupta9665
Sun Sep 22, 2024 4:04 am
Forum: Macro Library
Topic: New or exsisting macro
Replies: 4
Views: 806

Re: New or exsisting macro

Try the attached macro, does not delete unused features/parts but covers rest others.
by gupta9665
Mon Sep 16, 2024 10:13 am
Forum: SW General
Topic: Applying updated templates to old documents
Replies: 25
Views: 3043

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: 5
Views: 936

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: 25
Views: 3043

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: 581

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: 1664

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: 589

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: 1664

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: 1664

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: 510

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: 2358

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: 1045

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: 1443

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: 7271

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: 7271

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: 1598

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: 1139

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: 2295

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: 944

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.