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.
SkSolve error
hervé_pipon
Member Posts: 60 ✭✭
Hello,
I don't speak chinese..
Can somebody translate this error message
I don't speak chinese..
Can somebody translate this error message
@skSolve: Parent Id FovTflfcvumxF3Q_0.sketch_ used at two non-contiguous points in operation history (Cannot have FovTflfcvumxF3Q_0.1.1 between FovTflfcvumxF3Q_0.sketch_.1 and FovTflfcvumxF3Q_0.sketch_.2)
Tagged:
0
Comments
@hervé_pipon this means that you have an operation in your code with a duplicate id. Each id must be unique. For example if you have opExtrude with an id of: id + "extrude1"
your next extrude would need a different id, something like: id + "mySecondExtrude"
If you have an operation within a for loop, you can name the operation like this:
id + i + "extrude"
Also, if you share a link to your document, we can help troubleshoot specific issues you may have.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! cadsharp.com/featurescripts 💎
Id
(including parents) must refer to a contiguous region of operations on the context.Thus, the following code will fail because
id + "extrude"
alone refers to two non-contiguous regions of history:For the above code, a pattern like
id + i + "extrude"
orid + ("loop" ~ i) + "extrude"
would work as expected, as would the unnestedid + ("extrude" ~ i)
.Except for the plane name, all my Ids are unique and based on the for loop index. That's why I'm wondering.
If you take a careful look, that's also true of the of the failing example provided.
This issue isn't duplicate ids. The issue is that the "+" operator is not a simple string concatenation, it is creating a parent id with children, and that FeatureScript requires each parent id to only be used in one contiguous region of history. This breaks because your code is starting one parent id ("sketch_"), then starting another ("1") and then reopening the original ("sketch_"). Take a look at the example above for several suggestions of different patterns of ids that will work without error.
But not very intuitive. I would love to find some video on FeatureScript explaining the philosophy and architecture of objects and tools.
I think the documentation is not really user friendly.
Fortunately there is the forum and people like you, who can put one's finger on the important detail.
Thanks a lot.