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.

Revert a part studio in Main to last released version

Hi, I'm sure I'm being slow but... I have a Document with a number of collaborators.  I had released a number of parts but one of the team has inadvertently since changed the part in Main.  There have been lots of other changes, so I can't simply roll the whole Document Main branch back to before the change. How do I simply revert that one Part Studio back to the released version? I can see it (in the version tree and in Release history), and I can even specify the particular release for use in assemblies etc. But I can't get the version in Main back to how it was before. What am I missing? Thanks

Best Answer

  • eric_pestyeric_pesty Member Posts: 1,954 PRO
    Answer ✓
    You can't just revert a single part/part studio as version affect the whole document...

    However depending on what happened to the part you might be able to selectively revert some changes. There was a "tips" video about that but I can't find it...

    This will not be practical if there a bunch of changes scattered around but if it's only one change (or a bunch in a row), his how you can do this:
     - Create a version directly above the last change (micro version) you want to undo (i.e. by right clicking on it), let's call it "End"
     - Crate a new branch from this "End" version
     - Restore the last good micro version (from the main branch), (we can call it "Start"), to this newly crated version. If you were tying to fix just a single change it would be just below the action you wanted to revert (i.e. the one you created the version from above)
     - You can merge this new branch to main and it will undo all the changes contained between "Start" and "End".

    Hope that makes sense!

    There might be another way of achieving something similar by crating a branch from the "good" point, moving the part studio out to another document, merging that in (so the part studio isn't there anymore), and moving the "good" one back in. I think that might work?

Answers

  • eric_pestyeric_pesty Member Posts: 1,954 PRO
    Answer ✓
    You can't just revert a single part/part studio as version affect the whole document...

    However depending on what happened to the part you might be able to selectively revert some changes. There was a "tips" video about that but I can't find it...

    This will not be practical if there a bunch of changes scattered around but if it's only one change (or a bunch in a row), his how you can do this:
     - Create a version directly above the last change (micro version) you want to undo (i.e. by right clicking on it), let's call it "End"
     - Crate a new branch from this "End" version
     - Restore the last good micro version (from the main branch), (we can call it "Start"), to this newly crated version. If you were tying to fix just a single change it would be just below the action you wanted to revert (i.e. the one you created the version from above)
     - You can merge this new branch to main and it will undo all the changes contained between "Start" and "End".

    Hope that makes sense!

    There might be another way of achieving something similar by crating a branch from the "good" point, moving the part studio out to another document, merging that in (so the part studio isn't there anymore), and moving the "good" one back in. I think that might work?
  • eric_pestyeric_pesty Member Posts: 1,954 PRO
    I should add that if the change to main is "valid" but not required "yet", you should keep in mind that unlike a standard PDM system the "latest" active workspace usually contains "work in progress" and should not be "used" as it is by definition not a "release" so you may not actually need to rollback that one part studio.

    Reverting the Part studio as above should only be done if the change was a mistake and should be discarded...
  • chris_evans760chris_evans760 Member Posts: 6 PRO
    @eric_pesty thanks so much for the detailed response.  I'd seen comments like "make a branch" but couldn't work out how to achieve what I needed.  The change was a mistake rather than WIP so I'll remove.  My instinct was that I should be able to "copy" the good part studio from further up the tree and "paste" over the top of the incorrect one.  But I don't think that's possible? 
  • eric_pestyeric_pesty Member Posts: 1,954 PRO
    @chris_evans760
    No, you can't just "copy/paste" as the part studio is defined as a series for actions stored in a database rather than a file.
    I think the closest to that is the second option I am proposing where you create a branch that has the "good" part studio in it, then move it temporarily to another document and merge that in your main branch.
    Then if you go to your temporary document and move it back, you should end up with what you want. You may end up with some broken references but most of them should be ok.

    It might help to go over (or refresh your knowledge if have already done so) some of the material related to branching and merging in the training center if you are not comfortable with the process.

    Good luck!
Sign In or Register to comment.