8 Replies Latest reply on May 8, 2015 11:20 AM by John Stoltzfus

    Part Number Marking

    Dennis Schuette

      I am stamping part number into sheet metal and would like to automate it as much as possible.


      Right now I am manually typing the part number into a text box and placing it where I want it at the DXF level. I have a drawing template that I set up for making a DXF with a text box I just have to edit and place.


      We name our file the same part number that the customer send them to us with but we add a few letters in front of the part number to distinguish ours models from theirs.


      I want to be able to link the text box I have set up in the DXF template to the file name but I want to be able to exclude the letters we add to the beginning of the part name. If I can accomplish this then I would just have to move the text box around to where I need it.




      Customer PN: 1234-5678

      Our PN: XZ1234-5678


      Does anyone have any way to accomplish this?



        • Re: Part Number Marking
          Jamil Snead

          Are you working in a SolidWorks drawing or in Drafsight or some other dxf editor?

            • Re: Part Number Marking
              Dennis Schuette

              Jamil, I am using Solidworks drawing.

                • Re: Part Number Marking
                  Mike Pogue


                  Set up a custom property in your part template for the letters, e.g. "OurLetters". In your part marking note, put this text: $PRPSHEET:{OurLetters}$PRPSHEET:{SW-File Name}.

                    • Re: Part Number Marking
                      Dennis Schuette



                      Will what you have here exclude the letters from our part name?

                        • Re: Part Number Marking
                          Jim Sculley

                          No it won't.  If you want to automatically include only part of the file name, you will need something a little more complicated.  A macro could take the file name and remove the unwanted text and then create a custom property with the correct information that could then be linked to the note.  You would have to remember to run the macro (at the start and any time you change the file name) and if the text you add to the front of the file name varies (in length or content), the macro may have to account for that.  An even more sophisticated approach would be a macro feature in the part that does the same thing as the macro.  The advantage is that it would run automatically on every rebuild.  So, even if you change the file name, a model rebuild would update the custom property.  If you want to go hog wild, the macro feature could include a property manager page that lets you customize the file name modification to handle variations in custom part number or the prefix/suffix you add to it.


                          So, short answer, yes it can be accomplished, but not out of the box.


                          Jim S.

                  • Re: Part Number Marking
                    Mike Pogue

                    You would save the file as the customer part name. So, to use your example:


                    The file name of the part should be 1234-5678.SLDPRT

                    The file name of the drawing should be 1234-5678.SLDDRW

                    The custom property OurLetters in the part file should be XZ

                    The note containing the part marking should be $PRPSHEET:{OurLetters}$PRPSHEET:{SW-File Name}.

                    The note will print/show as XZ1234-5678


                    Oh, sheesh, I had the question backwards--reading comprehension. Well, you could just have two properties--one for your letters and one for their part number. Then a third that concatenates the two.

                      • Re: Part Number Marking
                        Dennis Schuette

                        Thanks Mike and Jim for your responses.


                        Jim, I was kind of thinking it was going to get involved just not sure if it's worth the time right now since we are in the testing phases of part marking at the DXF level. We have a custom property macro right now and I think I'll just add a field to that for parts that require part marking and then link the note to that field.


                        I was just trying to avoid having to manually enter something. Just leaves us the opportunity to "fat finger" it and get it wrong.

                      • Re: Part Number Marking
                        John Stoltzfus

                        There are simple and complicated ways of taking this to the next level


                        Here is what I would do, (only because not being savvy enough with the macros), I would do like Mike mentioned however I would take it and probably make it more complicated lol


                        Set up your drawing template that you can stack your pre-fix right next to your part number property, so basically it would look like this jiberish




                        However once you input a part in the drawing all those text disappear with numbers or notes - then what I do is drop in a part just to position and organize it, then when everything is in position delete the part and save your template and format.  To get the pre-fix info I would then use the Custom Property Tab Builder to click/pick or type in a note, that information stays with that part and there is no other typing required for the fat finger disease..


                        A little work but nice and clean when your done, and when you use the property tab builder, you won't forget it as easy etc...


                        Have fun