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: 

Positioning Manipulator

Message 1 of 5
474 Views, 4 Replies

Positioning Manipulator



I'm trying to align an angle manipulator to a sketch construction line after selecting a joint origin for the manipulators origin, but just cannot seem to get a vector that works....... nothing I try will align to the sketch line.

Can anyone point me in the right direction?



// Activate and deactivate the input controls and their manipulators for the position joint if (firingInput->id() == "elementSelection") { selCmd = inputs->itemById("elementSelection"); if (selCmd->selection(0)) { locationOrigin = selCmd->selection(0)->entity(); elementManipulatorOrigin = locationOrigin->geometry()->origin(); Ptr<Vector3D> yDirection = locationOrigin->geometry()->secondaryAxisVector(); Ptr<Vector3D> zDirection = locationOrigin->geometry()->thirdAxisVector(); elementAngle->isEnabled(true); //elementAngle->setManipulator(elementManipulatorOrigin, yDirection, zDirection); elementAngle->setManipulator(elementManipulatorOrigin, Vector3D::create(0, 1, 0), Vector3D::create(0, 0, 1)); //elementName->isEnabled(true); //elementLength->isEnabled(true); //elementLength->setManipulator(elementManipulatorOrigin, Vector3D::create(0, 2, 0)); } else { elementName->value(""); elementName->isEnabled(false); elementLength->value(0); elementLength->isEnabled(false); elementAngle->value(0); elementAngle->isEnabled(false); } }


Message 2 of 5
in reply to: BlackPrism



Unfortunately it was a bug in our side. I logged UP-35806 in our internal system to track it.




Marshal Tu
Fusion 360 Developer
Autodesk, Inc.

Message 3 of 5
in reply to: BlackPrism

Hi. Would you mind posting a bit more of your code? I can't answer your question, but I am trying to work out how to activate the rotation input control as I cannot find it in the object tree.

Message 4 of 5
in reply to: gavin9537

The rotation manipulator is part of the AngleValueCommandInput object.  You get the graphic manipulator and also a field in the dialog where the user can enter the angle.

Brian Ekins
Inventor and Fusion 360 API Expert
Message 5 of 5
in reply to: gavin9537


Sorry for the delay in my reply and hopefully Brian's reply has given you what you need. My source changed considerably after the original post, as the issue I encountered turned out to be a bug and so I'm not sure its going to help. I believe the bug has been fixed, but haven't check as our current project is for a client using SolidWorks.


As Brian says, look at the AngleValueCommandInput object its pretty easy to use. I was positioning the manipulator based on point selection and then using it to set the length and angle of a sketch line; the command being called from a custom drop down menu embedded in the Fusion toolbar.


Hope this helps.

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