diff --git a/City2RVT/GUI/City2BIM/Cmd_ImportCityGML.cs b/City2RVT/GUI/City2BIM/Cmd_ImportCityGML.cs index 889e6040..8a93477e 100644 --- a/City2RVT/GUI/City2BIM/Cmd_ImportCityGML.cs +++ b/City2RVT/GUI/City2BIM/Cmd_ImportCityGML.cs @@ -112,6 +112,15 @@ public Autodesk.Revit.UI.Result Execute(ExternalCommandData revit, ref string me C2BPoint lowerCorner = cityReader.LowerCornerPt; var attributes = cityReader.Attributes; + + //Field names in extensible storage does not allow "-" + foreach (var attr in attributes) + { + if (attr.Name.Contains("-")) { + attr.Name = attr.Name.Replace('-', '_'); + } + } + if (gmlBuildings.Count < 1) { TaskDialog.Show("Error", "No CityGML buildings read from file, canceling import!");