How do you get ZONE name from branch element in C#?
Right now I use do loop to move on owner and trying to find type ZONE.
string newZoneName;
DbElement ce = CurrentElement.Element;
if (!String.Equals(ce.ElementType.Name, "ZONE"))
{
do
{
if (ce.ElementType.Name == "WORLD")
{
break;
}
ce = ce.Owner;
}
while (!String.Equals(ce.ElementType.Name, "ZONE"));
}
Hi, [COLOR=#3E3E3E]Shok[/COLOR]!
You can use this code: var value = CurrentElement.Element.EvaluateElement(DbExpression.Parse("ZONE")).GetAsString(DbAttributeInstance.NAME);