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.

Options

How to get part number applied to a drawing

glen_dewsburyglen_dewsbury Member Posts: 582 ✭✭✭
I have been using the auto name feature for exporting files like PDF, STL and Parasolid's and I am quite pleased with the time saving and reduction of typos.
All works well except drawings. I have been using the part numbers of parts/assemblies to display on the drawing so the drawing does not have its own number.
I'm wondering if there is a way to automatically extract the part number, name and revision then apply to drawing properties in the drawing template? This would be a time saver.
One client is not using the release process and another is using full release management so I don't know if this makes any mix up for managed documents?
Also have someone that wants to add a date to the file name (a little confused as to why since files have their own creation date) but could not find a property for date.

Best Answers

  • Options
    mlaflecheCADmlaflecheCAD Member, Onshape Employees, Developers Posts: 179
    Answer ✓
    @glen_dewsbury this is possible without additional properties in the drawing: My export rule here is: ${reference.sku}-${name}_${rev}

    In your account, depending if you have other names for the properties like Part Number (I call mine "SKU") so the part number is coming from the part itself.  If you use the default name, it will be "reference.partNumber" which as it says, calls the part number of the part reference.  I numbered the drawing "800-003328" and the Part Reference is "100-003328"  and my resultant PDF export is as shown below with the part 

    To export a PDF in this case, with the REV added to the name, ensure that you are exporting from the released version of the document from the drawing you want to export.  There are other places to do this, but I chose to go to the version, look at it, and export from there.


    In the case of working in multiple Onshape Companies as a Pro level user, you can also set rules per company.


    Here is more on the topic from Lindsay https://www.onshape.com/en/resource-center/tech-tips/tech-tip-how-to-set-up-export-rules-in-onshape



    Regards,
    Mike LaFleche   @mlaflecheCAD
  • Options
    glen_dewsburyglen_dewsbury Member Posts: 582 ✭✭✭
    Answer ✓
    Thanks @mlaflecheCAD. That's perfect.

Answers

  • Options
    mlaflecheCADmlaflecheCAD Member, Onshape Employees, Developers Posts: 179
    Answer ✓
    @glen_dewsbury this is possible without additional properties in the drawing: My export rule here is: ${reference.sku}-${name}_${rev}

    In your account, depending if you have other names for the properties like Part Number (I call mine "SKU") so the part number is coming from the part itself.  If you use the default name, it will be "reference.partNumber" which as it says, calls the part number of the part reference.  I numbered the drawing "800-003328" and the Part Reference is "100-003328"  and my resultant PDF export is as shown below with the part 

    To export a PDF in this case, with the REV added to the name, ensure that you are exporting from the released version of the document from the drawing you want to export.  There are other places to do this, but I chose to go to the version, look at it, and export from there.


    In the case of working in multiple Onshape Companies as a Pro level user, you can also set rules per company.


    Here is more on the topic from Lindsay https://www.onshape.com/en/resource-center/tech-tips/tech-tip-how-to-set-up-export-rules-in-onshape



    Regards,
    Mike LaFleche   @mlaflecheCAD
  • Options
    glen_dewsburyglen_dewsbury Member Posts: 582 ✭✭✭
    Answer ✓
    Thanks @mlaflecheCAD. That's perfect.

  • Options
    justin_hodgesjustin_hodges Member Posts: 8 PRO
    Hey, this helped a ton! Thanks for the tip!
Sign In or Register to comment.