AnsweredAssumed Answered

A macro for all sketches in a part does not affect the Edge Flange sketches

Question asked by Emad Ktifany on Feb 23, 2019
Latest reply on Mar 5, 2019 by Emad Ktifany

Hello everyone


I had some parts models that have a lot of dangling dimensions and relations that some of them are real mess. I thought I write a macro to delete all relation and dimensions in every sketch in the design tree, so I wrote this function:



Function deleteAllSketchRelations(swModel As SldWorks.ModelDoc2, swFeat As SldWorks.Feature)


Dim swSketch As SldWorks.Sketch

Dim swSkRelMgr As SldWorks.SketchRelationManager


Set swSketch = swFeat.GetSpecificFeature2

Set swSkRelMgr = swSketch.RelationManager




End Function


In Sub main () I just prepared a loop to go through all features and sub features in the design tree, and if the feature is a sketch, it calls this function. The result is that the sketch of Sheet Metal Edges and Hole Wizard were just skipped, and the function never did any thing to them. as if it did not see them as sketches at all, I could not figure out what the problem is, or why it is acting like that, so I thought I may find help here.


Thank you very much to all of you, specially those who will hep me