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.
Cannot set primary instance
gauthier_östervall
Member Posts: 99 ✭✭
The doc about modeling in-context tells me how to set primary instance in an assembly:
In my assembly, selecting a part, right-clicking shows a menu, but no <context name>. Has this changed? Does the documentation need an update?
The workflow I came up with (this is probably where the problem is, not thought to be used that way): I created the yellow part in a part studio. The grey part in another. Now I want to "free place" them in an assembly, because it's much more convenient than in a part studio. Last, I did "Create Part Studio in Context", and I want to do the actual merging of parts in that new Part Studio.
But there, I get the infamous "No Primary Instance", which I was hoping to give in the assembly, as per the doc.
What should I do?
Set primary instance
The primary instance is created when you edit a part in-context and is indicated by a solid arrow beside the feature in the Feature list (in the Part Studio) and beside the part in the Instance list (in the Assembly). The primary instance defines the anchor part (the part selected for the Edit in context command) for the placement of the ghosted assembly in the Part Studio; all other assembly components appear in the Part Studio in relationship to that primary instance.
You have the ability to change the primary instance of a Context at any time and may wish to do so especially in the case of a broken or missing primary instance:
The primary instance is created when you edit a part in-context and is indicated by a solid arrow beside the feature in the Feature list (in the Part Studio) and beside the part in the Instance list (in the Assembly). The primary instance defines the anchor part (the part selected for the Edit in context command) for the placement of the ghosted assembly in the Part Studio; all other assembly components appear in the Part Studio in relationship to that primary instance.
You have the ability to change the primary instance of a Context at any time and may wish to do so especially in the case of a broken or missing primary instance:
- In the Assembly, select a part.
- Right-click to access the menu, and select <context name> > Set as primary instance.
In my assembly, selecting a part, right-clicking shows a menu, but no <context name>. Has this changed? Does the documentation need an update?
The workflow I came up with (this is probably where the problem is, not thought to be used that way): I created the yellow part in a part studio. The grey part in another. Now I want to "free place" them in an assembly, because it's much more convenient than in a part studio. Last, I did "Create Part Studio in Context", and I want to do the actual merging of parts in that new Part Studio.
But there, I get the infamous "No Primary Instance", which I was hoping to give in the assembly, as per the doc.
What should I do?
0
Comments
if you select "edit in context" from that menu you show, then it will create a new context and set that part as the primary instance.
the only time you need to manually set the primary instance is when the in-context reference is lost. Like if you make a new part in context but don't insert it right away.
In the new Part Studio I did a "Transform -> Copy in place" of the two parts in the context.
Now I've updated the assembly, so the context. I'd like to update the context in the new Part Studio.
> if you select "edit in context" from that menu you show, then it will create a new context and set that part as the primary instance.
But I don't want to create a new Part Studio every time I modify the assembly. I understand this may not be what you were suggesting.
> Like if you make a new part in context but don't insert it right away.
Do you mean that I should insert the merged part from my new Part Studio, into the assembly?
One is to click on the 'create partstudio incontext' button in the assembly.
That will create a new partstudio which you can create a new part.
If you just want to add contextual related features to an existing part. Right click the part and start editing. You can also double click the part in the tree.
Normally you won't need to worry about manually setting 'set primary instace' that tool is for allowing you to set an instance later on incase something happens. For example, you may delete the original primary instance in the assembly later in design. So you would then need to set a new primary instance Only if you keep adding more incontext relations, or if you need to reattach some broken ones.
(43) Designing In Context in Onshape | Webinar (January 18th, 2018) - YouTube
That will create a new partstudio which you can create a new part.
That's what I'm trying to do, but it won't let me update the context in the Part Studio. Do you mean that there should be a primary instance already, but somehow I've lost it? And apparently cannot give a new one with the context menu?
you will need to insert your part from the insert and go to assembly option.
then choose your parts to insert
here you can see the part automatically become the primary instance because the arrow icon is solid black
if you instead just insert the part after the fact
then you will see the part has context, but there is no part that is a primary instance, so there is no reference point for incontext to begin.
So we set one part as the primary instance, and also selecting which context we are setting the primary instance (only one to choose from this time)
(I also inserted a few more copies here so you can see the difference)
now let's slide the thin block away from the large block, my incontext relation started on that corner point being coincident.
now when i update the context, you can see everything works again
So again, you should only need to "set primary instance" if you mess something up
> you will need to insert your part from the insert and go to assembly option.
I never did that, or intend to. The workflow I was interested in is:
- assembly, moving things around
- create a new (merging) Part Studio in context (copying in place the parts from the context, and continue working from there).
- never place the new part into the assembly (it'd collide with the already existing assembly parts anyway)
- make placement changes in the assembly, and update the context accordingly in the merging Part Studio
That is not possible, I cannot update (without inserting the part back to the Assembly, you say). From a user perspective, I don't think it makes sense. Maybe from an implementer's point of view.But the additional thing is that the documentation says I should be able to manually set the primary instance, if something went wrong. I can't even seem to be able to do that.
So thanks to your help I have a work-around: insert the part back to the assembly, and hide it. I just verified it works, so thank you! I'll still claim it's a weird step Or it's my use of assemblies that is weird. All of this would have been avoided if the Part Studio "Transform" operation had a mode that allowed for translation and rotation together, the same way it works in assemblies.
Incontext is for bringing information in an assembly into a partstudio. So if you don't need an assembly then you should probably use derive and transform instead.
I think you are creating a lot of extra work with the incontext workflow you suggest
I also tried to just modify one of the parts in the assembly, from its existing Part Studio, and that went smoother. Still some weirdness, having double parts (the original, and a copy from assembly).
I have another simpler example, I think it shows how the features of Assembly really are helpful in Part Studios. My mind still feels there something awkward. I posted it as another question since although it's related, it's really another model and I want to limit confusion.
Here is the new question, with a link to an OnShape document, I hope it helps focusing on the workflow I'm trying to do, and what I should do instead.
Hang in there, the assemblies in OS are very good and take time to understand. In OS you can build sub-assemblies that'll work in higher level assemblies, a library assembly that'll work when inserted into another assembly. With this comes some differences that'll you'll have to understand.
No system will allow you to mix rotates & translates. Rotates are procedural and have to be done in a sequence, it's math, nothing to do with CAD. 90% of the time, when using transformations, I'm using mate connectors.
In assembly, the move handle both has translation and rotation. If it's possible to do in assembly, why not in part studio?
I'm a big fan of mate connectors too, the thing is when I want to "free hand" their position. I need to create a plan, then a sketch, then place a dot or line in the sketch, make sure I have a direction line, then create my mate connector and direct it. After that I can:
- move my part to the connector, and
- "oh, a little to the left",
- open the sketch (which is before the Transform, so the part is not there anymore),
- move the dot a little to the left, not seeing the result until I
- exit the sketch
- "oh, that was too much", go to 3... unless it's the plan I need to move, and then maybe I need to move yet another dot in another plane, to move the first plan, ...
That's how I'm doing it in this other design I was doing today, but comparing it to moving parts around until it looks right in an assembly, it is such a hassle!Regardless, I don't understand why a user shouldn't be able to:
- create an assembly
- create a new part studio in context
- modify the context
- update the context in the part studio, without inserting back the part to the assembly
These are the steps that give me "No primary instance", but no way to define it (besides inserting the part in assembly, which results in double instances of parts. Maybe that's what I should live with).Why is there one tab that can build an assembly & another a part studio?
Math
Parametric modelling is 34 years old and we've always had assemblies & parts. Each of these are so different mathematically that combining them would have taken a long time to develop. It's an easy question to ask, but, a tough thing to solve.
I'm of the opinion that my deliverable is always an assembly and the part studio just creates geometry for my assemblies.
Remember that CAD is a representation of old manufacturing processes and when you consider product life cycle, it's best to have assemblies & parts. I know when you're starting out it seems overwhelming and burdensome. After releasing a product into the wild, it becomes more obvious what we're trying to achieve with CAD.
I'm not going to defend "Primary Instance", I don't think it's necessary. I won't defend "In-context" either. If you look at the history of parametric feature based modeling, In-context is a bolt to the whole math structure and causes a lot of grief for learning & manufacturing. The whole discussion about "top down" and "bottom up" is silly. All the designs are top down. Bottom up is talked about because the CAD math works that way. The CAD guys would love us engineers to accept the bottom up design approach. How can you design a bunch of parts and expect them to work in an assembly? The fact that you can design in an assembly is "In context" and it's kinda screwy.
Don't blame OS, all parametric modelers solve the problem the same way. OS is pushing the paradigm forward and is a great place to hang out.
Also, these are my opinions,