Believe many people have experienced the weirdness with the FamilyParameter.GUID property when programming. Just for others who are not aware of yet and to save them a bit time, we'd like to make a note here.
The FamilyParameter.GUID property instead of returning a null for none shared parameters, it throws out an exception. The weirdness is with the exception actually, which says something like none-shared parameters do not have valid GUID values. Revit API coders all know that, we believe. The fact is however people don't know whether a family parameter comes from a shared parameter with using the exact GUID property. It is the GUID that should tell people whether the family parameter is shared or not. Please don't hesitate to correct us if this is not true.
So to summarize, the FamilyParameter does not have a property IsShared or similar telling people if the family parameter comes from a shared parameter. It has a GUID property but when it's used to check whether the family parameter is from a shared parameter, in most cases it throws out an ugly exception rather than naturally (and also simply) return a null. It's kind of like a dilemma. Ouch!
The only way to work around the issue is to use try and catch. Though it works, it not only looks ugly but also will sacrifice performance a lot.
Just a simple head-up here and hope to be useful. At least, it will remind ourselves about the weirdness in the future and save each person a few hours each time.
Revit Family Organizer can organize various Revit family forms such as Family Files (.RFA), Opened Families, Loaded Families, Project Families, System Families, Nested Families, Family Types, and Family Materials in many different and good ways.