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.

Accessing the project version

Hi,
I am tying to get the current project version in order to use it as a variable in a text extrusion.

Would be awesome to automate the part versioning system.

Any idea on how to do it?

Thanks

Comments

  • alnisalnis Member, Developers Posts: 447 EDU
    Welcome to the forum @eduardo_oliveira349!

    There isn't a way to do exactly this AFAIK, at least from this thread:
    https://forum.onshape.com/discussion/comment/68327

    My understanding is that since the version's name can change, but the geometry can't in a version, having something regenerate based on the version's name isn't possible.

    However, between the property explorer custom feature and the expression-based surface text custom feature, you can probably get most of the manual stuff automated out. You could make a configuration text variable that drives the expression for the text as well as add a property to the part (such as part number) at the same time, and then you just need to type the version's name into the configuration variable. Or, if you want the text to be locked for a version, you could make a regular variable and set it to the name you plan to give to your version before making a new version.

    Hope this helps!
    Student at University of Washington | Get in touch: contact@alnis.dev | My personal site: https://alnis.dev | Currently an Onshape intern: asmidchens@onshape.com
Sign In or Register to comment.