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.
globaly change variable name, search replace
wolfgang_maier
Member Posts: 39 ✭✭✭
in General
Hello forum,
a variable can be renamed.
Assume the variable is used to defined the size of objects.
With renaming the variable all references to objects must be updated manually.
So, i am missing a global search/replace command for changing all occurrences for that variable.
regards
Wolfgang
a variable can be renamed.
Assume the variable is used to defined the size of objects.
With renaming the variable all references to objects must be updated manually.
So, i am missing a global search/replace command for changing all occurrences for that variable.
regards
Wolfgang
1
Comments
There is currently no functionality in the product to refactor a part studio variable name.
Please vote on this improvement request so that we can prioritize this enhancement: https://forum.onshape.com/discussion/comment/29018#Comment_29018
1. rename: When renaming a variable (the situation Wolgang describes) it would be nice if OnShape would show a list of items that use that variable. It then would be nice if the user could select the items which have to use the renamed version of the variable. When the user only selects SOME of the items to use the new variable the unselected items will still be using the old version of the variable. In fact the user creates a new variable in this way. If the user selects ALL the items to use the renamed version of the variable, then the user should be able to choose whether to keep the old variable or to delete the old variable (default)
2. search and replace: A search and replace function for variable names would be nice. This is independent of renaming of a variable.
I am aware that these two functions overlap with each other, but both have their value.
So first priority, just make rename update all the references (at least all in the same document). I would make the global update the default. Not even an option. If you want to make it a new variable with a new name, just do that, add a new variable. To make that a little cleaner and safe, a "duplicate" function could be added which produced a new variable with the same attributes and a name like "variable_copy". So you could duplicate, then modify, and not have to accidentally fail to type is the value correctly for exa ple.