Thank you very much for your reply Jon.
I've added the following lines to my code:
bool sharedCellDefPresent = false;
SharedCellDefinitionCollection cellDefColl = Session.Instance.GetActiveDgnFile().GetNamedSharedCellDefinitions();
foreach (SharedCellDefinitionElement cellDefElmTemp in cellDefColl)
{
if (cellDefElmTemp.CellName == "BRND")
sharedCellDefPresent = true;
}
if (!sharedCellDefPresent)
{
SharedCellDefinitionElement cellDefElm = new SharedCellDefinitionElement(Session.Instance.GetActiveDgnModel(), "BRND");
cellDefElm.AddToModel();
}Unfortunately the result is still the same. I've tried to create a new designfile just to check if something has happened with the original test file but no.
I've stepped through the NamedSharedCellCollection again and now the SharedCellDefinion is present...
Regards Evan