Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
Please see the attachment.
Currently i am using the below iLogic rule for deleting the horizontal and vertical constraints in model sketch.
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 If geoconstraint.Type = kHorizontalConstraintObject Then 'MsgBox ("Deleting Horizontal Constraints") Call geoconstraint.Delete Else If geoconstraint.Type = kVerticalConstraintObject Then 'MsgBox ("Deleting Vertical Constraints") Call geoconstraint.Delete End If Next geoconstraint Next oSketch MsgBox ("All Horizontal and Vertical constraints deleted!")
But we need to after deleting the horizontal and vertical constraints, the sketch line should be auto constraints by using the XY master Plane (Projection line) or XZ master plane (Center line) arrest with parallel or perpendicular constraints
Hope you understand...
Solved! Go to Solution.