EDIT: Whoops, this may be in the wrong subforum, apologies!
Hi,
Having an issue with a tool that I'm developing where the list of sizes gathered from a PartFamily do not equate to having the same name as the size name gathered from a structure or pipe object.
As far as I can tell, this is due to the PartSize names in the parts list being automatically generated and considered as separate to the sizes specified within the PartFamily.
The list of sizes from the PartFamily are being gathered by a loop using the PartSizeCount and iterating through 'PartSize size = partFamily[i].GetObject(OpenMode.ForRead) as PartSize;', and then taking the name.
However, the only way that I can find of getting any relevant data about the current part size of a structure or pipe instance is to get the PartSizeName from it, which doesn't match up to any size previously gotten for that structure/pipe's currently set family, as it's fetching the automatically generated name of the PartSize.
Is there any way I can marry the two up? Is there an alternate way of getting size names which would allow me to compare the list of sizes that I have with the current part size of the structure or pipe instance?
For context, the aim of the tool is to allow the user to have an easier way of viewing a pipe network as a whole and changing part families and/or sizes in response to needs of the project. The list of part sizes from the part family is used to populate a dropdown, and the part size from the actual structure/pipe instance is what I'm trying to use to programmatically select the relevant size within that drop down to display the current size. Everything worked fine with older parts catalogues where, (from what I can gather) the names of the part sizes themselves were 1:1 with the list of sizes given to the part families.
Modifying the parts list is out of my hands unfortunately, so that's not an option.
Apologies if any of the above seems unclear, I haven't had a lot of experience with Civil3D or dealing with Parts Lists.