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.
How to create different types of a master data by changing the variables
baumar
OS Professional Posts: 77 PRO
The learning video "Storing Master data" greatly shows the advantages of separating the master data from further design to make it reusable in various documents.
What I'm still looking for is this: Imagine you want to create different models from the same master sketch. The most simple use case is creating different sizes of a product, like a tennis racket that comes in sizes small, medium and large (for kids, juniors and adults). In this simple case the proportions of the product remain the same, only the size is changing. The more complex case is when the proportions will change too.
By defining all variables before the first sketch, it is possible to use them in the sketch as driving features. And by adding a scale factor of 1 and mupliply it to each variable I could scale the entire sketch. But to scale the product, which should be done outside of the master sketch, you need more driving variables.
They could also be added to the variables in the master sketch, but when I want to create another type, I must change the master. However the master should remain untouched from its children variations.
The solution might be to move the variables to another document and import from there to the master. is this possible? Maybe by adding from a feature studio?
And still this is only half of the solution: It will be necessary to select the variable set in the final document - the "child" of the master. Only if you tell there which variable set (like small medium and large) to be used, the implementation remains independant from the master.
Any hints welcome how this can be achieved.
What I'm still looking for is this: Imagine you want to create different models from the same master sketch. The most simple use case is creating different sizes of a product, like a tennis racket that comes in sizes small, medium and large (for kids, juniors and adults). In this simple case the proportions of the product remain the same, only the size is changing. The more complex case is when the proportions will change too.
By defining all variables before the first sketch, it is possible to use them in the sketch as driving features. And by adding a scale factor of 1 and mupliply it to each variable I could scale the entire sketch. But to scale the product, which should be done outside of the master sketch, you need more driving variables.
They could also be added to the variables in the master sketch, but when I want to create another type, I must change the master. However the master should remain untouched from its children variations.
The solution might be to move the variables to another document and import from there to the master. is this possible? Maybe by adding from a feature studio?
And still this is only half of the solution: It will be necessary to select the variable set in the final document - the "child" of the master. Only if you tell there which variable set (like small medium and large) to be used, the implementation remains independant from the master.
Any hints welcome how this can be achieved.
0
Comments
We have done this where the master is "infinitely" configurable and the child has a list input with just the "valid" values. The downside is that the "logic" of which valid options are has to be in the child.
If you just need to scale the master, this should work fine: have the scale factor be a configuration variable and when you use the master you can input whatever scale factor you want without ever having to change the master, but you can't restrict it to specific ones...
- Create "configuration variables" in your main part studio. (Alternatively, you can create other types of configurations, like a drop-down menu that changes the values of "regular" variables.)
- Create your layout sketch and reference the variables and other configurations from Step 1 as appropriate.
- Create your new part studio and "derive" the sketch from step 2. When you derive this sketch into the new part studio, you'll be able to change any configuration that you set up previously. Note: this does not change anything in the original part studio.
- Continue with your modeling in the new part studio with your derived and configured layout sketch.
Configurations (onshape.com)Sorry I missed your question before. I made a simple example of what I was talking about. It's a simple block with a "master" that has configuration variables for width, length and height. I then created two examples part studios of how it can be used, one derives it in with the width and length fixed so that only the height it configured and the other configures all three parameters in one table to create "standard sizes" (which I think is pretty close to your example of a tennis racket), you could add new sizes to this without changing the master.
Obviously there are a lots of variations on this theme possible depending on what you are trying to achieve including using configuration variables in the "derived" studio for continuous adjustment or having multiple configuration tables to adjust the parameters separately to set values, etc...
https://cad.onshape.com/documents/46a326b4a97bd99579866e64/w/98aff52f023b0b23139beb54/e/a699a4775463f98ce0b0d693
Hopefully the example above helps...
I had a different idea in my mind, but when looking at your example I found inspiration for another approach. My original problem with configurable variables was that I could not calculate with them.
The use case I have in mind is this
Imagine you want 4 types of building long, wide, tall and cube buildings. Before you build the original size, you want to create a model. And if maybe somebody comes and wants exactly the same type but bigger (which already happened). So I want to scale up and down and keep but keep the original values defining the types. That worked with another scale factor. And instead of using directly the config vars width, length and heigth I created vars scaledWidth = ScaleFactor * Width. That seems to work fine.
https://cad.onshape.com/documents/d0bffd57e46d5bf814f3276b/w/436e62223fb87fcfe3bea99a/e/999478c7ac4e3926a7fe71b7
So thanks again for your input!
Best regards
Markus
Glad that helped, setting up a scale factor is a good way to do this. This general approach of a master with "infinite configurability" and deriving it into other part studios to create subsets is quite powerful.
Note that you could have the scale factor as a separate variable so that you could have your different standard "shapes" and be able to scale them by some arbitrary factor as well like this:
https://cad.onshape.com/documents/d2d3382aa18189471db96624/w/bfdb4819bc7e743e462a92ad/e/3cabd1adc41fd25c9e4a9ec9