Search found 26 matches

by artem
Wed Aug 10, 2022 6:42 am
Forum: API
Topic: SOLIDWORKS add-ins in .NET Core/.NET6 and DLL versions conflict
Replies: 1
Views: 1321

SOLIDWORKS add-ins in .NET Core/.NET6 and DLL versions conflict

Hi, Currently one of the most common questions among the SOLIDWORKS API developers writing code in .NET (C# or VB.NET) is if add-ins should be ported/developed in .NET Core/NET6 or if it is still better to use .NET Framework. In this video, I am explaining how to create SOLIDWORKS add-ins in .NET Co...
by artem
Wed Aug 10, 2022 6:39 am
Forum: API
Topic: PRINCIPAL AXES OF INERTIA
Replies: 3
Views: 637

Re: PRINCIPAL AXES OF INERTIA

Hi Mattia Bianchi , is there any chance you can send this model so I can troubleshoot? I have a lot of problems with IMassProperty2 (not as many as I had with IMassProperty), but I have found a few workarounds so want to give it a run on your model). The workarounds are applied in xCAD: https://gith...
by artem
Sat Feb 19, 2022 8:04 pm
Forum: API
Topic: How to improve the speed of SW selection API
Replies: 7
Views: 1006

Re: How to improve the speed of SW selection API

Are you working in assembly? If so you might want to disable this option as it significantly affects the performance while selecting for large assemblies: https://www.codestack.net/solidworks-ap ... into-view/
by artem
Wed Feb 16, 2022 7:27 pm
Forum: SW General
Topic: Drawings - Custom Properties from Text File?
Replies: 22
Views: 2308

Re: Drawings - Custom Properties from Text File?

Thank you for the mention, mattpeneguy . I like your idea with a macro feature linked to the external file which will always update the properties (this is a great fit for the macro features). I will add this to CodeStack next week (I am publishing weekly short videos of Macro Of The Week - so this ...
by artem
Sat Feb 05, 2022 11:57 pm
Forum: API
Topic: Browse Folder
Topic: Browse Folder
Replies: 12
Views: 3932

Re: Browse Folder

by artem
Mon Jan 31, 2022 4:44 am
Forum: API
Topic: Swx API for .netcore3.1 or .net5 or .net6
Replies: 2
Views: 901

Re: Swx API for .netcore3.1 or .net5 or .net6

Hi, I would recommend not to switch to .NET Core/NET5/6 just yet if you are developing add-ins until SOLIDWORKS officially supports this. It is OK to use .NET Core/NET5/6 in stand-alone applications though. One of the main limitations of .NET Core/.NET5 is an inability to load two different versions...
by artem
Thu Dec 23, 2021 4:25 pm
Forum: API
Topic: Get a count of component occurrences in an assembly?
Replies: 10
Views: 3080

Re: Get a count of component occurrences in an assembly?

BOM+ (https://cadplus.xarial.com/bom/) has an option to generate flat BOM. Here is the video demonstration (2:10 mark about the flat BOM): https://www.youtube.com/watch?v=rkUi_81mb0I&t=130s And here is the macro to write the qty to the custom property so you can then use it for naming: https://w...
by artem
Tue Dec 21, 2021 12:44 am
Forum: Macro Library
Topic: Adding quantity and thickness to the name while saving the file
Replies: 5
Views: 3654

Re: Adding quantity and thickness to the name while saving the file

@DLZ_SWX_User, I have just published this new macro yesterday which addresses this issue:
by artem
Sun Dec 12, 2021 11:33 pm
Forum: API
Topic: Serializing and deserializing a temporary body
Replies: 3
Views: 652

Re: Serializing and deserializing a temporary body

laukejas , here is the counter-part of the above example: https://www.codestack.net/solidworks-api/geometry/read-body-from-file/. Also this example might be helpful (this stores/restores the body into the file's 3rd party stream): https://www.codestack.net/solidworks-api/geometry/store-restore-body...
by artem
Thu Aug 19, 2021 7:07 am
Forum: SW General
Topic: Rollback bar to new location
Replies: 11
Views: 1112

Re: Rollback bar to new location

@Maha Nadarasa, @zxys001, @Lukas

I have added this macro to CodeStack: https://www.codestack.net/solidworks-ap ... -features/
by artem
Thu Aug 19, 2021 5:48 am
Forum: API
Topic: Sketch Point Import Macro Mod
Replies: 3
Views: 861

Re: Sketch Point Import Macro Mod

dave.laban , I have updated the original macro and you can now pre-select coordinate system to import points relative to. And you also have an option to import points using the current document coordinate system. I have updated the macro and you can redownload from CodeStack. Please let me know if ...
by artem
Fri Aug 06, 2021 2:31 am
Forum: SW General
Topic: Reset Feature name counting number
Replies: 6
Views: 907

Re: Reset Feature name counting number

You can tidy up your tree with this macro: https://www.codestack.net/solidworks-ap ... uentially/ and after it should continue with the next available number as the index for new feature
by artem
Fri Jul 09, 2021 8:35 am
Forum: API
Topic: Suggestions for programming training specifically for .NET and preferably geared to API concepts.
Replies: 14
Views: 1791

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Hi Frederick, Solidworks templates are not supported in visual studio versions > 2015. That's why I still have a visual studio 2015 installed on my pc (only for using the template). After creating a new project with the template , close it and open it with VS 2019. You probably do the same? ;) Arte...
by artem
Fri Jul 09, 2021 8:34 am
Forum: API
Topic: Suggestions for programming training specifically for .NET and preferably geared to API concepts.
Replies: 14
Views: 1791

Re: Suggestions for programming training specifically for .NET and preferably geared to API concepts.

Eddy Alleman , Frederick_Law thank you for the mention! That's the problem with API. Different program do it differently. API for IV, SW, Excel will be different. Programmer need to learn how they behave and what to use to do what. This is one of the reasons I actually started xCAD.NET . One of the...
by artem
Tue May 11, 2021 7:35 pm
Forum: API
Topic: Making a virtual component with solid body copies from all other components
Replies: 11
Views: 1163

Re: Making a virtual component with solid body copies from all other components

Hi, I am trying to write a macro that goes through the assembly, collects all solid bodies from all the components, then creates a virtual part inside the assembly, and places copies of all these solid bodies into that virtual part as temporary bodies. I need the temporary bodies in that virtual pa...
by artem
Sun May 09, 2021 7:06 pm
Forum: Macro Library
Topic: Artem Taturevych's Macros
Replies: 6
Views: 1952

Re: Artem Taturevych's Macros

I found this awesome macro over there https://www.codestack.net/solidworks-api/document/macro-feature/link-cut-list-properties/ . But @artem is there a way to make it copy and link the cutlist props to the config specific props instead of the custom props? Jaylin Hochstetler , take a look at these ...
by artem
Thu May 06, 2021 7:01 pm
Forum: Macro Library
Topic: Need Macro to change length units
Replies: 13
Views: 9960

Re: Need Macro to change length units

@Jaylin Hochstetler , great, glad it helped. Do you remember what was the error when you check 'Automatically Save'? I am now building a new version of CAD+ and will be keen to fix this issue as well.
by artem
Thu May 06, 2021 6:58 pm
Forum: SW General
Topic: Macro to save all parts in assembly as step files?
Replies: 10
Views: 10933

Re: Macro to save all parts in assembly as step files?

rosenrob , you can use this macro: https://www.codestack.net/solidworks-api/import-export/export-multi-formats/. It is pretty flexible with output folder and file naming (you can use a combination of free text, file name, custom property value etc.) and you can even use this to generate sub-folders...
by artem
Wed May 05, 2021 6:54 pm
Forum: Macro Library
Topic: Need Macro to change length units
Replies: 13
Views: 9960

Re: Need Macro to change length units

@berg_lauritz, yes, as long as the files are locally cached. The future version will have full support for PDM so no need to cache files locally.
by artem
Wed May 05, 2021 7:19 am
Forum: Macro Library
Topic: Need Macro to change length units
Replies: 13
Views: 9960

Re: Need Macro to change length units

Macro recorded should record this for modification of a single part. Then you can run this macro for all components in the assembly using Batch+: https://cadplus.xarial.com/batch/assembly/ (just test it on a spare part before running batch to make sure it is modifying units correctly). Here is the v...
by artem
Tue May 04, 2021 9:37 am
Forum: API
Topic: Big library of free macros
Replies: 5
Views: 22611

Re: Big library of free macros

Thank you, Alex!
by artem
Tue May 04, 2021 8:35 am
Forum: API
Topic: Big library of free macros
Replies: 5
Views: 22611

Big library of free macros

Hi All,

Here is a big library of free macros with detailed descriptions. Hope you find something useful there: https://www.codestack.net/solidworks-tools/
by artem
Mon May 03, 2021 12:32 am
Forum: API
Topic: Looking for Suggestions and Feedback
Replies: 8
Views: 936

Re: Looking for Suggestions and Feedback

what language do you use to write APIs or would you use if you decided to try it? I am thinking VBA, but maybe I am wrong, so I want to know what you are using or would want to use For something small which will not require lots of maintenance VBA macros are good (still good), although the VB6 lang...