Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
Auto-populating Part Numbers and/or Names
Aidan_Benysh
Member Posts: 6 PRO
As best I can tell, part names are automatically generated by Onshape when parts are initially created with the nomenclature Part [Number in design hierarchy]. Part numbers can be created automatically as well such that you can also use a numbering scheme that has a continuous counter that goes up for any part that is released, or for any part which the part number is manually applied in the same format. Bearing this to be true, I have the following issue:
In my case, my company does not use release management at this time, therefore it is required to add the part number (through the auto generate button) to parts individually or at the BOM level in assemblies. This is a step that could be perceived as "skippable" to some. In order to save a not insignificant amount of time, is it possible to automatically populate the part number with the pre-formatted sequential numbering scheme that is set? (I have only found information stating that it is not possible to auto-populate the part name, but little information on the part number) I have seen in these forums many people finding work arounds utilizing the part name with a preset excel sheet or a conjunction external PDM software but this is not something I would be interested in; I feel like it could be inherent to the product.
The reasoning behind this may reveal a different method of attack for the true problem I have; once parts are complete in Onshape we will export them into our ERP software (Revision management is handled within the ERP software at this time, hence why we aren't as worried about it while designing in Onshape). Within this software every part must have an individual name as to not overwrite previous logs associated with any existing parts. You can imagine there are a lot of "Part 1"s.
Therefore I see two possible paths:
Option 1: We could simply use Onshape's built in part/assembly numbering system which would retain a constant count of parts designed keeping each individual as a property level that could then be referenced under the export rules to label them with "uniqueness" upon export. In this case the part number would be the extent of the characterization of the part.
Option 2: We could define custom properties that could be referenced within the export rules to characterize the part, along with an individual string of characters or numbers. The best way I can figure to create an individual string would be a timestamp for the export time on each part. That being said, an issue arises when exporting multiple files for reference by the guys on the shop floor as when comparing the filenames/part numbers for a DXF vs a STEP file they could have contrasting numbers, normally a very bad thing.
I'm mainly looking for opinions on what method may been seen as more "robust", or if there is a better custom property method that could be used during export to generate individual yet characteristic file names?
Thanks in advance.
In my case, my company does not use release management at this time, therefore it is required to add the part number (through the auto generate button) to parts individually or at the BOM level in assemblies. This is a step that could be perceived as "skippable" to some. In order to save a not insignificant amount of time, is it possible to automatically populate the part number with the pre-formatted sequential numbering scheme that is set? (I have only found information stating that it is not possible to auto-populate the part name, but little information on the part number) I have seen in these forums many people finding work arounds utilizing the part name with a preset excel sheet or a conjunction external PDM software but this is not something I would be interested in; I feel like it could be inherent to the product.
The reasoning behind this may reveal a different method of attack for the true problem I have; once parts are complete in Onshape we will export them into our ERP software (Revision management is handled within the ERP software at this time, hence why we aren't as worried about it while designing in Onshape). Within this software every part must have an individual name as to not overwrite previous logs associated with any existing parts. You can imagine there are a lot of "Part 1"s.
Therefore I see two possible paths:
Option 1: We could simply use Onshape's built in part/assembly numbering system which would retain a constant count of parts designed keeping each individual as a property level that could then be referenced under the export rules to label them with "uniqueness" upon export. In this case the part number would be the extent of the characterization of the part.
Option 2: We could define custom properties that could be referenced within the export rules to characterize the part, along with an individual string of characters or numbers. The best way I can figure to create an individual string would be a timestamp for the export time on each part. That being said, an issue arises when exporting multiple files for reference by the guys on the shop floor as when comparing the filenames/part numbers for a DXF vs a STEP file they could have contrasting numbers, normally a very bad thing.
I'm mainly looking for opinions on what method may been seen as more "robust", or if there is a better custom property method that could be used during export to generate individual yet characteristic file names?
Thanks in advance.
0
Answers
We have implemented the automatic part numbering schema and have turned on the release management in order to better utilize the part numbering feature. With the part numbering feature we have also applied export rules to export STEP files with parts following this format: ${partNumber}-${revision} therefore with our part number system we would be looking for a file with the name "P1201-A" as an example.
This works fine for singular parts, the problem appears to be with assemblies. When exporting an assembly I can't seem to figure out how to get the components within the assembly to come through to the next software with their assigned part number. The assembly would come through fine (with the expected part number) as "ASM1201-A" however the parts come through with their (un)assigned name, "Part 1" or whatever random name is applied to them. Our assembly export rule looks like this:
With the category set to all categories I believed it would apply to assemblies, subassemblies and parts underneath the scope of assembly, is this correct?
At this time the scope for parts also has this same export rule.
Inherently this also returns to my original question and one that was posed in 2021:
https://forum.onshape.com/discussion/16972/part-names-part-numbers
Under the linked forum post there are work arounds but not perfect solutions to the problem asked.
Since the previous post we have turned off release management as the part number generator (a positive feature) did not outweigh the learning curve that appeared. In that case the part numbers which were being generated were great, however they did not carry through when we attempted to export assemblies or part studios wholly. Therefore for the time being release management has been taken away.
Currently I am attempting to make export rules work for our use-case and the following nomenclature appears useful:
This, once again, works great for singular parts and for the top level of assemblies and/or part studios. The parts within the assemblies do not seem to translate over however once the files are exported from Onshape for further use, reverting to their Part 1, Part 2 etc. common naming convention.
This appears to be a common issue when using a different step translator between import and exporting operations. Looking into the causes of this I reference the following sources for information:
https://forum.freecad.org/viewtopic.php?style=4&t=39438
https://forums.autodesk.com/t5/fusion-support/when-exporting-to-step-file-all-body-names-and-folders-are-lost/td-p/10758938
https://www.alibre.com/forum/index.php?threads/loss-of-part-names-in-exported-assemblies.7123/post-37687
Per these sources I went to look at an exported Step (AP242) from Onshape and imported it back into Onshape to see what happens.
That test yields positive results:
Looking at the step file from that export we can see that the part name is provided under the identity "PRODUCT". And when imported all the names match with the imported parts.
Ref. https://www.steptools.com/docs/stp_aim/html/t_product.html
So we know that the exporter is taking the part names. We also know the part names cannot be auto-generated or directly link to a part number. Therefore, what does export rule do for me when I am trying to get parts to export with a provided file name from within an assembly or a part studio?
Even if I include Parts as a category within the scope of Part Studios and assemblies, I yield the same results. Have I misunderstood how the export rules are meant to function?
Under these settings Part Studios import using the names created by the export rules as shown:
Are we unable to utilize this on contained parts in the part studio?
Any feedback or thoughts would be appreciated.