Parts List Document Number Macro

Experimenter
Experimenter

Hello, we have currently been using a system that uses the filename as the part number in the draft titleblock and parts list. Our filenames are formatted with the revision on the end. 

 

I would like to switch to a system of using the Document Number and Revision property fields to populate the draft titleblock and parts list. I have since found/modified a macro to send the filename to the Document Number and Revision fields of the active document with a button on the quick access toolbar.

 

Now I am trying to populate the Document Number field of all parts inside of an active assembly so that the parts list in the draft displays this info. The issue I am coming across is accessing the properties of the parts in the active document (assembly).

 

Could someone help me out with accessing "SolidEdgeAssembly.Occurences" from the active document.

 

Thank You

 

ST9

8 REPLIES

Re: Parts List Document Number Macro

Honored Contributor
Honored Contributor

It sounds like you are just starting to really set things up.

 

In general, the properties that are used most often are:

Title = drawing name

Document number = Part number

 

Here are the twists as I implemented it.

 

With only a single slot for name and number. How do you handle a drawing of a single part that you make and stock? That drawing shows the part number of the material it is made from. When you insert that part into an assembly, you want it to show the part number of the finished part (The result of the drawing). 

 

To handle that, I make an assembly of that one part and insert it into the next assembly, Then it can display the part number desired with no relation to the part number of the raw material.

 

Lets say the part in question is a single piece of sheet metal. I will have a directory with the part name on the directory. That directory will contain 4 files. The sheet metal part, used to make a drawing, and an assembly of the sheet metal part for inserting into other assemblies. And because there is an assembly, a config file also lives in the same place.

 

Most on this forum hate that way of working, but I have yet to find a cleaner way to keep part number organized.

 

 

 

 

 

Re: Parts List Document Number Macro

Phenom
Phenom

I don't understand why these things are done this way. And please don't take that as a criticism, it's not. I prefer to just use the filename as the part number. This keeps things simple for me. If someone brings me a drawing that is in question, I look at the part # field in the title block, and that tells me what file I look for. The part or assembly and the drawing number match, so they are sorted right next to each other. The parts list calls out those part numbers. So i need to know what a part in the parts list looks like, I look for the part number listed, pull up that drawing and there it is.

 

If someone could give me some insight into what is the benefits of having a drawing number different from the part number of the part that is detailed in that drawing....please do. Again, not criticizing, just wanting to figure out what you guys are doing and why.

ST9
Windows 7 Professional
Nvidia K2200 & Intel Xeon
"You're doing it wrong"

Re: Parts List Document Number Macro

Phenom
Phenom

@SeanC1 What you want is pretty common, i.e. have the file name to be something like "[documentnumber]-[revision].par" etc.

 

I think your question is about using the API to automatically update the relevant properties for all the files in an assembly based on the filenames? This is certainly possible, and probably not that difficult if you have half a macro already, however you'd be better posing in the dedicated SE developer forum to get an answer.

 

Re: Parts List Document Number Macro

PLM World Member Phenom PLM World Member Phenom
PLM World Member Phenom

Try using the data preparation tools for Teamcenter / SP.

 

Even though you aren't migrating to an managed workspace, the tools are used to prep the data prior to migration.  That includes bulk cleaning up of filenames and properties.

 

Programs -> Solid Edge -> Data Prepration -> Modify

 

This will bring up a custom Excel spreadsheet that has many of the tools you may be looking for.


____________________________________
--Scott Wertel, P.E.

Re: Parts List Document Number Macro

Honored Contributor
Honored Contributor

As far as finding the documents. I have gone even a step further. 

 

I now display both the model file name and the PDF name in the draft. I match the file name to the name of the PDF result. Most of the time, that is the part number.

 

So when you have a hard copy, you can find both the PDF file drawing or the CAD model.

 

Where it gets tricky is that I have many numbering systems.

Part numbers, Product numbers, Place holder models for quotes only. Vendor supplied files, and about 5 other numbering system that all have to play together.

 

In general I have found naming the draft file like the PDF will be makes one of the steps easy. When you print, you know what file your replacing or creating.

 

If you can actually manage the model file name the same as the PDF. Then even better.

Re: Parts List Document Number Macro

Experimenter
Experimenter

Thanks for the replies everyone. I am going to go the route of using the data preparation tools to update all of the Document Numbers and Revisions. 

 

Thank You

Re: Parts List Document Number Macro

Experimenter
Experimenter

This is an interesting concept. I might have to try it out in our test environment but I do not like the idea of having more files than what might be necessary.

Re: Parts List Document Number Macro

Experimenter
Experimenter

Thank you for your reply nominus38. One reason why it is sometimes preferred to use the document number for the part number instead of the filename is then parts lists that use the part in question do not show the revision. In that case it is not always necessary to revise the levels above the part that is being revised. 

 

For example if you show the revision in a parts list and revise the part you would then replace the file in the assembly with the revised part and then revise the assembly drawing because the parts list would be showing the wrong rev and continue up all subassemblies and assemblies.

 

If no revision is showed in the parts list then you would replace the file in the assembly with the revised part and no assembly revision is required unless another reason deems it to be.