- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Morning All,
I'm interested to hear if anyone has some ideas about factors that might cause
LoadFamilySymbol(String, String)
or
LoadFamilySymbol(String, String, FamilySymbol)
to return false only on a particular user's machine.
This process is being performed on standardized out-of-box Revit family content (W-Wide Flange.rfa in this case). The portion of the program that uses this method to load additional symbols from a family has been tested extensively on dev machines, test machines, and other end user machines and performs well in all prior cases. The user experiencing the issue is said to be working with Revit-default unmodified family content.
Here are the precautionary steps already in place within the program:
- Bypass load if the symbol is already found in the document.
- Build the fully qualified name of the source family (.rfa) file using Application.GetLibraryPaths() in order to make sure we look by default where the user intended.
- Use File.Exists() to make sure the source family file is found prior to attempting the load.
- Check if the family has an accompanying Type Catalog (.txt) file
- Check if the required FamilySymbol name has a match found in Type Catalog (.txt) file
Since we pre-check that the symbol does not already exist in the document, I would expect that the IFamilyLoadOptions overload is not needed. The LoadFamilySymbol() is only attempted if all of the above constraints are satisfied. Otherwise, the appropriate warning message is displayed both to the user and to debug outputs. This process has worked well in a variety of user environments, but at one particular user site the load method returns false and a new type is not loaded.
The LoadFamilySymbol() is wrapped inside a try / catch block, but does not return an exception.
I've requested that the user supply a copy of their Type Catalog file so that I can manually check it for problems, but have not received it yet. I'm very curious to hear if other devs have experienced unexplained false returns from this method and what other causes I have not yet considered.
Solved! Go to Solution.