Function GetDimensionView(oDDim As DrawingDimension) As DrawingView If IsNothing(oDDim) OrElse oDDim.Attached = False Then Return Nothing Dim oGIntents As New List(Of GeometryIntent) Select Case TypeName(oDDim) Case "AngularGeneralDimension" Dim oAGD As AngularGeneralDimension = oDDim Try : oGIntents.Add(oAGD.IntentOne) : Catch : End Try Try : oGIntents.Add(oAGD.IntentTwo) : Catch : End Try Try : oGIntents.Add(oAGD.IntentThree) : Catch : End Try Case "DiameterGeneralDimension" Dim oDGD As DiameterGeneralDimension = oDDim Try : oGIntents.Add(oDGD.Intent) : Catch : End Try Case "LinearGeneralDimension" Dim oLGD As LinearGeneralDimension = oDDim Try : oGIntents.Add(oLGD.IntentOne) : Catch : End Try Try : oGIntents.Add(oLGD.IntentTwo) : Catch : End Try Try : oGIntents.Add(oLGD.IntentThree) : Catch : End Try Try : oGIntents.Add(oLGD.VirtualArcPosition) : Catch : End Try Case "RadiusGeneralDimension" Dim oRGD As RadiusGeneralDimension = oDDim Try : oGIntents.Add(oRGD.Intent) : Catch : End Try Case "OrdinateDimension" Dim oOD As OrdinateDimension = oDDim Try : oGIntents.Add(oOD.Intent) : Catch : End Try End Select If oGIntents.Count = 0 Then Return Nothing For Each oGI As GeometryIntent In oGIntents If oGI.Geometry IsNot Nothing Then If TypeOf oGI.Geometry Is DrawingCurve Then Dim oDC As DrawingCurve = oGI.Geometry Return oDC.Parent 'a DrawingView object End If End If Next Return Nothing End Function