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: 

Project 3d Sketch into 2d sketch

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
821 Views, 1 Reply

Project 3d Sketch into 2d sketch

I have a 3D spline i'm trying to project into a 2d sketch on the XZ plane. The spline is the only object in the 3d sketch. 

I have found vba api codes that show how to project the center point or an axis but nothing about a sketch object.

Is this possible through the api? I'm coding in VBA.

 

Thanks in advance for any help.

1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

If anyone every looks at this I figured it out and it's super easy.

 

SyntaxEditor Code Snippet

    Dim oSketch As Inventor.PlanarSketch
    oSketch = oPartDef.Sketches.Add(oPartDef.WorkPlanes(2))

    
    ' Project 3D Spline
    Dim oSpline As SketchSpline
    oSpline = oSketch.AddByProjectingEntity(Spline3D)

 

Where Spline3D is the spline created in the 3D sketch. Doing it this way allows you to constrain other 2d sketch objects to the projected spline. 

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

Post to forums  

Autodesk Design & Make Report