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.
[FS] Determine if feature is the final enabled feature in the part studio
George_Anderson
Member Posts: 71 ✭✭
Is there a way inside a feature to determine if that feature is the last one in the list?
I'm developing a system where the user performs many small "atomic" operations (there might be 10-100 of these) that are extremely cheap, but then to visualize the result of the full sequence requires one big "solve" that is relatively expensive (say 1-2 seconds). I want to immediately see the result of this solve after adding atomic operations.
1) Rollback before the solve feature
2) Add the new atomic
3) Roll forward to repeat the solve.
What I'd love is for each atomic feature to *know* that it is the last one, and if so, invoke the solve function immediately, so no rollback bar is necessary.
My guess is that this is impossible, since the FeatureScript mentality is that you can't know anything downstream. However, it also seems 100% repeatable.
An alternative (that I assume also doesn't exist?) would be if we could specify a default feature insert spot somewhere other than the end. Then when I add a feature, it automatically puts it before my solve feature.
Is any of this possible?
Tagged:
0
Comments
Of course if I'm wrong I'm sure someone will chime in
Is there a way that we could specify that a feature should flow towards the end, and so automatically insert features before it.
Maybe something like
annotation { "Insert Features Before" : true }
?IR for AS/NZS 1100
I was meaning an annotation that is only treated specially by the user interface, nothing to do with the actual content of the FeatureScript.
IR for AS/NZS 1100
This is similar to Solidworks MacroFeatures with the alwaysAtEnd option enabled. It was a quite useful flag, however the only issues would be that queries are valid only at the time of selection. A use case of a feature that is always at the end would be something that uses context variables to execute and has no queries in the form. Or a feature that executes some sort of design for manufacturing analysis, or something that sets a property even.
Of course a feature at the end would ALWAYS regenerate so it could be a very time consuming feature while not rolled back or unsuppressed.
Depending on what you need your "solve" function to do, it might work if you stick it into a table.
But it would only be helpful if your solve is looking for a number or some kind of primitive output.
And like @Jacob_Corder said, a feature at the end (like a table) will always regenerate and can be time consuming.
IR for AS/NZS 1100