Inventor Customization

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

Get Spline Data

246 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.

 

thanks

Employee
yuhanzhang
Posts: 411
Registered: ‎01-06-2009
Message 2 of 4 (233 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
kyra
Posts: 6
Registered: ‎04-09-2011
Message 3 of 4 (223 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
kyra
Posts: 6
Registered: ‎04-09-2011
Message 4 of 4 (216 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

Announcements
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

Twitter

Facebook

Blogs

Pinterest

Youtube