Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Featurescript - Manipulator
![Hugh_Goodbody](https://profiles.onshape.com/597d977a894bc431933fb806af2c46cf8db52d5163c2ce6b51caa3d20ba75a46.png)
I have instantiated a part in a part studio using feature script. In the picture it is the port at the rear of the cylinder. I would like a manipulator to allow the user to graphically rotate the port around the cylinder to the desired position. The snippet I have tried is:
var testPoint = vector(-capPortPos,0,0)*millimeter;
angularManipulator({
"axisOrigin" : testPoint,
"axisDirection" : X_AXIS,
"rotationOrigin" : vector(-capPortPos,0,10)*millimeter
});
"axisOrigin" : testPoint,
"axisDirection" : X_AXIS,
"rotationOrigin" : vector(-capPortPos,0,10)*millimeter
});
Where testPoint is the blue dot.
Am I on the right track?
![](https://us.v-cdn.net/5022071/uploads/editor/vj/9bl59ghayhhz.png)
0
Comments
It seems like you're on the right track. You'll next need to add that manipulator with the addManipulators() function, and control its effect with a manipulator change function.
A full working example (and IMO the best place to start) is in the documentation for the manipulator module.
You can instead use X_AXIS.direction, or X_DIRECTION, or vector(1, 0, 0), which are all the same thing: A unit vector pointing in the positive x direction.