Best practice for constraint retention?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've got an iLogic routine that is designed to create/re-create a shape with various features. As there are a large number of optional features, the routine simply erases everything and recreates the part with the current selected features and sizes picked by the user.
To prevent loss of constraint placement within an assembly, my plan was to use work features (planes, axis, points, etc) as a fixed means to prevent the need to repair constraints, but this is not panning out and constraints here are still being lost on a part regeneration.
If a work feature is found to be non-existant, then it is created, else it is repositioned...
[Example]
'DXF Plane Found = False For Each oWorkPlane In oCompDef.WorkPlanes If oWorkPlane.Name = "DXF Plane" Then Found = True Next PlanePoint(1) = oTG.CreatePoint(0, 0, 0) PlanePoint(2) = oTG.CreatePoint(0, 0, -1) PlanePoint(3) = oTG.CreatePoint(0, 1, 0) midLine = oTG.CreateLineSegment(PlanePoint(1), PlanePoint(2)) oAxisX = midLine.Direction midLine = oTG.CreateLineSegment(PlanePoint(1), PlanePoint(3)) oAxisY = midLine.Direction If Found Then oWorkPlane = oCompDef.WorkPlanes.Item("DXF Plane") oWorkPlane.SetFixed(PlanePoint(1), oAxisX, oAxisY) oWorkPlane.Visible = False oWorkPlane.AutoResize = False oWorkPlane.Grounded = True Else oWorkPlane = oCompDef.WorkPlanes.AddFixed(PlanePoint(1), oAxisX, oAxisY, False) oWorkPlane.Visible = False oWorkPlane.AutoResize = False oWorkPlane.Grounded = True oWorkPlane.Name = "DXF Plane" End If
Can anyone suggest a stable workflow to be able to maintain constraints to work features under such conditions?
