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.

Imprint document version on parts?

kevin_garrett
kevin_garrett Member Posts: 3 ✭✭
I design parts for 3D printing. I'd love to be able to have the document's version number on the parts. I go through so many minor iterations! So basically I want the version number to be in a Text object in a sketch and automatically update. Possible?

Best Answers

  • romeograham
    romeograham Member, csevp Posts: 770 PRO
    Answer ✓
    Oh - I see it now. The #Imprint in the text field cannot be in quotes. If it's entered in quotes, it's evaluated as a string.
  • kevin_garrett
    kevin_garrett Member Posts: 3 ✭✭
    Answer ✓
    It took some futzing to get it to work but it is working. The text in the variable must be in quotes. I sure would love it if there was an automated way to update the version number, but for now, this is good enough. Thanks everyone for your help.








Answers

  • martin_kopplow
    martin_kopplow Member Posts: 1,546 PRO
    edited December 2023
    I am also very interested in this. I thought it might just work this way below, it looked good as I was able to enter the variable name in the text input and it was recognized, but then ...


    ... is doesn't accept the numbers from the value field. Maybe this could be done with FS, but I am not good in coding. Also there should be an automatism at work, keeping the part number updated, not a one shot solution.

  • kevin_garrett
    kevin_garrett Member Posts: 3 ✭✭
    Thanks for your interest and for trying. I had not thought of the method you tried. I was thinking only of the documents version number. Still, your solution would work for me... If it worked. Dang. It SHOULD work.
  • martin_kopplow
    martin_kopplow Member Posts: 1,546 PRO
    Yepp, it SHOULD indeed work, especially since the varialble name is already recognized and proposed by the system, as we type in the input field. I believe this might be worth an improvement request.
  • romeograham
    romeograham Member, csevp Posts: 770 PRO
    Right click in the text field and select "Convert to expression..." and the #variable should be recognized.
  • martin_kopplow
    martin_kopplow Member Posts: 1,546 PRO
    @romeograham , that's what I tried, but appaerently it is not. It is kind of recognized, in that the prompt menue appears, but then the text changes to the name of the variable, not the value. Did I maybe miss somthing?
  • romeograham
    romeograham Member, csevp Posts: 770 PRO
    Ahh. Is the variable "1234" in quotes?
  • romeograham
    romeograham Member, csevp Posts: 770 PRO
    Answer ✓
    Oh - I see it now. The #Imprint in the text field cannot be in quotes. If it's entered in quotes, it's evaluated as a string.
  • kevin_garrett
    kevin_garrett Member Posts: 3 ✭✭
    Answer ✓
    It took some futzing to get it to work but it is working. The text in the variable must be in quotes. I sure would love it if there was an automated way to update the version number, but for now, this is good enough. Thanks everyone for your help.








  • martin_kopplow
    martin_kopplow Member Posts: 1,546 PRO
    edited December 2023
    Okay, that works at least as a manual input. Great. It is funny, though, that the quotes disappear in the variable table, as soon as I hit ENTER, but still appear in the text edit dialog. I find that confusing.
    An automated feature would sure be great! I could even imagine this as a general "Type Label" Feature. That would make sense to me, at least for AM parts.
    Could the part number and revision possibly be queried and put into the variable table in some way?
  • don_b
    don_b Member Posts: 161 ✭✭
    edited December 2023
    unless it is a sheet metal part in which case you have to work on the sketch previous to sheet metal conversion and extrude remove the text before convert to Sheetmetal part.....unless there is something I do not know

  • onshaper
    onshaper Member, Mentor Posts: 99 ✭✭✭
    edited June 22

    we really want this. i understand why having a feature update automatically with the version number doesn't make sense in the strict sense, but it would be massively useful. nothing worse than exporting a new version of a part with an old version number engraved in it. and there's nothing technically stopping this from working. would want a notation for when the version wasn't committed

    ie:

    • commit v1
    • export with auto engrave "v1"
    • make change
    • export with auto engrave "v1*" (denoting uncommitted changes, export shows warning dialog that this version hasn't been committed)
    • commit v2
    • export with auto engrave "v2"
  • martin_kopplow
    martin_kopplow Member Posts: 1,546 PRO

    Yes, I would still find this very useful. I use 3D printed items for trials and demos a lot. If I could just have the shop reporting "The part with V5 on it was a better fit than the older ones" that'd be great, and also for customer trials. Meanwhile I would also use it for small batch production parts since we update them now and then. They're still "the part" but might have minor improvements unrecognizable to the uninitiated.