Classification XML Editor and External Classification Updates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-10-28 08:43 PM
What is the best editor for creating archicad classification system XML files external to archicad. I have not been able to tweak the excel merging of XML data and the non-repeating elements to generate an XML file that archicad will import without prior additional editing as Excel seems to leave out necessary items. Surly there exist an XML editor system that can be set up which will let me deal with the data and not have to cleanup all of the stuff that doesn't change. Preferably i could feed the new data in through an excel spread sheet or an Access database. I understand how to create an XML classification file that will import into archicad. My goal here is to merge new XML data into an existing XML file and need to deal with only the actual data and not the XML formatting or the XML header information that never changes. Someone must have a way to automate this??
Anyone have thoughts on this?
Self Employed - Modeling, Estimating, Construction
Archicad 12-26
AMD Ryzen 9 5900X 12-Core Processor
3701 Mhz, 12 Core(s), 24 Logical Processor(s)
(RAM) 128 GB
NVIDIA RTX A2000
- Labels:
-
Data management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-10-29 03:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-11-19 06:34 PM
Is there an editor out there that can handle this???
Self Employed - Modeling, Estimating, Construction
Archicad 12-26
AMD Ryzen 9 5900X 12-Core Processor
3701 Mhz, 12 Core(s), 24 Logical Processor(s)
(RAM) 128 GB
NVIDIA RTX A2000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-11-12 03:41 PM
I have a simple "office" Classification looking like this:
⎣10.00. Chapter 10 - general
⎣10.01. Chapter 10, part 01
⎣_10.01.01. Chapter 10, part 01, element type 01
⎣_10.01.02. Chapter 10, part 01, element type 02
⎣10.02. Chapter 10, part 02
20. Chapter 20
⎣20.00. Chapter 20 - general
⎣20.01. Chapter 20, part 01
⎣_20.01.01. Chapter 20, part 01, element type 01
⎣_20.01.02. Chapter 20, part 01, element type 02
I have the whole "outline" in a Word-doc/Excel-sheet, but would love to 'migrate' this to AC-classification, without to much manual typing... Seems straightforward, but alas...
Any thoughts on XML-editors helping in the process (I tried Atom and Xcode)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-11-20 06:51 AM
If you haven't already inspected archicad classification format you can export any of the default classification systems and inspect the xml using Notepad++. This can be a bit overwhelming. To really understand how the xml is put together build a new very small classification system and export it for study. Make small changes in the classification system and see how that changes the exported XML.
I feel your pain.
Self Employed - Modeling, Estimating, Construction
Archicad 12-26
AMD Ryzen 9 5900X 12-Core Processor
3701 Mhz, 12 Core(s), 24 Logical Processor(s)
(RAM) 128 GB
NVIDIA RTX A2000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-11-22 08:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-11-30 04:53 PM
However you could hire someone to just code this from scratch.
Self Employed - Modeling, Estimating, Construction
Archicad 12-26
AMD Ryzen 9 5900X 12-Core Processor
3701 Mhz, 12 Core(s), 24 Logical Processor(s)
(RAM) 128 GB
NVIDIA RTX A2000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2023-04-11 10:32 AM
In the past, I once created an elaborate Excel with formulas (no VBA) to generate the different text fragments I needed for the XML. But that was too much effort and hardly reusable. And I had to copy-paste the text into the XML manually.
I recently used a custom Python script to convert existing classifications in the format Archicad expects. One was starting from an Excel table (CCTB), the other from an XML file (ETIM).
Archicad expects a certain XML structure of tags, before it accepts a classification import.
It's not a generic plug-and-play for ANY Excel, but it was not too much work either. Most work was figuring out a correct hierarchy from the numbering in the source Excel. The rest is straightforward.
E.g. reading the Excel
import openpyxl
import xml.etree.ElementTree as ET
####################################################################
# Parse Excel file
####################################################################
print("Parsing Excel File")
workbook = openpyxl.load_workbook(input, data_only=True) # ignore formulas
# Dict to keep items (flat, at this point)
itemsFlat = {}
for worksheet in workbook:
for row in worksheet.iter_rows():
code = row[0].value
description = row[1].value
itemsFlat[code] = description
And then setting up a suitable XML structure is something like this:
# root
buildingInformation = ET.Element('BuildingInformation')
classification = ET.SubElement(buildingInformation, 'Classification')
# Classification System
system = ET.SubElement(classification, 'System')
name = ET.SubElement(system, 'Name')
name.text = systemName
editionVersion = ET.SubElement(system, 'EditionVersion')
editionVersion.text = version
editionDate = ET.SubElement(system, 'EditionDate')
year = ET.SubElement(editionDate, 'Year')
year.text = dateYear
month = ET.SubElement(editionDate, 'Month')
month.text = dateMonth
day = ET.SubElement(editionDate, 'Day')
day.text = dateDay
description = ET.SubElement(system, 'Description')
description.text = systemDescription
source = ET.SubElement(system, 'Source')
source.text = systemSource
# Items
items = ET.SubElement(system, 'Items')
Then there is a specific section to parse and interpret the strings from Excel into a structure that suits Archicad... I parse the "itemsFlat" dictionary and for each items calls a custom "writeItem" function which takes a parent XML item and the two strings (ID and Name) to be added to the 'Items' tag (created in the last line of the previous fragment).
And finally writing the XML:
## Write the XML (with proper encoding header string)
tree = ET.ElementTree("tree")
tree._setroot(buildingInformation)
tree.write(systemName + "_" + version + ".xml", encoding="UTF-8", xml_declaration= True)
Archicad29/Revit2026/Rhino8/Solibri/Zoom
MBP2023:14"M2MAX/Sequoia+Win11
Archicad-user since 1998
my Archicad Book
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2025-02-17 08:52 PM
Try this addon !
XL2XML Classification manager - Open source - Graphisoft Community
Archicad 27
Windows 11 professional
https://www.behance.net/Nuance-Architects