Deleting equations along with functions

Hi all

 

Is there an automatic way to delete an equation that governs a function or a sketch at the same time as we delete the sketch or function in question?

 

In practice, I create frames with different dimensions and different options, all of which are set up via a family of rooms.

Once my part family is complete, a macro allows me to save each configuration in a part file, while removing the functions that are disabled in the tree (depending on my options).

 

However, every time I open my pieces separated in this way, the room is in error because the equations have not been removed.

 

Do you have a solution?

 

Thank you in advance.

 

Happydad

I don't think it's possible, except maybe by trying to check the box for automatic solutions that are in the equations dialog.

1 Like

Have you once made your family of play made

Name all the jams differently 

I think that's where the problem lies

@+ ;-)

If you have a room family, why not manage the equations in the Excel sheet?

 

That way, when you launch your macro to get as many parts as there are configurations, you delete your family of parts at the same time. No?

 

By the way, MyCAD's Integration tool could do this without the need for a macro!

 

If you want to stay on your macro, @jfaradon should be able to unlock that!

This could be implemented in the macro :

Do you want to delete all the equations ?

It shouldn't be very complicated with this statement :

http://help.solidworks.com/2011/English/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IEquationMgr~Delete.html

Or this link: https://forum.solidworks.com/message/420260

 

If it's only the ones that are no longer active, you should also test the ones that are in error , there it may be a little more tedious to code !