Search found 359 matches

by gupta9665
Fri Apr 26, 2024 3:36 pm
Forum: SW General
Topic: Setting Image Quality For All Parts in an Assembly
Replies: 2
Views: 110

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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: 14
Views: 3062

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

Re: Date change macro

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

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

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: 14
Views: 1399

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...
by gupta9665
Fri Feb 23, 2024 3:01 am
Forum: Macro Library
Topic: Save PDF to PDM
Replies: 14
Views: 1399

Re: Save PDF to PDM

Thank you I'll check these out.
by gupta9665
Thu Feb 22, 2024 2:10 pm
Forum: Macro Library
Topic: Save PDF to PDM
Replies: 14
Views: 1399

Re: Save PDF to PDM

Thank you for sharing the video, I have already checked and in the video the codes works OK because file is already there in the vault and visible. In my case, it show up only after refreshing manually. And I believe this is the reason that file is always nothing.
by gupta9665
Thu Feb 22, 2024 2:06 pm
Forum: Macro Library
Topic: Read filename and folder
Replies: 1
Views: 186

Re: Read filename and folder

Thank you for sharing.
by gupta9665
Thu Feb 22, 2024 11:52 am
Forum: Macro Library
Topic: Save PDF to PDM
Replies: 14
Views: 1399

Re: Save PDF to PDM

Just an idea...you could also do a check-in for the exported files...PDM has quite nice support for VBA I'm trying to check-in an exported PDF file (which is saved locally into the vault) but it is not working. Can you please guide? Thank you. Here are the codes I'm trying to use Dim bRetval As Boo...
by gupta9665
Tue Feb 20, 2024 10:29 am
Forum: SW General
Topic: Solidworks World...........errrr, 3D Experience World Videos
Replies: 16
Views: 806

Re: Solidworks World...........errrr, 3D Experience World Videos

Any good stuff in the "What's coming in SW25" sketch they normally do at World? Few I remember: 1. Multibodies fillets and chamfer 2. Planes/Axis can be patterned now 3. Change sketch block color on fly (during insert) 4. Instance to vary now have option to offset/vary the value from othe...
by gupta9665
Sun Feb 18, 2024 11:40 am
Forum: Macro Library
Topic: Oddball text question
Replies: 4
Views: 286

Re: Oddball text question

I have seen issues with the double quotes using similar process, so I type them and then all is good. So, check if this is the case with your line.
by gupta9665
Fri Feb 16, 2024 12:30 am
Forum: API
Topic: macro features: what are they for?
Replies: 6
Views: 730

Re: macro features: what are they for?

That sounds good. What form does the training take? Do you receive documents, manuals and work through the chapters on your own, or is it like a webinar where the learning content is presented and demonstrated? There are online video for the chapters which you can follow along, And you also get exa...
by gupta9665
Thu Feb 15, 2024 6:19 am
Forum: 2D Drawings
Topic: new drawing disable new model view on creation
Replies: 15
Views: 412

Re: new drawing disable new model view on creation

mp3-250 wrote: Thu Feb 15, 2024 4:53 am make drawing from part-assrmbly
Well in this case, the behavior is correct i.e. SW will start the model view creation. And in case you directly start a drawing using FIle > New, then you should not get the model view option if you have the option unchecked.
by gupta9665
Thu Feb 15, 2024 4:23 am
Forum: 2D Drawings
Topic: new drawing disable new model view on creation
Replies: 15
Views: 412

Re: new drawing disable new model view on creation

no luck. when I reset solidworks to our defauts the model view creation is disable in both the ui and the registry, but still show the creation dialog when making a new drawing. I am at loss. Are you making the drawing from a model using Make Drawing option or using File > New to start a new drawing?
by gupta9665
Thu Feb 15, 2024 4:07 am
Forum: API
Topic: macro features: what are they for?
Replies: 6
Views: 730

Re: macro features: what are they for?

At CADSharp you can book a training course on the macro feature. https://www.cadsharp.com/solidworks-api-video-tutorials/lesson-7-5-vba/ I haven't booked it myself yet, but I'm thinking about giving it a try. Does anyone know this course and has completed it? I can vouch for the training content on...
by gupta9665
Wed Feb 14, 2024 2:46 am
Forum: API
Topic: Macro for Renaming all Sketches
Replies: 8
Views: 419

Re: Macro for Renaming all Sketches

Here is a quick (dirty) macro that does the job. Sub Mian() Dim swApp As SldWorks.SldWorks Dim swPart As SldWorks.PartDoc Dim swFeat As SldWorks.Feature Dim swSubFeature As SldWorks.Feature Dim FeatureName As String Dim i As Integer Set swApp = Application.SldWorks Set swPart = swApp.ActiveDoc Set s...
by gupta9665
Mon Feb 12, 2024 8:40 am
Forum: 2D Drawings
Topic: new drawing disable new model view on creation
Replies: 15
Views: 412

Re: new drawing disable new model view on creation

mp3-250 wrote: Mon Feb 12, 2024 7:37 am thanks @gupta9665 I wonder where that setting is saved. I suspect the registry key above. I will test tomorrow at work.
Yes it is under the reg key stated by @RonE
by gupta9665
Mon Feb 12, 2024 6:52 am
Forum: 2D Drawings
Topic: new drawing disable new model view on creation
Replies: 15
Views: 412

Re: new drawing disable new model view on creation

Did you tried this setting?
image.png
by gupta9665
Sun Feb 11, 2024 6:38 am
Forum: 2D Drawings
Topic: Title template
Replies: 1
Views: 124

Re: Title template

The attachment seems t be missing, kindly attach again.
by gupta9665
Fri Feb 09, 2024 12:09 pm
Forum: Macro Library
Topic: Macro to Initialize Unity and Customs properties
Replies: 2
Views: 262

Re: Macro to Initialize Unity and Customs properties

In addition I would advise to simply the codes, remove all unwanted lines, make separate sub/function for repeated tasks, for e.g. adding the properties. This way you can fix the macro and make it more robust.
by gupta9665
Thu Feb 08, 2024 12:12 am
Forum: API
Topic: loop with enumerators In VBA
Replies: 4
Views: 308

Re: loop with enumerators In VBA

mp3-250 wrote: Tue Feb 06, 2024 2:58 pm codestack has something similar in VB.NET unfortunately I am not a programmer and my company would need to buy a visual studio license for me to "play" with this.
You can install the free community license at home to play with.
by gupta9665
Wed Feb 07, 2024 1:44 am
Forum: API
Topic: Macro for Renaming all Sketches
Replies: 8
Views: 419

Re: Macro for Renaming all Sketches

There is a macro to hide all sketches in a model but I have not seen a one to rename them based on their feature name. This one will have to be made.
by gupta9665
Tue Feb 06, 2024 7:19 am
Forum: API
Topic: loop with enumerators In VBA
Replies: 4
Views: 308

Re: loop with enumerators In VBA

I do not think that you can loop through them and will have to read them one by one only with separate line of code.
by gupta9665
Tue Jan 30, 2024 2:41 am
Forum: Macro Library
Topic: Save PDF to PDM
Replies: 14
Views: 1399

Re: Save PDF to PDM

Would it be easy to do the same with STEP file? Yes. Change sFileName = PDMPath + sFolderName & "\" + sFileName + ".PDF" to sFileName = PDMPath + sFolderName & "\" + sFileName + ".STEP" and change swModel.Extension.SaveAs3 sFileName, swSaveAsCurrentVe...
by gupta9665
Tue Jan 23, 2024 11:11 am
Forum: API
Topic: link sketch dimension with custom property
Replies: 5
Views: 592

Re: link sketch dimension with custom property

I read your post of the 3DSYM forums as well. ANd here is what I replied You need to get the fillet dimension name after it has been created. And then link it with the property name and not it's value. So you will have to actually create an equation using the API. Here is the line of code you may ne...
by gupta9665
Tue Jan 23, 2024 3:20 am
Forum: API
Topic: link sketch dimension with custom property
Replies: 5
Views: 592

Re: link sketch dimension with custom property

the sketch could be randomly deleted and recreated multiple times during the design phase. Is it possible to name the fillet dimension the same way every time and keep the link? The complete dimension name in a sketch is dim name @ Sketch name. So you will have to rename both the sketch, and fillet...
by gupta9665
Mon Jan 22, 2024 12:14 pm
Forum: API
Topic: link sketch dimension with custom property
Replies: 5
Views: 592

Re: link sketch dimension with custom property

Create a variable with some value. Now link the custom property and fillet values to that variable.
by gupta9665
Wed Jan 17, 2024 9:03 am
Forum: How To Questions
Topic: DefaultSM-Flat-Pattern
Replies: 9
Views: 817

Re: DefaultSM-Flat-Pattern

Often when i need to revise the part, i default config mode, making a cut or replacing an existing hole or whatever. The DefaultSM-Flat-Pattern of the part DONT update. I need to go into the DefaultSM-Flat-Pattern and use "flattern" option 2 times. First to unfold, then to fold i back aga...
by gupta9665
Wed Jan 17, 2024 8:57 am
Forum: Macro Library
Topic: Save PDF to PDM
Replies: 14
Views: 1399

Re: Save PDF to PDM

Try these codes. Option Explicit Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swExportPDFData As SldWorks.ExportPdfData Dim sFolderName As String Dim sFileName As String Dim nErrors As Long Dim nWarnings As Long Const PDMPath As String = "C:\Nordic Steel PDM\Varenummer\&...
by gupta9665
Sun Jan 14, 2024 8:03 am
Forum: API
Topic: Macro to find all files created in a given version
Replies: 9
Views: 1076

Re: Macro to find all files created in a given version

As gupta said, the code of artem will fit your need, straid out of the box. Got some other info. The index for 'Last Saved With SW' doesn't seems to be constant. On my Windows 11 system is is set on 330 instead of 336 (Windows 10). Not sure if it is Windows related or user setting. For me on WIn 10...
by gupta9665
Fri Jan 12, 2024 5:42 am
Forum: API
Topic: Macro to find all files created in a given version
Replies: 9
Views: 1076

Re: Macro to find all files created in a given version

I'm trying to check for future version. I'm on 2022 SP5. Downloaded and used 2023 SP1 for a while . After a while our company decided to end its subscription. I want to see how many files we have on version 2023. artem macro will create a CSV file and list out details for all the files in the desir...
by gupta9665
Fri Jan 12, 2024 2:19 am
Forum: API
Topic: Macro to find all files created in a given version
Replies: 9
Views: 1076

Re: Macro to find all files created in a given version

What does 336 stands for? Thanks. I believe that is the number on which "SW last saved with" comes in the list. But I do not think it is still exposed to VBA. I've been searching around for a while to find a macro that can crawl in a folder (and its subfolders) and find all Solidworks fil...
by gupta9665
Wed Jan 03, 2024 7:02 am
Forum: API
Topic: Check delimiter through API
Replies: 2
Views: 708

Re: Check delimiter through API

Have you looked at swUserPreferenceToggle_e.swUseSystemSeparatorForDims method?