Is possible to insert a GD&T Flatness symbol with iLogic in my automatic drawing template

Is possible to insert a GD&T Flatness symbol with iLogic in my automatic drawing template

sbcJLYKK
Contributor Contributor
549 Views
2 Replies
Message 1 of 3

Is possible to insert a GD&T Flatness symbol with iLogic in my automatic drawing template

sbcJLYKK
Contributor
Contributor

Hi

I have a question that I hope you can help me with.

 

I would like to ask if it is possible to insert a GD&T Flatness symbol with iLogic.

 

Please see attached image "Flatness".

 

I am in the process of developing a working drawing template that automatically generates measurements, holes, fillets and chamfer.


It works well, but I'm missing one last thing, a GD&T Flatness symbol on my drawing.


Please see next picture.

I

t is a plate that is set "up View"

 

I do not think I can find any code in iLogic.

 

Thank you for your help

 

Sincerly Steffen.

0 Likes
Accepted solutions (1)
550 Views
2 Replies
Replies (2)
Message 2 of 3

Ralf_Krieg
Advisor
Advisor
Accepted solution

Hello

 

Try the following snippet

    Dim oDrawDoc As DrawingDocument=ThisDoc.Document
    Dim oActiveSheet As Sheet= oDrawDoc.ActiveSheet
    Dim oDrawingCurveSegment As DrawingCurveSegment = ThisApplication.CommandManager.Pick(kDrawingCurveSegmentFilter, "Pick a drawing curve")
    Dim oDrawingCurve As DrawingCurve = oDrawingCurveSegment.Parent
    Dim oMidPoint As Point2d = oDrawingCurve.MidPoint
    Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
    Dim oLeaderPoints As ObjectCollection = ThisApplication.TransientObjects.CreateObjectCollection
    Call oLeaderPoints.Add(oTG.CreatePoint2d(oMidPoint.X + 0.000000001, oMidPoint.Y - 1))
    Dim oGeometryIntent As GeometryIntent= oActiveSheet.CreateGeometryIntent(oDrawingCurve, oMidPoint)
    oLeaderPoints.Add(oGeometryIntent)
	Dim oRows As FeatureControlFrameRows = oActiveSheet.FeatureControlFrames.CreateFeatureControlFrameRows
    Dim oRow As FeatureControlFrameRow = oRows.Add(kFlatness, "1.5")
    Dim oSymbol As FeatureControlFrame = oActiveSheet.FeatureControlFrames.Add(oLeaderPoints, oRows)

 

 


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 3 of 3

sbcJLYKK
Contributor
Contributor

Many thanks for your help. That was really nice of you. It worked 🙂
0 Likes