Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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_1kevin_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!

Comments

  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    Did you make this so I stop bugging you and Jake for help all the time? Great feature! Thanks Kevin!
    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,034 EDU
    @kevin_o_toole_1

    How does the `convertToFs` function work? I tried opening its document, but it says I don't have permission.
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
    I want to beleve this is some preparation to make possible to feed filtered queries to the native features. But I see you also faced the problem of too long user interface section. If we only had ability to pack more UI options into something like lookup table.
  • MichaelPascoeMichaelPascoe Member Posts: 1,698 PRO
    Thanks Kevin!

    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    Kevin, this is really cool! thanks. I'm with @konstantin_shiriazdanov it would be sooo helpful for many things to have robust updatable selections built into the model. I'm kind of scratching that itch with my Selection Fillet feature, but the real deal would be something like a "Query Feature" that lets you set it all up, then call the query in any downstream features.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    by the way. does anyone have any idea why this document is taking so long in "loading custom features and tables"? it's been spinning for over 10 minutes, and I can't add the feature
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    does anyone have any idea why this document is taking so long in "loading custom features and tables"?
    We're aware of this bug and working on a fix. In the meantime a workaround is to simply refresh the page.
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,890 PRO
    Oh nice! this should help a lot when trying to debug my fail queries.
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    does anyone have any idea why this document is taking so long in "loading custom features and tables"?
    We're aware of this bug and working on a fix. In the meantime a workaround is to simply refresh the page.
    got it. I tried another day and it worked.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • lemon1324lemon1324 Member, Developers Posts: 223 EDU
    This is going to be amazingly helpful, thanks for putting this together!
    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
Sign In or Register to comment.