Hello everyone,
I’ve been working with a macro found here: Make Independent Drawing Macro for SolidWorks. The macro works perfectly fine with SolidWorks 2023 and 2024, but I am having some issues running it on SolidWorks 2016.
I was wondering if anyone here could help me modify the macro so that it works with SolidWorks 2016 as well? If anyone has experience with adapting macros for older versions of SolidWorks, I would greatly appreciate your help!
Thanks in advance for any insights or solutions you can provide!
EDIT:
I am working with SolidWorks 2016 and I encountered an issue while trying to replace components in an assembly using a macro. The macro was originally written for a newer version of SolidWorks, and it references the MakeIndependent
function, which doesn't exist in SolidWorks 2016. I need to replace this functionality with something that works for the 2016 version.
Here is the key issue:
In the newer version of SolidWorks, the
MakeIndependent
function is used to break external references and make the component independent before performing replacements in the assembly.However, in SolidWorks 2016, this function does not exist, and the macro fails when it tries to use it.
To work around this, I have found that in SolidWorks 2016, components in an assembly can be replaced using the function Part.ReplaceComponents
, which replaces the existing component with a new one.
My questions:
How can I adapt the macro to replace the functionality of
MakeIndependent
in SolidWorks 2016, or is there a different approach to handling external references for components in 2016?
I should mention that I am not very familiar with VBA or the SolidWorks API, which is why I initially asked if anyone could assist me with this issue. I am not able to modify the macro myself.
Any guidance or suggestions on how to modify the macro for SolidWorks 2016 would be greatly appreciated!
Thank you!