Update FabricationPart in document if service database definition has changed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have several fabrication parts in a document that were placed before the service database was finalized. Later, one of the services had properties changed that I need reflected in the existing parts. To make matters worse, I don't necessarily know which parts were placed before the changes, and which were placed after.
As an example, I used Revit Lookup on one pair of otherwise identical parts known to be from before and after the changes, and found the following differences. You can see some information was removed, and some was corrected.
I was thinking I could just change the part type and service IDs, but it is not working:
// part is the FabricationPart in question
ElementId typeId = part.GetTypeId();
part.ChangeTypeId(typeId);
int serviceId = part.ServiceId;
part.ServiceId = serviceId;
So this is two closely related questions -- how do I determine which version of a FabricationPart is, and how do I update old ones to the new definitions?