How to delete sketch constraints at once in Autodesk inventor?

Delete all sketch constraint in a drawing with usage of iLogic or Macro.

Answer
 
Comments 0

1 Answer

Hi,
Kindly find the ilogic code below.

Dim oPartDoc As PartDocument
Dim oSketch As PlanarSketch

Dim geoconstraint As GeometricConstraint

On Error Resume Next

oPartDoc = ThisApplication.ActiveDocument

For Each oSketch In oPartDoc.ComponentDefinition.Sketches
For Each geoconstraint In oSketch.GeometricConstraints
Call geoconstraint.Delete
Next geoconstraint

Next oSketch

MsgBox ("All constraints deleted!")

 
Comments 0