How to delete sketch constraints at once in Autodesk inventor?

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

    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!")

    Upvote 1Upvoted 2 Downvote 1Downvoted 2