Answers.Body: <p>The LXFML file is an XML document, and there's an XSD document that you can use to validate any LXFML file, along with a textual description of the tags on the LUGNet forums supplied by the LDD Team a few years ago:</p>
  
  <blockquote>
    <p><a href="http://news.lugnet.com/cad/ldd/?n=140">LXF files - info and XML schema</a></p>
  </blockquote>
  
  <p>The key parts of the LXFML you're going to be interested in start with the <code>&lt;Scene&gt;</code> element, which contains one or more <code>&lt;model&gt;</code> elements, which in turn contains one or more <code>&lt;group&gt;</code> elements, which are made up of <code>&lt;part&gt;</code> elements.</p>
  
  <p>The tricky part is getting from a <code>&lt;part&gt;</code> element to an actual model:</p>
  
  <pre><code>&lt;Part refID="0" name="m3680_turn_plate_2x2__lower_part_0" designID="3680" 
        materialID="1" assemblyID="74340" assemblyRefID="0" 
        angle="0" ax="0" ay="1" az="0" tx="0" ty="0" tz="0" /&gt;
  </code></pre>
  
  <p>As you can see, the Design ID corresponds to a LEGO element [part:3680] so you'll need some way to get from those to a suitable model - I recommend taking a look at either:</p>
  
  <ul>
  <li><a href="http://bricksviewer.sourceforge.net/index.shtml">BricksViewer</a> - A Java app for viewing .lxf scene files - also has a brief discussion of the .lxf and .lxfml formats.</li>
  <li><a href="http://code.google.com/p/ldxna/">LDXNA</a> - An XNA library for importing LDraw models - it does include an .lxfml document in one of its examples, but I don't recall it using it - however it does show you how to convert the LDraw parts library into a usable format.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-26T14:59:32.253Z
Answers.Text: There has been a change in the LXFML file. I didn't check since which version, the change was applied, but LDD 4.3 (Sep-2018) has a different structure. e.g., <Part> is now <Brick> and attributes angle, ax, ay, az, tx, ty, tz are now a single transformation attribute
Answers.UserDisplayName: RaamEE
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-02T20:20:44.233Z
Answers.Text: Do you remember what ay was?
Answers.UserDisplayName: tommy.carstensen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-03T16:18:59.540Z
Answers.Text: @tommy.carstensen I believe the `ax`, `ay` and `az` denoted the axis of rotation, and then `tx`, `ty` and `tz` are the "transform" or positional axis.
Answers.UserDisplayName: Zhaph - Ben Duguid
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-05-09T09:24:00.880Z
Answers.LastActivityDate: 2013-11-10T21:47:29.653Z
Answers.LastEditDate: 2013-11-10T21:47:29.653Z
Answers.UserDisplayName: Zhaph - Ben Duguid
Body: <p>I am interested in writing a game that interprets LXF files into worlds (to create a game such as Lego Universe).  After finding out how to extract the LXFML file from the LXF archive, I need to know how to interpret the contained LXFML file.  Are there any detailed descriptions of how the LXFML format works?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2012-05-09T09:26:49.427Z
Comments.Text: Note that while LU had a number of LEGO models in it, the world as a whole wasn't made of LEGO elements - the landscape was still a standard "terrain mesh" type of thing.
Comments.UserDisplayName: Zhaph - Ben Duguid
Tags: <software><cad><ldd>
Title: Explaination of LXFML file contents
UserDisplayName: StackUnderflow
ThreadText: # Explaination of LXFML file contents
  
  (Asked by: username_0 on 2012-05-08)
  
  I am interested in writing a game that interprets LXF files into worlds (to create a game such as Lego Universe). After finding out how to extract the LXFML file from the LXF archive, I need to know how to interpret the contained LXFML file. Are there any detailed descriptions of how the LXFML format works?
  
  **Tags:** software, cad, ldd
  > **Comments:**
  > **username_1**: Note that while LU had a number of LEGO models in it, the world as a whole wasn't made of LEGO elements - the landscape was still a standard "terrain mesh" type of thing.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2012-05-09. Score: 13 | Accepted answer
  
  The LXFML file is an XML document, and there's an XSD document that you can use to validate any LXFML file, along with a textual description of the tags on the LUGNet forums supplied by the LDD Team a few years ago:
  
  LXF files - info and XML schema
  
  The key parts of the LXFML you're going to be interested in start with the  element, which contains one or more  elements, which in turn contains one or more  elements, which are made up of  elements.
  The tricky part is getting from a  element to an actual model:
  
  
  As you can see, the Design ID corresponds to a LEGO element [part:3680] so you'll need some way to get from those to a suitable model - I recommend taking a look at either:
  
  BricksViewer - A Java app for viewing .lxf scene files - also has a brief discussion of the .lxf and .lxfml formats.
  LDXNA - An XNA library for importing LDraw models - it does include an .lxfml document in one of its examples, but I don't recall it using it - however it does show you how to convert the LDraw parts library into a usable format.
  
  > **Comments:**
  > **username_2**: There has been a change in the LXFML file. I didn't check since which version, the change was applied, but LDD 4.3 (Sep-2018) has a different structure. e.g., <Part> is now <Brick> and attributes angle, ax, ay, az, tx, ty, tz are now a single transformation attribute  
  > **username_3**: Do you remember what ay was?  
  > **username_1**: @tommy.carstensen I believe the `ax`, `ay` and `az` denoted the axis of rotation, and then `tx`, `ty` and `tz` are the "transform" or positional axis.  
  
  ---
  
  