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.
Query Explorer feature
kevin_o_toole_1
Onshape Employees, Developers, HDM Posts: 565
Hello FeatureScripters!
Learning what FeatureScript's queries can do is often a slow process of reading lots of documentation, and the number of different queries avaiable can be overwhelming during this phase!
To help make this easier, we've made a "Query Explorer" custom feature. This custom feature's dialog lets you play around with Onshape's query functions, using and combining them, and seeing what the results are in real time.
You can add the feature to your toolbar here, or make a copy of the document to play around with its samples.
https://cad.onshape.com/documents/a5d9b2a6211c9576e5747d3d/w/0a149e82759d30f76fc88bb6/e/db0fd8f10a5c8328d3232869
Happy FeatureScripting!
Learning what FeatureScript's queries can do is often a slow process of reading lots of documentation, and the number of different queries avaiable can be overwhelming during this phase!
To help make this easier, we've made a "Query Explorer" custom feature. This custom feature's dialog lets you play around with Onshape's query functions, using and combining them, and seeing what the results are in real time.
You can add the feature to your toolbar here, or make a copy of the document to play around with its samples.
https://cad.onshape.com/documents/a5d9b2a6211c9576e5747d3d/w/0a149e82759d30f76fc88bb6/e/db0fd8f10a5c8328d3232869
Happy FeatureScripting!
12
Comments
Onshape, Inc.
How does the `convertToFs` function work? I tried opening its document, but it says I don't have permission.
IR for AS/NZS 1100
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
PhD, Mechanical Engineering, Stanford University
Any chance of this being updated? I assume there have been updates to the query functionality since 2021.
One thing I noticed is that I can't figure out a way to select a sketch feature and a sketch entity at the same time as seeds. There's also no option to create an implicit mate connector as part of the selection process.
[edit: a quick search of the changelog shows at least one new query since 2021: "FeatureScript: New query for objects on one side of a plane ('qInFrontOfPlane')"]
Changes in query.fs since 8th October 2020 (FS 1378):
GeometryType now includes ALL_MESH and MIXED_MESH options.
New functions:
IR for AS/NZS 1100
@MBartlett21
Good catches.
The last update was V5 which was in 2021. It references FS 1389, but it looks like they were just starting to update as there's a few commented references to "qSourceMesh", but the rest of those others are completely missing.
Kevin seems to be at Formlabs now so I'm not sure if anyone at Onshape is actively maintaining this. It is a really useful tool.
Also fyi, I've done a mirror of the FS standard library at GitHub here. (making it easier to see changes). I also normalised it on the nover branch, taking version numbers out of each studio.
mbartlett21/fs-std at nover
IR for AS/NZS 1100