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.
cPlane Line at Angle to edge

Hi,
I want to create a plane at angle to a reference edge.
When I reference the edge in cPlane as the entity it cannot determine the rotation axis, so I'm now experimenting with creating a sketch line along that edge and passing the sketch line to cPlane.
The below code doesn't work - how should I pass the line to cPlane or is there a better way to do this?
var sketchSpacer1 = newSketchOnPlane(context, id + "sketchEdgeLine", {
"sketchPlane" : sketchPlane1
});
skLineSegment(sketchSpacer1, "sketchEdgeLine", { "start" : startPoint1, "end" : endPoint1 }); skSolve(sketchSpacer1); cPlane(context, id + "planeAtAngle", { "entities" : qSketchRegion(id + "sketchEdgeLine"), "cplaneType" : CPlaneType.LINE_ANGLE, "offset" : 0 * millimeter, "angle" : 0 * degree, "oppositeDirection" : false, "flipAlignment" : false, "flipNormal" : false });
I've also tried using qCreatedBy for the entities but to no avail.
Any help appreciated.
Thank you.
Best Answer
-
Caden_Armstrong Member Posts: 230 PRO
Have you tried:
"entities" : qCreatedBy(id + IDOFYOURSKETCH, EntityType.EDGE)
using the id of the sketch not the id of the line segment…www.smartbenchsoftware.com --- fs.place --- Renaissance
Custom FeatureScript and Onshape Integrated Applications0
Answers
Have you tried:
"entities" : qCreatedBy(id + IDOFYOURSKETCH, EntityType.EDGE)
using the id of the sketch not the id of the line segment…
Custom FeatureScript and Onshape Integrated Applications
Fantastic, thank you!