Inventor Customization

Active Member
Posts: 6
Registered: ‎04-09-2011
Message 1 of 4 (247 Views)

Get Spline Data

247 Views, 3 Replies
04-25-2011 04:31 AM

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.



Posts: 411
Registered: ‎01-06-2009
Message 2 of 4 (234 Views)

Re: Get Spline Data

04-25-2011 07:30 PM 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


Rocky Zhang
Inventor API
Manufacturing Solutions
Autodesk, Inc.

Active Member
Posts: 6
Registered: ‎04-09-2011
Message 3 of 4 (224 Views)

Re: Get Spline Data

04-26-2011 05:51 AM in reply to: kyra

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


Is this code for this function?

Active Member
Posts: 6
Registered: ‎04-09-2011
Message 4 of 4 (217 Views)

Re: Get Spline Data

04-26-2011 07:25 AM in reply to: kyra

How do I display the data acquired?


Thank you for your assistance.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community

Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor