Message 1 of 1
Featurecobtrolframe Position
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I'm stuck at this point ,looking forward a help.
I want move down feature control frame position(below dimension line). with text
Sub HorizontalDim(oDrawingDim As DrawingDimension)
'Set a reference to the active sheet.
Dim oSheet As Sheet
Set oSheet = oDrawingDim.Parent.Parent.ActiveSheet
' Create the feature control frame symbol with a leader
' Set a reference to the TransientGeometry object.
Dim oTG As TransientGeometry
Set oTG = ThisApplication.TransientGeometry
'assuming that the selection curve is linear
Dim oMidPoint1 As Point2d
Set oMidPoint1 = oDrawingDim.DimensionLine.MidPoint
Dim StartPoint As Point2d
Set StartPoint = oDrawingDim.DimensionLine.StartPoint
Dim EndPoint As Point2d
Set EndPoint = oDrawingDim.DimensionLine.EndPoint
Dim oLeaderPoints As ObjectCollection
Set oLeaderPoints = ThisApplication.TransientObjects.CreateObjectCollection
'Create a few leader points.
'elbow
If oDrawingDim.DimensionLine.StartPoint.X > oDrawingDim.Text.Origin.X Then
Call oLeaderPoints.Add(oTG.CreatePoint2d(StartPoint.X - 1.9, StartPoint.Y))
ElseIf oDrawingDim.DimensionLine.MidPoint.X = oDrawingDim.Text.Origin.X Then
Call oLeaderPoints.Add(oTG.CreatePoint2d(oMidPoint1.X, oMidPoint1.Y))
Else
Call oLeaderPoints.Add(oTG.CreatePoint2d(EndPoint.X + 1.9, EndPoint.Y))
End If
'Create an intent and add to the leader points collection.
'This is the geometry that the symbol will attach to.
Dim oGeometryIntent1 As GeometryIntent
Set oGeometryIntent1 = oSheet.CreateGeometryIntent(oDrawingDim, oMidPoint1)
Call oLeaderPoints.Add(oGeometryIntent1)
' Create a FeatureControlFrameRows object to define the symbol's rows
Dim oRows As FeatureControlFrameRows
Set oRows = oSheet.FeatureControlFrames.CreateFeatureControlFrameRows
' Add a row
Dim oRow As FeatureControlFrameRow
Set oRow = oRows.Add(kPosition, "Ø0.02", , "", "")
' Create the feature control frame symbol with a leader
Dim oSymbol As FeatureControlFrame
Set oSymbol = oSheet.FeatureControlFrames.Add(oLeaderPoints, oRows)
End Sub
@Anonymous Forshav,@@Jelte de Jong,@Wesley Crihfield