Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get Spline Data

3 REPLIES 3
Reply
Message 1 of 4
kyra
465 Views, 3 Replies

Get Spline Data

I am a newbie to vba editor, 

 

how can i apply the BSplineCurve.GetBSplineData Method, to get the poles and knots of a spline in my sketch.

 

thanks

3 REPLIES 3
Message 2 of 4
YuhanZhang
in reply to: kyra

Try below VBA code:

Sub SplineDataTest()
    
    ' New a part document, add a planar sketch and draw a spline
    Dim oDoc As PartDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oBSpline As SketchSpline
    Set oBSpline = oDoc.ComponentDefinition.Sketches(1).SketchSplines(1)
    
    Dim dPoles() As Double, dKnots() As Double, dWeights() As Double
    oBSpline.Geometry.GetBSplineData dPoles, dKnots, dWeights
    
End Sub

 



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

Message 3 of 4
kyra
in reply to: kyra

I require the data of an already drawn spline in a part document. 

 

Is this code for this function?

Message 4 of 4
kyra
in reply to: kyra

How do I display the data acquired?

 

Thank you for your assistance.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report