Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Version: Windchill 13.0
Use Case: I have to do a mass update of the "Default Trace Code" attribut that is located on the Part Master.
Description:
typically use the LodFromFile utility to update attributes on WTParts and WTDocuments. To do this, I first create a CSV file following the format outlined in [Windchill_Home]/loadFiles/csvmapfile.txt. I then convert the CSV file into an XML file using the csv2xml utility.
Currently, I need to update the "Default Trace Code" attribute across multiple parts. However, I haven't found any documentation or guidance on how to create a suitable loader for Part Master attributes.
If not too many, this can be done via edit multiple object in a search results. Even thought this is master attributes, it will check out and check in the item, but you can edit master attribute, I believe. If that works, you can do these in batches very quickly. How many parts do you need to update?
Thank you for your reply. The "Edit Common Attributes" function only applies to a single part at a time. In my case, I need to update over 30,000 parts, so this approach isn't feasible.
You can look for the parts in search , select and export parts as Importable spreadsheet ,set the trace code and import back
I tried that before but it not working. It is NOT possible to update/create "Part Master Attribute" using "Import from Spreadsheet" in Windchill PDMLink.
I was suggesting using the "Edit Multiple Objects" option which will iterate the object but should allow update of that field. Given that it is 30,000 parts, it will take some time with this method. I think the same is true for @Fadel since I would recommend breaking them up in chunks. In using the exportable spreadsheet, you first have to search on them, export, update and re-import. Both would work if you have a good search query that can isolate the parts you need to update. So long as you can grab a good chunk, say 500-1000 at a time, you would have to repeat 30-60 times. If the query returns less and less parts each time, you should be able to knock out in a day and it can be a background task.
Another options is direct SQL since you would be updating a single field on the WTPartMaster. This has more risk since you are directly accessing the database. It should be tested and done after a backup with a restore point. It would be able to be done with a single query, update this to that. I still would recommend using the normal multi-part edit tools to grind this out.
Keep in mind that this is a large amount of transactions so ensure your DBA is engaged if you might overwhelm your install.
Edit Multiple Objects does not work for the Part Master attributes. 😔
Are you sure? I just did it. You might need to update your columns and view in the edit screen to show these attributes.
Yes you can set that attribute in bulk starting 11.2, :
Thanks, Fadel — yes, I can see it now. The only challenge is that many of those parts have undergone numerous revisions, so the update process will be time-consuming. I'll also need to take the production servers offline during the update. That said, it's definitely an effective solution for updating multiple items across a set of parts.
You would only need to iterate the latest version. Since you are changing a master level attribute, it should be impact all versions. Not sure you need to take the system offline to do this. Depending on your system size, it could be considered a large transaction. I would have no issue doing these updates as part of a day's work. I would just setup a report with a counter as a a burn down list. So long as you are making process to make updates to all impact parts, burn that number to 0. Unless, you have a related process change you want to implement inconcert with the field change, users would only notice a slight delay as it does your update batch.
Hi @Javid_Nezhad,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,
Anurag
