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: 

Measure the angle between the working plane of the assembly and the working plane of occurence

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Hubert_Los
212 Views, 2 Replies

Measure the angle between the working plane of the assembly and the working plane of occurence

Hi All,


I would like measure the angle between the working plane of the assembly and the working plane of occurence

I can't use codes below

angle = Measure.Angle("componentName1", "Plane1", Assembly, "XY Plane")
		


Any ideas?


Regards,
Hubert.

Tags (2)
2 REPLIES 2
Message 2 of 3
dalton98
in reply to: Hubert_Los

I couldn't get the measure.angle tool to work. This is another way to do it, you have to create a geometry proxy for the plane inside the component.

Dim oAss As AssemblyDocument = ThisApplication.ActiveDocument
Dim XYplane As WorkPlane = oAss.ComponentDefinition.WorkPlanes.Item("XY Plane")
Dim oOcc As ComponentOccurrence
oOcc = oAss.ComponentDefinition.Occurrences.ItemByName("component1:1")
Dim Plane1 As WorkPlane = oOcc.Definition.WorkPlanes.Item("Plane1")
oOcc.CreateGeometryProxy(Plane1, Plane1)

angle = ThisApplication.MeasureTools.GetAngle(XYplane, Plane1) * 180 / PI
MessageBox.Show(angle)

 

Message 3 of 3
Hubert_Los
in reply to: Hubert_Los

It works, thank you.

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

Post to forums  

Autodesk Design & Make Report