Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

Understanding primary instance

billyzelsnackbillyzelsnack Member Posts: 87 PRO
edited September 2018 in Using Onshape
I did a search but I still don't understand what a primary instance actually is. While building I get seemingly random messages that I need to go set a primary instance but I don't understand why. I just noticed tonight that the in-context arrows in the assembly part list has two types of arrows. Solid and dashed. It appears that for any given part studio you can have a single part active as the primary instance at any time. (Probably where that primary word comes in.) However toggling between parts does not appear to have any impact on in-context building just as long as I have at least one set. In what scenario does it matter which one I choose and why?







Best Answer

  • billyzelsnackbillyzelsnack Member Posts: 87 PRO
    edited September 2018 Answer ✓
    I have watched that video many times. I should watch it again now that I have had the in-context aha moment so I can see how dumb I have been for massively over-complicating things.

    >Theoretically, we do not need this concept other than the scenario in which the primary instance no longer exists.
    It's a mysterious feature without a whole lot of visibility into being able to see what exactly is going on. It's like you're setting a pointer variable for the programmer's sake ( context is not meaningful if it's null ) rather than setting the CAD intention ( here's the origin of your context. )

Answers

  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
    As I understand it Primary instance makes sence for editing part in context, you may have several parts of the same part studio in the assembly (or even several instances of the same part) and when you want to edit one of them in context appointing primary instance would position all the part studio relatively to a certain part, it gives you control around which part the context should be positioned when added to part studio.
    Though you wouldn't see the difference in changing primary instance if your assembly is static and contains one instance of each part of part studio.
  • philip_thomasphilip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381
    Konstantin is correct - the primary instance is the 'anchor' part within a Part Studio around which the Assembly is displayed. 
    Theoretically, we do not need this concept other than the scenario in which the primary instance no longer exists. In that event, the ability to nominate a new primary instance from one of the other parts in the Part Studio, preserves the validity of the Context and In-context features (without this ability, the context could never be updated). He is also correct that if the parts in the Part Studio are used in the assembly in exactly the same spatial relationship that they are to one another in the Part Studio, that a user would be left scratching their head as to what difference this all makes.

    The Onshape help goes into this in a bit more detail . . 
    https://cad.onshape.com/help/Content/in-context.htm?tocpath=Desktop Help|_____9

    There is also a self-paced course in the Learning Center.
    https://learn.onshape.com/courses/managed-in-context-design



    I hope this helps.




    Philip Thomas - Onshape
  • billyzelsnackbillyzelsnack Member Posts: 87 PRO
    edited September 2018 Answer ✓
    I have watched that video many times. I should watch it again now that I have had the in-context aha moment so I can see how dumb I have been for massively over-complicating things.

    >Theoretically, we do not need this concept other than the scenario in which the primary instance no longer exists.
    It's a mysterious feature without a whole lot of visibility into being able to see what exactly is going on. It's like you're setting a pointer variable for the programmer's sake ( context is not meaningful if it's null ) rather than setting the CAD intention ( here's the origin of your context. )

  • ryan_mcgoldrickryan_mcgoldrick Member Posts: 66 ✭✭✭
    Hello, just continuing on with this, we recently copied a version of a document workspace and in the copied document the assembly had a part that comes in as red saying part could not resolve instance part is not primary instance of context.

    This shouldn't occur should it? we've tried copying a few times now to no success.
  • Chris_D_Mentes_001Chris_D_Mentes_001 Member, csevp Posts: 103 PRO
    This seems like a useless and a ridiculous extra step. Can't it be Optional / Automatic?
Sign In or Register to comment.