Skip to content

Commit

Permalink
replace "-" in CityGML-Attributenames with "_" for import in Revit (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hutsimbl authored Jul 12, 2022
1 parent 90c1c67 commit 4a8d331
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions City2RVT/GUI/City2BIM/Cmd_ImportCityGML.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
Expand Down

0 comments on commit 4a8d331

Please sign in to comment.