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.
Passing a variable from Part Studio A to Part Studio B
HuguesLessardWRI
Member Posts: 14 PRO
Hi,
I am wondering if there was a way to pass a variable from a Part Studio to another one in the same document, at least passing only its value... I would expect that a Derive would work, but nope.
P.S. Variable can have a few different meanings in Onshape, The one I am questionning here is the one that appears as an (x) in toolbar / the feature tree.
Thanks in advance for your help,
Greetings,
I am wondering if there was a way to pass a variable from a Part Studio to another one in the same document, at least passing only its value... I would expect that a Derive would work, but nope.
P.S. Variable can have a few different meanings in Onshape, The one I am questionning here is the one that appears as an (x) in toolbar / the feature tree.
Thanks in advance for your help,
Greetings,
Tagged:
1
Best Answer
-
Alex_Kempen Member Posts: 248 EDUMy variable library FeatureScript should work pretty well for things like this, especially if you don't feel like dabbling with FeatureScript. Declare your variables in the variable library UI, then import the corresponding cube into your other part studio (using another instance of the variable library feature).
Ilya Baran's Super Derive FeatureScript also has an option to bring in variables when you use it to derive something from another part studio, so that might also work reasonably well for you.CS Student at UT DallasAlex.Kempen@utdallas.eduCheck out my FeatureScripts here:3
Answers
Ilya Baran's Super Derive FeatureScript also has an option to bring in variables when you use it to derive something from another part studio, so that might also work reasonably well for you.
Please
For your use case, you might be able to create a workaround by adding a print layout configuration boolean to your master assembly. You could have users check it, then export their parts from the master assembly directly. Depending on how your assembly is set up, you might have to jump through some hoops with changing mate definitions and/or underlying configurations to get it to work, and the other configuration options wouldn't be hideable (since the visibility of configuration inputs can't be configured), but it might actually end up being easier for end users to use than your original solution.
I understand the logic with the boolean but don't know how to implement it. Basically the parts should be layed out flat and separated for the 'printlayout' so how can the boolean change the positions?
You gave me a solution: Double all the pieces.
One set shows the assembly in assembled form
The other shows the assembly in printlayout form with that set of pieces layed out on for 3D printing.
A boolean configuration allows the user to suppress one or the other set.
Works great. However I think its a workaround that onshape could easily implement by allowing truely global variables out of the box. ;-)