Surfacetexturesymbol orientation

Surfacetexturesymbol orientation

tobias_wiesendanger
Advocate Advocate
296 Views
1 Reply
Message 1 of 2

Surfacetexturesymbol orientation

tobias_wiesendanger
Advocate
Advocate

Anybody has an idea how to decide if a surfacetexturesymbol is on the left or on the right. I did not find any property that could help me check if it is on the left side or on the right side. Also why is the surfacetexturesymbol.Position in such a random position? (Those two circles mark it)

2023-10-25 20_47_58-Autodesk Inventor Professional 2024.png

297 Views
1 Reply
Reply (1)
Message 2 of 2

Maximilian_Bongartz
Explorer
Explorer

The key are the leadernotes.

When adding a surfaceTextureDefinition make sure, that the first Point is at the position of the text, and the second is on your geometry.

 Dim oCurve As DrawingCurve = THisApplication..CommandManager.Pick(SelectionFilterEnum.kDrawingCurveSegmentFilter, "Pick Curve")
 Dim oLeaderPoints As ObjectCollection = oInvApp.TransientObjects.CreateObjectCollection
 Dim oIntent As GeometryIntent = oSheet.CreateGeometryIntent(oCurve, PointIntentEnum.kMidPointIntent)
 Dim x1 As Double = oCurve.MidPoint.X
 Dim y1 As Double = oCurve.MidPoint.Y + 0.0000001
 oLeaderPoints.Add(oInvApp.TransientGeometry.CreatePoint2d(x1, y1))
 oLeaderPoints.Add(oIntent)
Dim oSurfaceTextureSymbolDefinition As SurfaceTextureSymbolDefinition = oSheet.SurfaceTextureSymbols.CreateDefinition()
Dim oSurfaceTextureSymbol As SurfaceTextureSymbol
oSurfaceTextureSymbol = oSheet.SurfaceTextureSymbols.AddByDefinition(LeaderPoints:=oLeaderPoints, SurfaceTextureSymbolDefinition:=oSurfaceTextureSymbolDefinition)

 

I only found a solution when creating. Flipping an existing Symbol is not possible so far (for me)

0 Likes