Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Double? GetElementLength(Element element)
- {
- var lengthParam = Enum.GetValues(typeof (BuiltInParameter))
- .OfType<BuiltInParameter>()
- .Where(p => p.ToString().Contains("LENGTH"))
- .Select(param => element.get_Parameter(param))
- .Where(param => param != null)
- .FirstOrDefault();
- if (lengthParam != null)
- {
- var lengthValue = lengthParam.AsDouble();
- return lengthValue;
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement