Best practice for constraint retention?

Best practice for constraint retention?

llorden4
Collaborator Collaborator
180 Views
0 Replies
Message 1 of 1

Best practice for constraint retention?

llorden4
Collaborator
Collaborator

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?

Autodesk Inventor Certified Professional
0 Likes
181 Views
0 Replies
Replies (0)