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.

How do you personally use Branching, Merging and Versions

colemancoleman OS Professional Posts: 244 ✭✭✭
I am just curious.  Ive been using onshape for one year now and I have not fully implemented versions and branching into my workflow.... mostly because I do not fully understand it.


Comments

  • shanshanshanshan Member Posts: 147 ✭✭✭
    I have applied for this function very successfully, you know , if multiple persons work in a single work space at the same time , we can not have a very fast operation speed , and even sometimes there will be some interference among them , so we can create some other work space,and different person works in different work space, and they are independent . after everyone completes the task, we can merge the parts in other work space into main work space, so we can create general assembly . for version ,we can save different versions for a part, for example, I  have to design two types  Swivel Joint for two type gears , but these two  Swivel Joint are 90% similar , so after finishing designing the first type , I save it as version 1, I  will make some modifications as the second type , and save it as version 2 , so when doing the general assembly ,we can choose any version of this part.
  • shashank_aaryashashank_aarya Member Posts: 265 ✭✭✭
    Generally versions are considered as variants. Let me give you one example. Suppose Mercedes has specific sedan model available but depending on requirement it will also manufacture different variants e.g. petrol version, electric version and hybrid version. So, when designer creates any assembly for specific model, there must be variants for it even if the basic design is same. Once your design is fully approved and there are no further changes you can create version for it say "petrol version" which acts like a variant and it cannot be changed further. But your main workspace will allow you to modify it if any changes come in later stage say for electric version. Even user can create any number of branches from version to create the workspaces. When any design from different workspaces is fully approved once again you can create the version as "Electric version". After that you can modify the main workspace further to create Hybrid version. All versions will be in the same document which is one of the Onshape's strength. In short version means fully defined design in which no further change is required and not allowed.
  • viruviru Member, Developers Posts: 619 ✭✭✭✭
    @coleman,
    Version and Branching:
    You can create versions (which are View only) and branch a version to create a new workspace. You can also comparing workspaces and versions, any combination of the two.
    Merging: Onshape provides a mechanism for merging from a document version or workspace (referred to as the Source) into your currently active workspace (referred to as the Target). Specifically, when you merge a selected Source (workspace or version) into the currently active Target (workspace), all changes made in the Source are merged into the Target, including any additional features, tabs, etc.
    Kindly refer below thread for more detail.
    https://cad.onshape.com/help/#versionmanager.htm?Highlight=branching and merging
    https://cad.onshape.com/help/#merge.htm?Highlight=branching and merging
  • traveler_hauptmantraveler_hauptman Member, OS Professional, Mentor, Developers Posts: 419 PRO
    @coleman If you are working solo, then the easiest way to get some benefit from the version system is to use it as a fancy undo, redo system. Whenever you are particularly happy with the state of a document-in-progress, save a new version. Do the same when you are about to try something you are not sure will work. If you hit a dead-end in your design, open up the version control and branch off the last saved version that has the state you want to retry from. Rinse and repeat. Work until you hit a dead end, branch from the version you want to start anew from.

    This workflow is a little different than version control purists might use, but it's dead simple and immediately useful. Onshape gives you more-or-less infinite undo capability and the version control capability let you tag (create a version) points in your undo list that are important to you.

    The next workflow you might try is having a main branch and a test branch. The main branch is where you put all the important changes to your model, and you only make changes to your main branch that are complete. The idea is that each version of the main branch is fully manufacturable, with no errors. When you are making changes, you create a temporary branch for that purpose and work on it until everything is just right. Then, rather than make the changes to your main branch by hand, you can use merge to bring all the changes from your test branch onto the main branch.

    Once you are comfortable with merging, you can learn some tricks to copy over only certain changes from one branch to another, rather than all of them.

    Once you have a team, or schizophrenia, version control helps coordinate multiple people work on the same part, or near parts, of a document at the same time.

    There is much more discussion on best practices for version control in the software world, and the high level discussions are relevant to the use of version control in onshape. Some web searches for 'why use version control' will get you started.


  • colemancoleman OS Professional Posts: 244 ✭✭✭
    @traveler_hauptman thank you for the response. 
    My question is this:
    What if I have a multi-part studio...with multiple tabs and assemblies.  When I create a version....the whole document is effected by the new version (all parts, tabs etc.)

    Now what if I want to keep a version control record with onshape.  For example: part A is in version 2 and in production....then 2 months from now we have a product update and now product A needs to move to version 3.  If I create a new version...the entire document advances to version 3....even the parts that in real life are in version 2.

    Maybe I don't need to think of onshape as a way to control product version history on a part by part basis.  

    I suppose with linked documents it would be possible, but we lose the multi-part design functionality.  
  • traveler_hauptmantraveler_hauptman Member, OS Professional, Mentor, Developers Posts: 419 PRO
    Yeah, the version control in Onshape is for data versioning, not engineering change control. You are only partially right that the whole document is affected by the new version. Everything is saved, yes, but assembly, part-studio, and part revision numbers are unaffected. These have to be incremented manually by whatever internal process you have. (Right click a tab or part and select 'properties...' if you are unsure what I'm talking about).

    Off the top of my head, the second approach I mentioned would actually work pretty well for engineering change control. The main branch holds only document-versions for which each part has a checked and released engineering version. Any team member can be working on improvements to any part in that document in work-in-progress branches. Once the work in the branch is checked, the person responsible for release merges that branch into the main branch.

    What is missing to make this work is that the search bar in the derived part tool does not search part number or part revision (relatively easy for them to fix) and furthermore, the search bar should search for part revision across document versions which may or may not be easy. Based on the responsiveness of grabbing the properties of old versions in the version dialog, I'm guessing that all the part properties like revision are stored as document-version metadata and pretty quick to access for search bar purposes.

    Who knows, maybe there is a feature request for exactly this thing (searching part revision and number in the derived tool) already.

  • stevehessstevehess Moderator, Onshape Employees, Developers Posts: 98
    Tagging on here... great stuff.
    Steve Hess \ Onshape Inc.
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,073 PRO
    One document & one tab. Works fine but you end up with a lot documents.

    I do everything in one part tab, then version it so I can get back and abandon a crazy idea. 

    This is the same as copying a part file in old systems and starting with the copy.

    I haven't built a complex project data structure inside OS yet. 

     
  • chris_8chris_8 OS Professional Posts: 102 PRO
    coleman said:
    I am just curious.  Ive been using onshape for one year now and I have not fully implemented versions and branching into my workflow.... mostly because I do not fully understand it.


    Something I do not understand is stated in this OnShape instructional video at 1:40:
    https://www.onshape.com/videos/branching
    The presenter says "Because the entire cylinder is modeled in one Part Studio, changing a few dimensions updates many parts at once." 

    I thought that creation of a Version spot on the main branch (which allows for new branches with new variants) made it impossible to go back and make a change that affects all the branches.  

  • john_mceleneyjohn_mceleney Onshape Employees Posts: 57
    edited September 2016
    @colemanVersions in Onshape are immutable, meaning they cannot be changed,  So it is not possible in Onshape to make a change in a version that affects other branches.  

    Branches are designed as a mechanism to investigate alternative designs.  Branches are made from versions and inherit all the data from that version to start the new branch.

    If you have a design on Main and want to evaluate some alternatives, simply make a version on Main (V1) and then branch from V1.  In the end, if the the alternative proves to be useful, you can merge the model changes back into Main.

    I hope this helps.  Keep in mind that configurations (variants) are in the works and will give you that "make a change and have it propagate downstream" behavior you may be looking for

     If not, email me directly and perhaps we can discuss. My email is jmceleney <at>onshape <dot> com

Sign In or Register to comment.