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: 

WorkPoint @ Intersecting Axis and Face

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Genicee
623 Views, 4 Replies

WorkPoint @ Intersecting Axis and Face

Using API is there a way to add a WorkPoint where an Axis and a Part Face Intersect? 

 

I need this to be able to create a WorkPlane normal to the surface of the part at that location.

4 REPLIES 4
Message 2 of 5
xiaodong_liang
in reply to: Genicee
Message 3 of 5
Genicee
in reply to: xiaodong_liang

I think that will give me a good starting point, but I need that point tied to the axis and face. There has to be something out, because through the UI I with the point command select the axis and part surface to create the point needed to then place my workplane. I quickly did the example in your blog and when I move the axis the work plance does not follow, maybe there is something I am missing. 

 

When I get more time I will play around with it again. Thank you for helping me out. You have given me a few more idea. Smiley Happy

Message 4 of 5
ekinsb
in reply to: Genicee

I think this might be what you're looking for.  The other code does the calculation but it doesn't create the point in a way that it's associated to the geometry.

Public Sub AddWorkPointAtIntersection()
    Dim fc As face
    Set fc = ThisApplication.CommandManager.Pick(kPartFaceFilter, "Select a face.")
    
    Dim axis As WorkAxis
    Set axis = ThisApplication.CommandManager.Pick(kWorkAxisFilter, "Select a work axis.")
    
    Dim partDef As PartComponentDefinition
    Set partDef = axis.Parent
    
    Dim wp As WorkPoint
    Set wp = partDef.WorkPoints.AddByCurveAndEntity(axis, fc)
End Sub

 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 5 of 5
Genicee
in reply to: ekinsb

Wonderful!!!

 

That is exactly what I would looking for.  I look in the API help for while. I am sure I just glanced over it. Or misundertood the objective of the method. 

 

Thanks again guys!

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

Post to forums  

Autodesk Design & Make Report