Toggle between dimensions

Toggle between dimensions

A.K.CORTEL
Enthusiast Enthusiast
211 Views
0 Replies
Message 1 of 1

Toggle between dimensions

A.K.CORTEL
Enthusiast
Enthusiast

Hi all users, I have a part with a sketch fully constrained, I trying to  toggle between two dimensions (TORISPHERICAL_HEAD_KNUCKLE_RADIUS) and (TORISPHERICAL_HEAD_HEIGHT)

I have this rule but I have replace oAngleDim 

Can anyone help me out?

Thanks

Dim oPDoc As PartDocument = ThisDoc.Document
Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition
Dim oSketch As PlanarSketch = oPDef.Sketches.Item("TORISPHERICAL HEAD")
Dim oDims As DimensionConstraints = oSketch.DimensionConstraints
Dim oHeightDim As DimensionConstraint
Dim oAngleDim As DimensionConstraint
For Each oDim As DimensionConstraint In oDims
	If oDim.Parameter.Name = "TORISPHERICAL_HEAD_KNUCKLE_RADIUS" Then
		oHeightDim = oDim
	ElseIf oDim.Parameter.Name = "TORISPHERICAL_HEAD_HEIGHT" Then
		oAngleDim = oDim
	End If
Next
If oHeightDim.Driven Then
	oAngleDim.Driven = True
	oHeightDim.Driven = False
Else
	oHeightDim.Driven = True
	oAngleDim.Driven = False
End If

 

 

 

 

 

 

 

 

0 Likes
212 Views
0 Replies
Replies (0)