I've been having issues with the following snippet of code when working with my addin:
doc.LoadFamilySymbol(@"[filepath here]", "[filename here]", out FamilySymbol symbol);
doc.Create.NewFamilyInstance(mid, symbol, d, GetLevelInformation(d), StructuralType.NonStructural);
As far as I can tell while debugging, the FamilySymbol
variable symbol is null after I pass the first line. mid
, d
, and GetLevelInformation
all work and contain the expected values, so I suspect the problem lies within the first line.