R TARMARAAJ

How to delete sketch constraints at once in Autodesk inventor?

Question by R TARMARAAJ

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

Answer
 
Comments 0

1 Answer

Carthik
Answered on 30 Oct, 2013 11:56 AM

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