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: 

How to consume a workplane while creating work point

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
CadUser46
474 Views, 3 Replies

How to consume a workplane while creating work point

Using the below method creates the work point as a separate entity in the browser.  How do i get it to behave like it would if i had done this natively through the GUI?

 

I want it to consume the X axis and the workplane.

 

(in case anyone is searching for: creating a work point from axis and work plane)

 

    Dim oWorkPlane As WorkPlane
    Set oWorkPlane = oPartDoc.ComponentDefinition.WorkPlanes.AddByPlaneAndOffset(oPartDoc.ComponentDefinition.WorkPlanes("YZ Plane"), 60) '60 would change to input parameter
    
    'Create a Work Point at intersection of X Axis and new Work Plane
    Dim oWorkPoint As WorkPoint
    Set oWorkPoint = oPartDoc.ComponentDefinition.WorkPoints.AddByCurveAndEntity(oPartDoc.ComponentDefinition.WorkAxes("X Axis"), oWorkPlane)

 


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------------------------------------------------------------------------------------------------------------------------
Inventor 2010 Certified Professional
Currently using 2023 Pro
3 REPLIES 3
Message 2 of 4
nmunro
in reply to: CadUser46

The following should work (add to the end of your code):

 

    oWorkPoint.ConsumeInputs = True

 

But there seems to be a bug that doesn't enable all inputs to be consumed. I worked around this by doing the following instead:

    oWorkPoint.ConsumeInputs = True
    oWorkPoint.ConsumeInputs = False
    oWorkPoint.ConsumeInputs = True

 

 

 

        


https://c3mcad.com

Message 3 of 4
CadUser46
in reply to: nmunro

Thanks i will give it a try tomorrow when im back in front of the computer.


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------------------------------------------------------------------------------------------------------------------------
Inventor 2010 Certified Professional
Currently using 2023 Pro
Message 4 of 4
CadUser46
in reply to: CadUser46

I see the bug you describe and your workaround works.  I'll live with it for now so i can move forward. Thanks


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------------------------------------------------------------------------------------------------------------------------
Inventor 2010 Certified Professional
Currently using 2023 Pro

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

Post to forums  

Autodesk Design & Make Report