Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Measure angles between planes

Message 1 of 3
513 Views, 2 Replies

Measure angles between planes



I want to measure the angle between two planes with the measureManager.measureAngle() command. It works fine when measuring angle between construction planes in the root Component, but as soon as I want to measure angles between one plane in the root Component and one plane in a sub sub component (or two planes in a sub sub component) I get a "RuntimeError: 3 : invalid argument geometryOne" error.


As I started Fusion only a few weeks ago I don't have a lot of experience of the API and don't understand why I have with issue. I checked the datatypes and both arguments are constructPlanes. When I am measuring it using the inspect tool by hand it works fine...


I have seen things about proxy and brep but I think I am directly using the objects here so I should not have a problem...


I have attached a Fusion project and the python script


Thanks a lot for your time

Labels (1)
Message 2 of 3
in reply to: luc.doppler

Hi @luc.doppler .


For entities other than the root component, Proxies are important.


# programme principal
def run(context):
    ui = None
        # On récupère Fusion 360
        app = adsk.core.Application.get()
        # On récupère l'interface utilisateur de Fusion
        ui  = app.userInterface

        # On récupère la sélection  active (le projet Fusion qui est ouvert/actif)
        activeSelection = adsk.fusion.Design.cast(app.activeProduct)

        # On sélectionne le composant à la racine
        rootComp = activeSelection.rootComponent

        # On sélectionne le pouce
        pouceOcc :adsk.fusion.Occurrence = rootComp.occurrences[0].childOccurrences[0]
        pouceComp = pouceOcc.component

        # Logger utilisateur
        uiDebug = UiLogger(True)

        uiDebug.print(str("Début du script"))

        # On récupère le plan de référence pour la mesure d'angle
        plan1 = rootComp.constructionPlanes[0]

        # On récupère le plan mobile pour la mesure d'angle
        plan2 = pouceComp.constructionPlanes[0]

        # Proxies
        plan2 = plan2.createForAssemblyContext(pouceOcc) # important!


        if ui:


For more information about Proxies, see the bottom of the link. 

Message 3 of 3
in reply to: kandennti

thanks a lot ! It worked as expected 😉

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

Post to forums  

Autodesk DevCon in Munich May 28-29th

Autodesk Design & Make Report