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.
Possible Editing Logic bug with Array parameters
George_Anderson
Member Posts: 71 ✭✭
[Only not posting to support because I first want some community feedback about whether I'm using Editing Logic incorrectly]
MWE:
My EL function is modifying feature parameters based on whether any entity is selected.
The bug is reproduced by:
1) In the TEST function, add a single operation.
2) Under entities, select the *midpoint* of the single edge in the scene (bug doesn't happen if you select the endpoints)
It will show up as a "missing item".
Curiously, when I do the same thing outside of the array parameters, I don't have this bug.
More curiously, this bug only happens when selecting the midpoint of the edge, not the endpoints.
Tagged:
0
Comments
The specific bug you're seeing can be summarized as follows:
If any parameter inside an array parameter is changed via editing logic, then any selected implicit mate connectors and/or midpoints of query parameters inside array parameters immediately fail.
Evaluating the query does not affect whether it fails or not. You can see this if you add a condition like the following to your editing logic function:
When definition.enableArrayParameter is true, making any change will immediately cause any selected mate connectors and midpoints to fail, even if you aren't evaluating said internal query parameter in your editing logic function. If you disable definition.enableArrayParameter, then you'll be able to select implicit mate connectors and midpoints once again without issue.
Code wise, it looks something like this: