On the topic of the schema errors...
Schemas are data storage devices (as alluded to previously) that can be attached to any Revit element by any add-in (and yes, by Revit and Autodesk Revit add-ins as well).
Schemas are often attached to the Project Info Element when storing things such as settings, or are attached to entities such as doors or wall Types (or whatever) to track events or to tie entities together for coordination.
Schemas have a limited number of storage value types, and yes, they have a long identifier (also as alluded to previously) which is actually a Globally Unique Identifier (GUID).
Once created the schemas must always contain the same number of entries, each with the same name, and each with the same value type.
If the addition of a new field is desired, or if the developer wants to change the storage type for a field then a new schema needs to be defined. Autodesk reminds all of the developers of this requirement all over the API documentation. Yet even they forget from time to time (a couple of years back they changed a schema definition in a structural utility and crashes abounded until a service pack was issued).
This round of errors are resulting from an underlying change in how Revit stores ElementIds (previously as Int32 and now as Int64) and that is rippling down to storage entities that used the numeric value of those ElementIds.
When an application attempts to load an upgraded Int64 value into a previously defined Int32 container (or vice versa) there is a mismatch in type and an error occurs.
A fix was included in the 2024.1 patch that addressed a good number of the failures, however it doesn't cover all scenarios.
As noted previously, these issues are usually where multiple files with differing versions of the same schema are loaded (and yes, that loading can be as a result of a Revit link, or as part of a family, or as part of a family embedded in a family). This is due to the fact that Revit loads schema definitions into the Application's namespace instead of the Document's namespace.
For anyone that wants to make their head spin, here is a link to one of the first discussions in the Revit API forum concerning this:
https://forums.autodesk.com/t5/revit-api-forum/upgrade-2024-api-causing-schema-error/td-p/11953147/p...
There is another one or two after the service pack came out but you can look those up on your own.
-G
Gary J. Orr
GaryOrrMBI (MBI Companies 2014-Current)
aka (past user names):
Gary_J_Orr (GOMO Stuff 2008-2014);
OrrG (Forum Studio 2005-2008);
Gary J. Orr (LHB Inc 2002-2005);
Orr, Gary J. (Gossen Livingston 1997-2002)