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.
Is there anyway to search the entire onshape codebase at once for examples
daniel_cravens
Member Posts: 29 ✭
I often would like to find an examples of how a particular syntax is used but I do not know which file will contain that example. Is there a way to grep / search the entire codebase to find examples of "clickedbutton", as just one example?
0
Comments
That will open a search window and let you do a search across the standard FeatureScript library.
But you aren't going to find any "click button" type code. The FeatureScript UI doesn't have a button option.
A lot of FeatureScript happens on the backend of Onshape.
The closest you might get to is either a boolean parameter that is used in conjunction with editing logic, or an array type parameter.
Custom FeatureScript and Onshape Integrated Applications
"Any (or all) of the remaining three arguments may be omitted, but those that remain must appear in the same order relative to each other. Omitting unused arguments may result in better performance.
isCreating
boolean is set totrue
if the feature is being created andfalse
if it is being edited, having been committed at least once. Note: IfisCreating
is omitted, the editing logic function will only be called when the feature is being created.specifiedParameters
map indicates which parameters have been set by the user since the feature dialog opened. The ids of those parameters that have been specified map to true and those that have not map to false.hiddenBodies
query evaluates to all of the bodies have been hidden by the user (that information is not accessible from the context). It is used for example to avoid automatically adding invisible bodies to anextrude
merge scope.<b>clickedButton</b>
string indicates which button parameter was clicked to trigger the editing logic function. If no button was clicked,<b>clickedButton</b>
is the empty string."Custom FeatureScript and Onshape Integrated Applications