Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Editing XML files

DGSketcher
Virtuoso

Archicad appears to be using XML for a number of exportables. My current interest is the Project Info file which also doubles as a handy store for Autotexts. What is the recommended way to edit / format these files outside of AC? I would like to open the file and add a number of Autotext values that can then be imported back into AC. Is this an acceptable exercise or is editing the file a no-go area?

Apple iMac macOS Big Sur / AC24UKI (most recent builds)
1 ACCEPTED SOLUTION

Solution

The project info XML has two big ubernodes:

<FixKeys> and <CustomKeys>. Both have an attribute called "val" set to a number.

Don't touch the <FixKeys> node and its contents. In the <CustomKeys> you can add as many new nodes as you like, but keep them ordered, as their names have a counter in it. Don't forget to set the "val" attribute in the end to the right number.

 

One custom node looks like:

<Custom1>
  <UIKey>
    <![CDATA[Eigentümer]]>
  </UIKey>
  <DBKey>
    <![CDATA[autotext-SITE-0A3DEF04-F614-574B-A59F-847C7B4393D9]]>
  </DBKey>
  <value>
    <![CDATA[<####>]]>
  </value>
</Custom1>

 

XML is sometimes a bit allergic to empty nodes (some software would truncate it to a selfclosing tag, eg.g. <mynode />), thats why empty nodes do have some text in them. In the example above its "<####>".

 

Interesting here is the <DBKey>, which is the reference to the actual content used inside of Archicad. Also that's exactly what you can put in a GDL object. You would write

text2 0, 0, "<autotext-SITE-63A43EA8-A776-455F-9DB1-746EE27D085D>"

 

If you want to manually create new items:

The preamble of "autotext" seems to be needed, as well as the category of the block of the project info, here "SITE", always allcaps.

The last part is just a plain GUID. You can totally make up one!

Either you copy it from a webservice out there, or you use the function inside your favorite editor.

AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

View solution in original post

4 REPLIES 4

SenecaDesignLLC
Advisor

I used to heavily modify android framework xml files to alter look and feel on my phone, I bet you can use notepad or equivalent, or anything that opens and resaves xml files.

FREE wall Accessory framing and coverings
bit.ly/BIMRithmWallAccessories

FREE Truss object.
https://bit.ly/BIMRithmTrussV1
AC 24, Twinmotion current, Windows 11, Msi 10UG with rtx 3070, wacom intuos pro m, Wacom Cintiq Pro 16, razer Tartarus pro.

Thanks, I can open with text edit, but the bit that troubles me is the lines of code that contain unique ID references, which I assume have to be generated by AC...

<![CDATA[autotext-BUILDING-0659ED0C-1267-E947-9D40-9566D9678B35]]>

 

Apple iMac macOS Big Sur / AC24UKI (most recent builds)

Solution

The project info XML has two big ubernodes:

<FixKeys> and <CustomKeys>. Both have an attribute called "val" set to a number.

Don't touch the <FixKeys> node and its contents. In the <CustomKeys> you can add as many new nodes as you like, but keep them ordered, as their names have a counter in it. Don't forget to set the "val" attribute in the end to the right number.

 

One custom node looks like:

<Custom1>
  <UIKey>
    <![CDATA[Eigentümer]]>
  </UIKey>
  <DBKey>
    <![CDATA[autotext-SITE-0A3DEF04-F614-574B-A59F-847C7B4393D9]]>
  </DBKey>
  <value>
    <![CDATA[<####>]]>
  </value>
</Custom1>

 

XML is sometimes a bit allergic to empty nodes (some software would truncate it to a selfclosing tag, eg.g. <mynode />), thats why empty nodes do have some text in them. In the example above its "<####>".

 

Interesting here is the <DBKey>, which is the reference to the actual content used inside of Archicad. Also that's exactly what you can put in a GDL object. You would write

text2 0, 0, "<autotext-SITE-63A43EA8-A776-455F-9DB1-746EE27D085D>"

 

If you want to manually create new items:

The preamble of "autotext" seems to be needed, as well as the category of the block of the project info, here "SITE", always allcaps.

The last part is just a plain GUID. You can totally make up one!

Either you copy it from a webservice out there, or you use the function inside your favorite editor.

AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

View solution in original post

@runxel Thanks the GUID worried me, now I understand them a lot better.

Apple iMac macOS Big Sur / AC24UKI (most recent builds)

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!