Community
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.
Solved! Go to Solution.
Solved by dalton98. Go to Solution.
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)