ArchiFrame Manual ENen · Published 13 Nov 2026

19 Element definition file ArchiFrameElements.xml

Please note that xml standard reserves charaters <>” into its own markup – general info here and as a rule: Inside xml-attributes like <tag attribute="value"> if the value was <"hello & bye">, you should code it like:

<tag attribute="&lt;&quot;hello &amp; bye;&quot;&gt;">

This file is used to define all element types, element elevation layout and other settings related to placing the planks to the element. All dimensions are given in meters and a decimal separator is shown as a full stop, for example 1.234.

19.1 Settings <setting>

Contains general element related default settings.

19.1.1 Copy&paste between Archicads <trackelemsettings>

If some custom element stamps/cut list/weight marker objects are used instead of the built-in ones, those should be added here:

<!-- These libparts will be tracked for changes in addition to AF internal ones. Add any libpart type here used as custom element stamp, cut list or simila. Data is used for handling copy/paste between ArchiCADs -->
<trackelemsettings>
  <libpart guid="FD6C137D-C647-42FD-A904-181281909443"></libpart>
  <libpart guid="9056D768-6A80-423F-B548-30D0A09D857F"></libpart>
  <libpart guid="9FD03D30-6A12-4B0F-AB3A-01410A529E38"></libpart>
</trackelemsettings>

It will allow ArchiFrame to add needed information to get copy&paste work well.

19.1.2 Plank related settings <plank>

<misc minlen="0.050" idstr="%s-01" sort="yx" sortboard="xy" topbotunid="1"></misc>
  • •

    minlen, shorter planks are not created.

  • •

    idstr, ID string form, %s is replaced with element ID. Default is %s-001.It is possible to refer to plank’s parameters like this: %s-01[iElemModule]

  • •

    boardidstr, ID string for boards. Format is like idstr.

  • •

    sort, sorting when giving IDs, possible values:

yx, assing from bottom to top then from left to right (default).

  • •

    xy, assign from left to right then from bottom to top.

  • •

    globxyz, compare global bound box, first x, then y and finally z.

  • •

    sortboard, as previous but affects boards. For the boards, the default value is xy since 2/2024 – before it was globalxyz.

  • •

    topbotunid, if set to 1 top & bottom including double parts will not get the same ID as any other piece even if those are similar (will always have unique ID). Default is 0.

19.1.3 Default settings for element drawings

<projections maxwidth="80">
  • •

    Maxwidth defines when ArchiFrame places next element drawing/element elevation to new row above existing ones. Default value is 80 meters.

19.1.4 Default settings for new element <newelem>

See section XML-settings for an Archicad element.

19.1.5 New plank's default settings <newelemplank>

Defines settings for original plank. Original plank is the one that is visible in 3D. See section XML-settings for an Archicad element.

19.1.6 Element elevation from front and back side defaults <newelemprojside>

Defines settings for side projection planks. For example, ID is good to be shown here but not at the top projections. See section XML-settings for an Archicad element.

19.1.7 Element elevation from top defaults <newelemprojtop>

Defines settings for top projection planks. See section XML-settings for an Archicad element.

To get the column cross lines also to top projection, add following setting:

<objparam name="iColLines">3</objparam>

19.1.8 Dimension lines settings <dimlinesettings>

Base settings for every dimension line is read here first. See section XML-settings for an Archicad element.

19.1.9 Pre-settings for dimension lines <dimsettings> ja <dimlines id="id">

This section contains a dimension line definitions used in many element types. The section contains <dimlines id="id"> tags. Xml-attribute id is the id used to refer to the settings, for example, front side projection uses id "wall_elevation". Definition contains one or more single dimension line (<dimline>).

To use Lua-script for finding pieces to add to the dimension line attribute sript=”xxx” is added:

<dimlines merge="addpre" id="maindims" script="yit_projplanks">

This is a reference to <script id="yit_projplanks"> in xml-path archiframe/elem/settings/scripts.

19.1.10 Lua script to find relevant pieces to add to the dimension line

Used for maximum flexibility to control the content of the dimension line. An example at xml-path archiframe/elem/settings/scripts:

<script id="yit_projplanks" merge="addpre">

<![CDATA[

-- Sets ID to middle for horizontal planks

function DoProjSettings()

local i, z

for i=1,gnPlanks do

ac_objectopen(string.format("#%d",i))

-- Vertical (studs) with different fill

z=ac_objectget("iEndZ")

if z and math.abs(z)<0.001 then -- nil if board

-- Horizontal piece, ID to middle

ac_objectset("iIDPlace", 0)

ac_objectset("iXoffID", 0)

end

ac_objectclose()

end

end

-- Dim line creator uses to find top and bottom plates only

function FindTopBottomPlanks()

local i, s, n

local tblRes, tbl

tblRes={}

n=0

for i=1,gnPlanks do

ac_objectopen(string.format("#%d",i))

z=ac_objectget("iEndZ")

if z and math.abs(z)<0.001 then -- nil if board

s=ac_objectget("iElemGroup")

if s and (string.match(s, "^bottom_force%a*") or string.match(s, "^top_force%a*")) then

tbl={}

tbl.index=i

tbl.anchorfirst=1

tbl.anchormid=0

tbl.anchorlast=1

n=n+1

tblRes[n]=tbl

end

end

ac_objectclose()

end

return tblRes

end

]]>

</script>

Find function returns 1-based table where each item has fields:

  • •

    index, the 1-based (projection) plank index.

  • •

    anchorfirst/mid/last, overrides to any settings in the xml-attributes.

  • •

    anchorfirstnextempty, anchormidnextempty, anchorlastnextempty: Value 1 will not add a dimension to next point from current point.

19.1.11 Lua script to build all dimension lines

Allows script to use sophisticated logic to create only needed dimension lines and to add points using more logic than just for example adding all studs to the dimension line.

<dimlines id="dim_wallsect_nowin_horint_10" script="dim_wallsect" scriptcreate="SectDimLines">

<!-- Base dim lines could be added before script based -->

</dimlines>

As previous but will define everything related to the dimension lines:

  • •

    The xml to create dimension line optionally with text

  • •

    Dimension points to add

The dimension line creation script returns 1-based table each cell containing fields:

  • •

    xmldim, the xml defining the dimension line

  • •

    dimpoints, 1-based table of dimension points each containing one of the two options:

    • •

      index, anchorfirst, anchormid, anchorlast as in previous section

    • •

      x, y The static point to add to the dimension line

Please search for text SectDimLines in default data folder’s ArchiFrameElements.xml for details (C:\ArchiFrame\data\ArchiFrameElements.xm).

19.1.12 Single dimension line settings <dimline>

<dimline side="bottom" margin="1" elemvecx="1" addy="1" anchormid="1" exclude="*" include="*core*" scriptfind="FindCoreStudGroupsForDim">

<dimlinesettings>

<elemparam name="dimensiontype">cumulative</elemparam>

<elemparam name="markertype">5</elemparam>

</dimlinesettings>

<text content="STUD LEFT" textid="projid*20+1" anchor="6" marg="0.2">

<elemparam name="pen">1</elemparam>

<elemparam name="fontname">arial</elemparam>

<elemparam name="fontsize">1.5</elemparam>

<elemparam name="fontstyle"></elemparam>

</text>

</dimline>

Xlm-attribute

Description

side

Where to place the dimension line from the projection/elevation. Value is one of "left","right","bottom","top".

margin

Marginal between projection and dimension line in meters.

marginproj

An alternative to margin=xxx, will place the dimension line given distance from the projection. ArchiFrame expands total bound box with the resulting dimension line.

elemvecx,y,z

Dimension line direction in the element coordinates. Note! In wall element Y-axis goes up, Z-coordinate is along the watching direction. Length of the direction vector must be 1.

allowanydir

If set to 1 it is possible to define right to left and top to bottom dimension lines. Otherwise ArchiFrame swaps the dimension line direction to be from left to right or bottom to top.

scriptfind

The function name in the referenced Lua-script used to find planks relevant for this dimension line. For example: scriptfind = "FindTopBottomPlanks".

addminmax

The element's contour line minimum and maximum position are added to the dim line. For horizontal the left and right side are added and for vertical the top and bottom sides. Special values:

  • •

    2, add just min.

  • •

    3, add just max.

To get total thickness like below, following values are used:

  • •

    11, add total composite min&max.

  • •

    12, add just min.

  • •

    13, add just max.

Related attributes:

  • •

    addminplankmindist = "0.050" adds dimension point only if the closest plank dimension point is further that 50 mm. For min end.

  • •

    addmaxplankmindist = "0.050" for max end.

Other way round (do not add element edge dim if plank is closer):

  • •

    addminplankmindistfrom = "0.050" adds dimension point for plank only if closest plank dimension point is further that 50 mm from end. For min end.

  • •

    addmaxplankmindistfrom = "0.050" for max end.

addmindist_beg, addmindist_end

Defines minimum distance for a dimension point from the beginning or end of the dimension line. Closer ones are removed before dimension line is created. For example, to filter out points closer or equal than 1 mm from the ends:
addmindist_beg="0.001" addmindist_end="0.001"

addopeningmin

For horizontal dim line: Add opening's left side to the dim line.

For vertical dim line: Add opening's bottom side to the dim line.

addopeningmax

For horizontal dim line: Add opening's right side to the dim line.

For vertical dim line: Add opening's top side to the dim line.

addsidesminmax

Add first and last point from the element sides. For vertical dim line both left- and right-hand side corner points are added to the dim line.

addx,y,z

Direction of the planks to be added to the dim line. Direction is defined in element's local coordinates. For example, in a wall element the vertical studs have direction addx = 0 addy = 1 addz = 0 and horizontal planks have direction addx = 1 addy = 0 addz = 0. Z-direction is probably never used in wall elements.

anchorfirst

Is the plank's first side added to the dim line. Useful for example if dimensioning from element's left side to plank's left side.

anchormid

Is the plank's middle point added.

anchorlast

Is the plank's last side added.

limitdist

To have different dim lines for studs at bottom and top. The maximum distance from plank's end to element polygon contour line.

minpoints

If defined, there must be at least given number of points for at dimension line to be created.

exclude

Exclude planks and element layers on given type = “xxx” layer. For example exclude = “extstud”.

<layer ref="WALL 19" anchorname1="Ext studs ext" type="extstud" studs="core">

boardpanels

To be used with exclude = “*”, include layer types to handle here. Also, must be given to include boards: include = “*boarding*”.

objtype

Attribute objtype can be added to include only planks (objtype="1"), boards (objtype="4") or both (objtype="5"). Default is -1 which includes everything.

excludegroup, includegroup

Used to exclude/include planks based on their role in the element. The role is defined in ArchiFramePlank’s parameter:

For example, to collect only noggins:

excludegroup="*" includegroup="nogging*"

To give many names, please use comma (,) as the separator.

includeelem

To include only element object, if given, overrides include when processing element objects. To include layers not visible in the projection, the layer name is prefixed with exclamation mark (!). For example: includeelem="*boarding*,!core"

onlyelem

If given onlyelem = "1", no planks/boards are included in the dimension line – just the ArchiFrameElement-object making up the layer. Useful to create layer offset dimension lines.

textrot

Setting textrot = "90" will produce following result (angle is global angle):


Please note that this setting causes the text to be manually placed and Archicad/ArchiFrame will not clean up overlapping texts – that will remain as manual work. Also notice that dimension text layouts are scale specific and the dimensions are rotated only in the scale the dimension line was originally created. To force recreating the dimension line it must be deleted and recreated by element tools/Update-command.

textrot_yside

Alternative to textrot. Used to get the dimension point above or below the dimension line. The above/below is checked in global coordinate system meaning the dimension text will be above the dimension line no matter if the dimension line goes from left to right or right to left. Value 1 places above the dimension line and -1 below. For example, value 1:

textrotoffx
textrotoffy

May be used with textrot-attribute. Defines the distance to move the text to left from default position in x- and y-directions. If not specified, the default value of 75 mm is used.

Definition may contain Settings <setting> inside <dimlinesettings>-tag that affect just this single dimension line. In addition it may contain text related to the dimension line. Text-element may contain attributes:

Xlm-attribute

Description

content

Text.

textid

Text ID that must be unique inside the whole element drawing. The ID is used to detect unchanged dimension lines during update. Value is from range 1-254.

Value can be given as an expression that uses variable for projection number. For example, textid="projid*20+4".

anchor

Text anchor point and placement relative to the dimension line. For example value 6 places text to the left side of the dimension line and the text extends to left from the anchor point. Anchor points are:

123

456

789

marg

Distance to the dimension line in meters.

19.1.13 Dimension line for gable wall top planks

<!-- Dimension line for gable wall top tilted planks -->
<dimspec type="toptilted" margin="0.3" addminmax="2" anchorfirst="1" anchormid="0" anchorlast="0" ltor="0">
  <dimlinesettings>
    <elemparam name="dimensiontype">cumulative</elemparam>
  </dimlinesettings>	
</dimspec>

With dimspec-tag and attribute type="toptilted" it is possible to get the dimension lines like below. With attribute ltor="1" the dimension line is always from left to right. Otherwise it is from bottom to top. Setting ltor="2" will place dim point to the left side of the stud on the right-hand side also.


19.1.14 Cross dimension line

<!-- Cross dimension for the element -->
<dimspec type="cross" anchor="lb" layer="core" fromframing="0">
  <dimlinesettings>
  </dimlinesettings>
</dimspec>

With dimspec-tag and attribute type="cross" it is possible to get cross dimension line for the rectangular shapes – other shapes must be dimensioned manually.

Attribute anchor can have values "lb" (left bottom) and "rb" (right bottom).

Attribute layer defines the layer type (core, boarding_int etc.) where the cross-dimension line is created. If missing, core is used.

Attribute fromframing defines if the cross dimension should be generated from the real framing&boarding (value 1), or from the related ArchiFrameElement-object (value 0 and the default).


19.1.15 Openings dimension lines

<dimspec type="opening" include="core" vertdim="1" crossdim="1" vertanchorbot="top">

<dimlinesettings_vert>

<elemparam name="dimensiontype">cumulative</elemparam>

<elemparam name="markertype">5</elemparam>

</dimlinesettings_vert>

<dimlinesettings_cross>

</dimlinesettings_cross>

</dimspec>

With dimspec-tag and attribute type = “opening" it is possible to add individual dimension lines for each opening. Attributes vertdim and crossdim are used to enable/disable corresponding dimension lines.

Xlm-attribute

Description

include

Defines which class (es) of the planks visible in the projection are used to define the openings.

vertdim

Create vertical dimension 0/1.

crossdim

Create cross dimension 0/1.

vertanchorbot

Where to anchor the bottom of vertdim:

  • •

    Default is the bottom of the bottom plate:

  • •

    Value top anchors to the top of the bottom plate:

  • •

    Value topbot anchors to the bottom of the topmost bottom plate:

vertanchortop

If missing (default), there is no dim line to the element’s top plate. If given, these values can be used:

  • •

    "top", add dim point to topmost top plate point

  • •

    "bottom", add dim point to lowest top plate point

vertopeningbot

-1=anchor to lower horizontal piece’s bottom side

1= anchor to lower horizontal piece’s top side (default)

vertopeningtop

-1=anchor to upper horizontal piece’s bottom side (default)

1= anchor to lower horizontal piece’s top side

grouping

Specified to group all window and/or door dimensions to single dimension line which is placed outside the projection. Possible values are:

  • •

    0, no grouping (default)

  • •

    1, group windows

  • •

    2, group doors

  • •

    3, group both to separate dimension lines


It is possible also to combine door & window dimension lines like below with grouping-attribute:

<dimspec type="opening" include="core" vertdim="1" crossdim="0" vertanchorbot="bottom" vertopeningbot="1" vertopeningtop="-1" grouping="3">
  <dimline_door side="right" margin="0.25">
    <dimlinesettings>
      <elemparam name="dimensiontype">cumulative</elemparam>
      <elemparam name="markertype">5</elemparam>
    </dimlinesettings>
    <text content="DOOR" textid="projid*20+19" anchor="6" marg="0.2">
      <elemparam name="pen">1</elemparam>
      <elemparam name="fontname">arial</elemparam>
      <elemparam name="fontsize">1.5</elemparam>
      <elemparam name="fontstyle"></elemparam>
    </text>
  </dimline_door>

  <dimline_win side="right" margin="0.5">
    <dimlinesettings>
      <elemparam name="dimensiontype">cumulative</elemparam>
      <elemparam name="markertype">5</elemparam>
    </dimlinesettings>
    <text content="WIN" textid="projid*20+18" anchor="6" marg="0.2">
      <elemparam name="pen">1</elemparam>
      <elemparam name="fontname">arial</elemparam>
      <elemparam name="fontsize">1.5</elemparam>
      <elemparam name="fontstyle"></elemparam>
    </text>
  </dimline_win>
</dimspec>

Here tags <dimline_door> and <dimline_win> define settings for related dimension lines.

19.1.16 Common marking settings to be used in multiple places <elemmarkings>

These settings are referred from element projections and settings are given here to avoid copy & pasting the same settings many times. An example used under <elemtemplate>

<elemmarkings>
  <opening text="#id#\n#width#\nx\n#height#">
    <script ref="OmataloAukkoID"></script>
    <elemparam name="pen">1</elemparam>
    <elemparam name="fontname">Arial</elemparam>
    <elemparam name="fontsize">1.5</elemparam>
    <elemparam name="fontstyle"></elemparam>
    <elemparam name="just">center</elemparam>
    <framelines create="[create_openig_frame_lines;default=0]">
      <elemparam name="pen">1</elemparam>
      <elemparam name="linetype">1</elemparam>
    </framelines>
  </opening>
  <weight libname="{FD6C137D-C647-42FD-A904-181281909443}-{9060078A-0F41-48C8-8400-8E414A838053}" create="[show_weight_front;default=3]" text="[weight_text;default=(weight) KG]" units="[weight_unit;default=kg]">
    <settings>
      <layer>[layer_weight;type=layer]</layer>
      <objparam name="iFill">*25*</objparam>
      <objparam name="A">0.250</objparam>
      <objparam name="B">0.325</objparam>
    </settings>
  </weight>
</elemmarkings>

For openings minheight can be given to specify minimum height of an opening to create the marking text. Following texts are replaced for openings:

  • •

    #id#, all doors and windows located in the element hole are collected here. There may be, for example, many small windows next to each other. If there is a script defined, [id] refers to script defined text.

  • •

    #width#, #height# size of the hole in the element in setting’s defined units.

For openings it is possible to use a script to define the opening ID as is used in the example above. An example script to pick Archicad window object’s parameter under xml-path archiframe/elem/settings/scripts:

        <script id="OmataloAukkoID" merge="addpre">
          <![CDATA[
-- sOpeningGuid GUID of the related door or window
-- nFlipLR 1 if the ArchiFrameElement and original Archicad wall directions are opposite
function GetText(sOpeningGuid, nFlipLR)
  local res
  
  ac_objectopen(sOpeningGuid)
  res=ac_objectget("fdkarmi")
  if res==nil then
    -- Parameter missing, revert to opening's ID
    res=ac_objectget("#id")
  else
    -- Parameter found, that will be used instead of the ID
  end
  ac_objectclose()

  return res
end
]]>
        </script>

For weight marker the attributes are:

Xlm-attribute

Description

libname

The library part object to show the weight

create

Can be used for example in element templates. If missing or value is 1, the weight marker will be created.

Possible values are:

  • •

    0, do not calculate.

  • •

    1, show the real position of the center of gravity.

  • •

    2, show above the elevation.

  • •

    3, show above the elevation and show separate value calculated. Without doors&windows if different.

text

The text to show, (weight) will be replaced by the actual height

units

kg or lb

movey

Offset for marker’s y-coordinate

19.1.17 Common default settings to be used in multiple places <pre-settings>

These settings are referred from element projections and settings are given here to avoid copy & pasting the same settings many times. Settings are referred with tag name, in this case with xml-attribute settingsref = “cutlist”:

<presettings>
  <!-- Used for cutlists -->
    <cutlist tab1="0.5" tab2="0.8" tab3="1.2" tab4="1.5" tab5="1.8" boards="1" sortby="len" plankid="-" boardid="#">
    <elemparam name="pen">11</elemparam>
    <elemparam name="fontname">Arial</elemparam>
    <elemparam name="fontsize">4</elemparam>
    <elemparam name="fontstyle"></elemparam>
</cutlist>

  <!-- Bottom wood markings -->
  <markings id="mark_default">
    <bottomwood>
      <stud line="3" id="2" idline="1" markxpos="2" markypos="1" marksize="0" marktextdir="1"></stud>
      <opening line="1" windowtext="Window [width]x[height]" doortext="Door [width]x[height]"></opening>
      <neighbour begtext="&lt;[id]" endtext="[id]&gt;" marksize="0" marktextdir="1"></neighbour>
    </bottomwood>
  </markings>
</presettings>

<cutlist>-tag may have following xml-attributes (<cutlist tab1 = "0.6" tab2 = "0.9" boards = "0" sortby = "id">):

Xlm-attribute

Description

create

If set to zero, the cut list is not created (useful for element templates)

tab1

Tab stop for number of similar pieces in meters.

tab2

Tab stop for start of IDs, also tab3, tab4 …tab10 can be given.

plankid

Separator character for plank ids:

  • •

    Missing or empty, use full plank ID (default).

  • •

    Separator character -, include just the number part.

  • •

    “No”, no plank IDs.

boards

Values:

  • •

    “0”, boards are not included into cut list.

  • •

    “1”, boards first then planks (default).

  • •

    “2”, planks first then boards.

boardid

Include board ids to the cut list, possible values:

  • •

    Missing or “no”, do not include (default).

  • •

    Separator character #, include just the number part.

  • •

    Empty, full ID.

sortby

As default the planks are sorted by length, sortyby=”id” changes this to ID.

exclude

Exclude planks on given type = “xxx” layer. For example, exclude = “extstud”.

<layer ref=”WALL 19” anchorname1=”Ext studs ext” type=”extstud” studs=”core”>

matname

How to show material id and name in the cut list, default shows just the material id. String contains parts [name] and [id] which are replaced with the current values for the material. For example, matname = “[name] ([id])”. Used only if material id and name are different.

settingsref

Use settings from given tag.

elemid

Include element id to begin of the cut list text. Default value "1", "0" = do not include element id in the cut list. It may also be free text with tags to replace. For example, elemid = "#id# - #floorname#". See the tags here.

script

Construct whole content after possible elemid with given script, see Lua-script for cutlist.

libpart

Use library part for the cut list. For example to refer ArchiFrameTable, use libpart="{9056D768-6A80-423F-B548-30D0A09D857F}".

libscript

Must be used in conjunction with attribute libpart. Builds up the cut list.

libscriptid

Since script is loaded only once per handing of all element’s projections. Must be specified to use different script(s) to buid the cut list.

19.1.17.1 Custom door and window weight calculation <doorwinweight>

If given, under this tag it is possible to define a Lua script that takes opening GUID and returns its weight in kilograms. For example, the default placeholder:

        <doorwinweight>
          <![CDATA[

-- Script loaded once and called for each opening
-- Return 0.0 to have default weight calculation, otherwise returned value will be used
function OnCalcDoorWinWeight(guid)
  local res
    
  res=ac_elemget(guid, "props=1,ifc=1")
  return 0.0
end
]]>
        </doorwinweight>

19.1.18 Lua-script for cutlist

There are two options: to build the textual cut list or to build an object containing all needed information. To build the content of the cut list ArchiFrame calls Lua-function DoCutList (nSeqNum). Parameter nSeqNum (0…N-1) tells the sequence number of the cut list for current composite element. For multiple cut lists for an element, ArchiFrame keeps the Lua script in memory during processing single ArchiFrame element. This way the script may keep data in memory as Lua globals between calls to DoCutList ().

19.1.18.1 Textual cut list

Function must return 1-based table of text runs. Each item in the table may contain fields:

  • •

    str, mandatory text. Use \n to add line feeds.

  • •

    sizemul, multiplication factor for the size, default is 1.0.

  • •

    bold, use bold style.

  • •

    italic, use italic style.

19.1.18.2 Library part cut list

It is easiest to use these built-in definitions that pick just part of the pieces in the element:

  • •

    cutlist_table_coreall

  • •

    cutlist_table_corestuds

  • •

    cutlist_table_coreothers

  • •

    cutlist_table_coremodules

  • •

    cutlist_table_insulation

  • •

    cutlist_table_extboards

  • •

    cutlist_table_extcladstuds

  • •

    cutlist_table_intcladstuds

  • •

    cutlist_table_extstuds1

  • •

    cutlist_table_extstuds2

  • •

    cutlist_table_extclad

  • •

    cutlist_table_intboards

  • •

    cutlist_table_intstuds

  • •

    cutlist_table_allplanks

  • •

    cutlist_table_acc to list the balk shoes and other accessories in the planks&boards

These are referred for example from own composite element template definitions like below:

<group layout="horizontal">
  <cutlist layoutmargins="6.5,0.1,0.1,0.1" settingsref="cutlist_table_corestuds" layoutminheight="3"></cutlist>
  <cutlist layoutmargins="0,0.1,0.1,0.1" settingsref="cutlist_table_coreothers"></cutlist>
</group>

The script fills given new cut list library part object. ac_objectopen(nil) will open the current table GDL-object to process (always new).

<luasettings> tag can also be added for example to add definition gnFloorRoof telling ArchiFrame the type of the element to get correct element role names into the cutlist (gnFloorRoof is checked by the default code in ArchiFrameElements.xml):

<cutlist layoutmargins="2,0.1,0.1,0.1" settingsref="cutlist_table_coreall">
  <luasettings>
    <![CDATA[
      gnFloorRoof=1   -- nil=not known or a wall, 1=it is a floor, 2=it is a roof
]]>
  </luasettings>
</cutlist>

Cells may have tags before actual text for formatting. Possible tags are:

  • •

    <mulheight number>, multiplication factor for text size. Default=1.

  • •

    <merge number>, merge next number cells to current cell in this row.

  • •

    <nolines>, no lines for the cell.

  • •

    <b>, bold.

  • •

    <i>, italic.

  • •

    <u>, underline.

  • •

    <left>, left align.

  • •

    <center>, center align.

  • •

    <right>, right align.

  • •

    <vtop>, <vcenter>, <vbottom>, vertical alignment.

  • •

    <fillrgb r g b>, background fill color. Values r g b between 0…1, red is <fillrgb 1 0 0>. Or if it contains just single value, then it defines the pen number directly.

  • •

    <penrgb r g b>, pen color.

Cut list object has parameter Manage manually (iManual in xml-file) that can have these values:

  • •

    0, let ArchiFrame update content and position.

  • •

    1, full manual – ArchiFrame will not to touch it.

  • •

    2, keep position but let ArchiFrame update content. This value is useful if the elevation layout needs hand tuning.

For library part cut list function DoCutList() may return values:

  • •

    0, do not create the list (list is empty)

  • •

    1, normal operation (this is the default option if there is no return value from DoCutList)

Default cut list script cutlist_table_an11 supports giving settings from Lua global table gListSettings. It allows customizing the cut lists much further. This customization script gets environment set by the default cut list script, default one gives these:

  • •

    gLang, three letter language code: "eng", "fin" etc.

Table gListSettings may have following fields with the default cut list script:

Field

Description

title

Title for the cut list. Following replace-strings may be used:

  • •

    #id# will be replaced by the element ID

Special value “*" for the title means to get the title from the first plank’s subheading. Requires elemtypesort to begin with *, see cutlist_table_coreall_matid in the default data.

cols_skiptitle

If set to true, the first title line will be skipped.

rowheight

Table row height setting also sets the font size. Default is 0.170 (170 mm).

tablewidth

If given, this value is used. Default is 3.5 m / 4.5 m / 5.0 m depending on column count.

funccollect

Function that defines if a piece should be included into the cut list. Function has single parameter: Data of the collected piece. Content of the data depends on the cut list script – default data is described in the following table.

funcisless

If order or grouping of the planks is different than the default. Takes two planks/boards and returns true, if first one is less than second one. Requires funccollect to be set. The default comparator function is in ArchiFrameElements.xml function CmpPlanks() – that is a good base for a custom one.

funcgetrows

If defined, will tell the whole content of the cut list. Function is called without any parameters, and it must return 1-based array of rows each item having another 1-based array cols which contains text for each column. Please see cutlist_table_acc from base data for details.

collectexternal

If given and value is true, ArchiFrame collects even external attached planks for cut list processing. Planks are collected only once per processed element – this must be given in the first used cut list per element. See also next item.

addexternal

If given and value is true, external planks are actually given to to funccollect. Otherwise, they are silently skipped.

resetlist

If set to true, will collect all pieces instead of using cached plank list

collectall

If true, will consider each plank/board separate. Useful to go through every piece in the element.

addmc

Add machinings column to the table: 0/1

othercuts

The text to use instead of the standard one. There is the number of other cuts that can be used as part of the string with code %d. Please note that the planks are processed only during building the cut list. If using the standard ones, usually the place to put this definition is override of <cutlist_table_corestuds>. For example:

gListSettings.othercuts="OTHER cuts %d pcs - see detail"

addlen

Add length column, for boards this should be 0.

cladaddmat

Add cladding material name to cladding piece ID and include it in grouping

col1str_plank

Replace first column’s text with this text. Parts to be replaced:

  • •

    #id#, plank’s ID

  • •

    #matwidth#, typically smaller measure

  • •

    #matheight#, typically bigger measure

  • •

    #len#, plank’s length

  • •

    #typename#, material’s type name. ArchiFrame puts both name and id if they are different in form: name (id)

  • •

    #matname#, just the material name

  • •

    #matid#, just the material id

  • •

    #elemgroup#, the role in the element: “Stud”, “Bottom plate” etc.

  • •

    #cutinfo#, cut information for the piece, for example “Angled cut 27 deg”

  • •

    #pcs#, number of similar planks

  • •

    #par:xxx#, take plank object’s parameter. For example #par:iQuality#
    By default, the script converts the value to string using default rules. To specify value type, it is possible to give a prefix to the parameter name, for example #par:lendim:
    iCurrWidth#:

    • •

      lendim: It is a length, use AC-settings for dimension line dimension points

    • •

      lencalc: It is a length, use AC-settings for calculation

singlelist

If given and value is true, there will not be subheadings like CORE / CORE OTHERS in the cut list – everything in single list.

sepbylayer

If set to true, similar pieces having the same ID will be split by the owning layer type. This way it is possible to get parts from boarding_ext2 and boarding_ext3 to their own cut lists.

clearelemrole

If set to true, plank’s role in the element is cleared. This is useful not to separate for example top and bottom plates that have the same ID.

addinsu

Set to true to collect insulation into the cut list, use with resetlist. Perhaps insulation cut list should be the last one not to include insulation in other cut lists.


Default cut list generator fills these fields for every collected part (can be used in the funccollect):

Field

Description

elemtype

Owning element layer’s type: core, intstud, extstud etc.

elemtypesort

Internal coding that defines the part’s role in the element. Possible values and the default names are:

  • •

    001, STUD

  • •

    002, OTHERS (just core layer non-vertical piece)

  • •

    010, INT STUDDING

  • •

    020, EXT STUDDING

  • •

    030, CLADDING

  • •

    040, BOARD EXT

  • •

    050, BOARD INT

  • •

    999, OTHERS (unknown layer type core/intstud/extstud etc)

Starting this text with * means there is a sort key after it and then the title to show as subheading after the first separating space. Please see cutlist_table_coreall_matid in the default data for an example.

id

Part’s ID

plankinfo

af_request("plankinfo") for the part

more…

Please see function CollectPlanksBoards() from ArchiFrameElements.xml for more fields.


It is also possible to define content for the cutlist more completely setting information for all columns
like below. Please note that sum of table widths should be 1:

gListSettings={}
gListSettings.title="OTHERS"

gListSettings.funccollect=function(plank)
  if not plank.elemtype or not string.match(plank.elemtype, "core") then
    return false
  end
  if plank.elemtypesort~="002" then   -- Non-vertical piece
    return false
  end
  return true
end

gListSettings.cladaddmat=false     -- Must be in every item since this setting is used when the list is first time created
gListSettings.rowheight=nil        -- Use defaults
gListSettings.margin=nil           -- Use defaults
gListSettings.tablewidth=nil

-- Custom columns
gListSettings.tablewidth=4.5
gListSettings.cols={}

t={}
t.title="<b><left>TYPE"
t.content="<left>#elemgroup# #typename# (#id#)"
t.width=0.42
gListSettings.cols[1]=t

t={}
t.title="<b>LEN"
t.content="<right>#len#"
t.width=0.10
gListSettings.cols[2]=t

t={}
t.title="<b>PCS"
t.content="<center>#pcs#"
t.width=0.08
gListSettings.cols[3]=t

t={}
t.title="<b><left>CUTS"
t.content="<left>#cutinfo#"
t.width=0.4
gListSettings.cols[4]=t

19.1.19 Lua-scripts to be used later <scripts>

Instructions are in section Lua-scripts with elements.

19.2 Element type <elemtypes> and <elemtype>

Element types are listed with tag <elemtype> inside container tag <elemtypes>. Content of the <elemtype> tag is <elemtype id = "short_id" name = "name for user">. Xml-attributes:

Xlm-attribute

Description

id

Element type ID that remains the same even if the language changes.

name

Element type name for the user. If missing, id is used.

idstamp

Text to put to element stamp at bottom of the elevation.

Tolist

With value idstamp = "0" the element type is not added to the element tool palette.

Density

Defines the insulation, boarding or panelling density in kg/dm3. Default value is 0.050 (50 kg per m3).

After this comes <settings>-tag that may contain settings to override common <settings>-part, for this element type.

Also, it is possible to set some options on as default by giving <options>-tag like below:

      <elemtype class="wall" id="WALL 173 K600" idstamp="42x173">
        <!-- Default settings for this element type -->
        <settings>
          <newelem>
            <elemparam name="pen">1</elemparam>
          </newelem>

          <newelemplank>
          </newelemplank>
          <newelemprojside>
          </newelemprojside>
        </settings>

        <!-- Could set some options on here as default, settings may be given inside <option>settings</option> and format depends on the option -->
        <options>
          <option id="openingsides">
            <![CDATA[
mat=block
thickness=0.050
height=0.173
]]>
          </option>
        </options>

19.2.1 Element weight calculation

It is possible to give the weight definitions also to old style xml-definitions (instead of using own element type definitions which produce this kind of xml-definition):

<elemtype class="wall" id="WALL 173+42 PANEL OUTIN" idstamp="173+42">

…

<!-- Default element weights for this type -->

<elemweight>

<bools calc="0" door="1" win="1"></bools>

<floats framingkg="400" boardingkg="1150" insulationkg="35" doorm2kg="10" doorframekg="4" winm2kg="15" winframekg="4"></floats>

</elemweight>

The attributes for bools are:

Xlm-attribute

Description

calc

Calculate weight for the element 0/1.

door

Calculate doors 0/1.

win

Calculate windows 0/1.

forceframing

Force framing weight to value given in floats-part (instead of using weights given in ArchiFrameBlocks.xml).

forceboarding

Force boarding weight as for framing.


And for floats:

Xlm-attribute

Description

framingkg

Framing weight in kg per cubic meter.

boardingkg

Boarding weight in kg per cubic meter.

insulationkg

Insulation weight in kg per cubic meter. Value 0 is good if it is air space.

doorm2kg

Weight for door area kg per square meter.

doorframekg

Weight for door frame kg per frame meter including bottom.

winm2kg

Weight for window area kg per square meter.

winframekg

Weight for window frame kg per frame meter including bottom.


Default weights set internally inside ArchiFrame are like this:

<elemweight>

<bools calc="1" door="0" win="0"></bools>

<floats framingkg="450" boardingkg="1100" insulationkg="30" doorm2kg="15" doorframekg="5" winm2kg="20" winframekg="5"></floats>

</elemweight>

Then the weight settings are searched from each construction layers’ <elemweight>-tag. Composite structure cannot have weight settings.

19.2.2 Element layers <layers> and <layer>

Now only the core is modeled. Layers can be defined to allow easy anchoring of the element's gypsum board inner surface with Archicad wall side. Layers are listed starting from exterior.

<layer name="Core" visible="1" thickness="0.195" type="core" anchorname1="Core ext" anchorname2="Core int">

Xlm-attribute

Description

name

Layer name that is visible in element tool's anchor list.

visible

For future.

thickness

Layer thickness.

type

Core must be specified with setting: type = "core"

anchorname1

Name of the layer's exterior side to the anchor list.

anchorname2

Name of the layer's interior side to the anchor list.

circletorect

Maximum size of an opening that will be converted to bounding rectangle if it has any arcs. For example, here the selected layer is converted and the one behind has the line segments following the original circle:

circle_to_rect_max_diameter in own element type settings.

19.2.3 Planks to the layer <planks>

Defines single plank group. Group has a name that is used to for example to adjust plank groups together, creating grooves and other machinings.

<!-- Group name will have suffixes: _y=vertical planks, _x=horizontal planks -->
<!-- Group names can be used for example to make grooves for balks and groups may be referred using wild cards: vertical* -->
<planks group="vertical" axis="y" opening_parallel="1" opening_normal="1" spacing="0.6" spacingtolerance="0.01" gablehipsplit="0" studs="core" followstagger="50">
  <material id="L123" zoff="0.000" rotangle="0">
    <objparam name="iUsageId">XXX</objparam>
    <elemparam name="pen">8</elemparam >
  </material>
  <force>
    <parallel x1off="0.141"></parallel>
    <parallel x2off="-0.141"></parallel>
  </force>
</planks>

Xlm-attribute

Description

group

Group name, ArchiFrame will add postfix at the end of given name (for example "vertical_y"):

  • •

    _y, plank in Y-axis.

  • •

    _x, plank in X-axis.

  • •

    _opening, inclined edges in openings.

  • •

    _force, forced planks.

  • •

    _spacing, planks added due to spacing rule.

axis

Planks base direction in element's coordinates, either "x" or "y" or "unused" to process unused contour edges. If used value axis="unused", two more attributes are available:

  • •

    contour_unused = "1", handle contour line (default = 1).

  • •

    opening_unused = "0", handle holes (default = 0).

Also, value axis="unused_angled" can be used. Then planks will be placed only to edges which are not in x- or y-axis.

skipaxis

With value "1" there will not be planks in the element's base direction.

opening_parallel

  • •

    "0", do not add.

  • •

    "1", add planks to axis-direction edges in openings extending to the polygon.

  • •

    "2", do not extend to the polygon (useful for horizontal studding) but extend by plank’s width on the element surface.

  • •

    "3", do not extend to the polygon and do not extend by plank’s width.

Please see this.

opening_normal

As previous but axis is rotated 90 degrees from the base direction. Please see this

spacing

Spacing distance in meters.

spacingtolerance

Please see here.

stackingoffset

By default, the spacing will start from the edge of the element object. For example, with spacing value of 600 mm, the first stud will be placed 600 mm from the element edge. Setting this attribute makes the middle line of the first piece to be placed given distance from element’s left/right edge. Axis is the base direction, for vertical (axis = "Y”) positive starts from left and negative from right, for horizontal (axis = "X”) positive starts from top and negative from bottom.

This is useful to get evenly spaced pieces for log kind of structures. Also, it is useful if there is a piece with width 90 mm that should be spread evenly using spacing 100 mm.

gablehipsplit

Value is "0" or "1": Default value "0" will add a stud to every corner at the elements top side. With value "1" there will be two studs halving the given spacing from the corner position to left and right. With value "2" there will be two studs touching each other on both sides of the hip.

Value 0:

Value 1:

Value 2:

skipcorners

Avoid getting planks to each polygon corner with the default value 0:

create

To be used in element templates. Value is "0" or "1" (default and used if attribute is missing). Value "0" will skip this definition.

studs

If given, tells which layer is followed in current layer. For example, studs="core" means that current layer follows the core layer’s studs. Can be used in both framing and boarding layers.

followstagger

With non-zero value defines that pieces are placed staggered to the followed layer. Used in conjunction with studs="xxx". An example:

zstagger

Another way to make double framed part. Non-zero value gives result like this:

Spacing still defines distance between studs. For example, if spacing of 600 mm is needed to each side, the spacing value for the element must be 300 mm.

Example: zstagger="1"

duplicate_zoff

Option to produce double studs for example to be used with SIP-structures:

This is length value how far in the watching direction the secondary piece is placed.

Studs fill pen

The fill pen to use with wall studs:

19.2.4 Standard plank roles

These are the standard roles used by default framing rules in elements:

It is saved into the plank object here (internal parameter name being iElemGroup):

ArchiFrame uses these role names for example to find which pieces should be marked when marking only element’s opening pieces.

Table of the values:

Name

Description

vertical_y

A vertical stud because one of these reasons:

  • •

    It is at the left or right hand side of the element

  • •

    There is an angled part at top or bottom

  • •

    Next to an opening

vertical_spacing

Vertical stud from the spacing rule

vertical_x

Horizontal piece in 90 degree angle to the main framing direction. Opening tops and bottoms.

vertical_y_cornerdouble

Generated because of this element option:
[x] Double studs to left and right

vertical_y_openingdouble

Generated because of this element option:
[x] Double studs to
opening sides

bottom_force

The lowest bottom plate

2ndbottom_force

Second lowest if this is checked:
[x] Double bottom plate

top_force

The highest top plate

2ndtop_force

Second highest if this is checked:
[x] Double top plate

balktop*

balkbottom*

Generated because of these element options:
[x] Top balk back
[x] Top balk front
[x] Bottom balk back

[x] Bottom balk front

Front side will add out (balktopout) and back side in (balktopin).

contourtilted

Non horizontal & vertical contour part

contourtilted_opening

Non horizontal & vertical opening related part

lintel

Lintel/opening header beam

nogging

Generated because of this element option:
[x] Lintels load bearing
[x] Lintels no load

Lintels custom for selected pieces

19.2.5 Material settings <material>

Similar material settings are used with element and weatherboard settings. It is possible to give settings related to just these planks (see XML-element settings).

  <material id="block" thickness="0.015" height="0.075" zoff="0.000" rotangle="0">
    <objparam name="iUsageId">XXX</objparam>
    <elemparam name="pen">8</elemparam >
  </material>

Xlm-attribute

Description

id

Material id, "block" is general type and it also requires giving the material size.

thickness

Material thickness only if id is "block".

height

Material width/height only if id is "block".

xoff,yoff

Move in element's X- and Y-axes.

zoff

Move in element's Z-axis. For example value -0.050 places the plank's reference line 50 mm in front of the current layer.

linexoff

Move to right relative to current line, negative moves to left.

rotangle

Plank rotation angle in degrees. ArchiFrame sets the rotation so that the plank extends towards the watching direction. This value is added to that. For example, plank with size 50 x 100 mm is placed with default settings to the layer's front surface and the plank extends 100 mm in the watching direction.

Rotation and zoff affect like this:

Please see information about the planks.

Following variables may be used inside <material>-tag:

Variable

Description

mat_thickness

Material thickness as given in ArchiFrameBlocks.xml, for example:

<material id="L128RL" name="21x120 VL" thickness="0.021" height="0.120"

mat_height

Material height/width.

19.2.6 Forced planks <force>

It is possible to add planks in fixed positions, for example double studs at the left and right-hand sides of the element:

  <force>
    <material id="98x48" zoff="0" rotangle="0"></material>
    <parallel x1off="0.141"></parallel>
    <parallel x2off="-0.141"></parallel>
  </force>

<parallel> adds planks in element's axis direction and <normal> in the perpendicular direction. Material can be set for the forced planks with <material>-tag.

Xlm-attribute

Description

x1off

Plank is placed to the left side of the element relative to current axis. Middle line is moved the given distance to the right. Please note that the offset defines the plank’s projected center line – not the base line.

x2off

As x1off, but relative to the right side.

zoff

As in <material>-defintion.

extend

Either "0" or "1". Value "1" extends the plank to the element's contour.

An example of element like this having three planks and the light blue element object on the background vertically oriented as normal walls:

<layers>
  <layer name="Core" visible="1" thickness="[thickness;type=length]" type="core" rotframing="[rotframing;type=real;default=0]">
    <!-- Bottom hor -->
    <planks group="bottom_force" axis="x" skipaxis="1">
      <material id="[matid;type=matid]" zoff="0" rotangle="0"></material>
      <force>
        <parallel x2off="-mat_thickness*0.5"></parallel>
      </force>
    </planks>

    <!-- side 1 -->
    <planks group="2ndbottom_force" axis="x" skipaxis="1">
      <material id="[matid_vert;default=@matid;type=matid]" zoff="[zoff;default=mat_thickness*0.5]" rotangle="90"></material>
      <force>
        <parallel x2off="0-([vert1_mid_offset;default=0.045+mat_height*0.5])"></parallel>
      </force>
    </planks>

    <!-- side 2 -->
    <planks group="2ndbottom_force" axis="x" skipaxis="1">
      <material id="[matid_side2;default=@matid;type=matid]" zoff="[zoff_side2;default=0.045 + mat_thickness*0.5]" rotangle="90"></material>
      <force>
        <parallel x2off="0-([vert2_mid_offset;default=0.045+mat_height*0.5])"></parallel>
      </force>
    </planks>
  </layer>
</layers>

19.2.7 Boards

<layers>
  <boarding thickness="0.013" overlap="1" boardingtype="1" useprev="1" prevminwidth="0.6" prevsawwidth="0.005" stagger="1" staggerpartial="1" staggerminstagger="1" staggerminbeginwidth="0.300" staggerpartialwidth="0.600">
    <board id="GYPSUM 13x1200x2700" width="1.2" height="2.7" ></board>
  </boarding>
</layers>

Xlm-attribute

Description

firstlastpartial

Make ArchiFrame to find boarding that has full boards between first and last board and make sure that the last board is connected to at least two studs.

Without the opening disturbs boarding:

With the setting:

overlap

Affects multiple layers of boards, values:

  • •

    0 or missing, no special processing. Board edges will be at the same place.

  • •

    1, avoid board edges at the same stud. If this is set and there is another board layer to process, no other boarding strategies are applied.

useprev

Value 0/1 if the leftover of the previous board should be used for the next board. The next setting defines the minimum width of the board to be reused.

prevminwidth

The minimum width for the leftover from the previous board. If smaller than this value, the leftover is not used.

prevsawwidth

If using the previous board, the width of the saw blade used to cut the board. This is reduced from the remaining board.

partialmid

If the height of the area is more than 2 x board height, this option leaves partial row to the middle (to the second last to be exact) instead of top/bottom:

0=Leave the last not full board to top/bottom
1=Leave it to the second last position

stagger

Whether to stagger successive board rows 0/1. Please note this works only with boarding strategy 2 (from left or combined with 256 i.e. 258 start from right).

staggerpartial

If staggering:

  • •

    0, start the first row with full board

  • •

    1, start the first row with partial board

staggerminstagger

If staggering, the minimum distance of the board edges in the successive rows.

staggerminbeginwidth

If staggering, the minimum width for the first partial board in the row. Used only if using the leftover from the previous board.

staggerpartialwidth

If staggering, the width of the first board in the partial row. This value is used if the leftover is too small or not used at all.

edgetodoublestud

Will cause special boarding of openings having double studs like below:

The opening top & bottom pieces may have to manually joined. Compatible with boarding strategy 2.

circletorect

Maximum size of an opening that will be converted to bounding rectangle if it has any arcs. For example, here the selected layer is converted and the one behind has the line segments following the original circle:

circle_to_rect_max_diameter in own element type settings.

checkerboard

Sets the 3D material and 2D pen for the adjacent boards so that they can be distinguished from each other. By default, this is on and setting it off allows the user to set the 3D surface material or building material.

Board staggering example:

And the related settings:

Remarks:

  • •

    Staggered Boards in the New features 2026 video

  • •

    Board size is 8x4 feet

  • •

    First row starts with a full board and ends with 6 feet wide leaving leftover of 2’ which is smaller than the defined minimum width of 2’ 8”. This makes that piece to be discarded.

  • •

    Second row then start with the defined 4’ piece and ends to 2’ feet piece leaving 6’ leftover.

  • •

    That 6’ piece is used in the topmost row extending to the furthest possible stud and then the process continues with full size boards.

19.2.7.1 Boarding strategies/attribute boardingtype

Studding affects greatly how the boards can be placed. Therefore, the studding layer should have compatible framing rule with the boarding rule.

1 or missing (default), no board edge to opening edge.


2 starts from left, no special handling for openings.


3 starts from left and right-hand sides of each opening and then do the openings.


4 starts from the opening edge instead of the middle of the opening side stud, works with main framing rule 1 or 9 and requires element option [x] Opening support to have the pieces at opening sides (Boarding Strategy 4: Rectangular Boards in the New features 2026 video):

Boarding rules modifiers

Modifiers are added to the base values and more than one modifier can be specified. For example: 2 + 256 + 512 + 1024 + 2048 = 3842.

  • •

    256 changes starting processing from the right hand side, usable with 2 (2+256=258) and 3 (3+256=259):

  • •

    512 allows ArchiFrame to place the board edge not only to center of a stud but anywhere between touching studs center lines. For example, the result of using boarding strategy 2 (start from beginning):

    Added 512 using value 514:

  • •

    1024 will skip starting boarding from a locked (Section from begin or end) stud. It is useful if generating framing uses locked plank from a corner rule and boarding should be made without taking the locked plank into account. For example, normal boarding when the selected stud is Section from begin:

    And adding 1024 to the boarding rule (1026 = 2 (start from beginning) + 1024):

  • •

    2048 will start placing full boards from top instead of the default bottom – normal boarding:

    With 2048:

19.2.7.2 Main framing rule/attribute framingrule

Value zero or missing definition uses default rule: Try placing studs from every fixed stud (left & right, opening left & right) and select the one that uses least material.

Value 1, start applying spacing rule from left & right-hand sides of the opening. If there is more than 2 x spacing from the starting point to end of spacing area, the first spacing is spacing – stud width/2:


Value 2, same as 1 but place single stud to middle of opening instead of standard spacing if width less than 2 x spacing:


Value 3 is same as 1 but spacing is always from middle of the first stud.

Value 4 is same as 2 but spacing is always from middle of the first stud.

Value 5, start from left and from top for horizontal structures:


Value 6, start from right/bottom:


Value 7 as 5 but spacing starts from middle of the starting piece instead of its edge.

Value 8 as 6 but spacing starts from middle of the starting piece instead of its edge.

Value 9, as value 1 but always start from the edge of the opening instead of the middle of the stud.

19.2.8 Operations between the planks <operations>

In this section the planks are adjusted together, and grooves are added for beams. All operations use plank groups to define operators and targets.

<joinends target="horizontal*|inclined*" operator="horizontal*|inclined*">
  <joinends conntype="endtoend" jointgap="0.000"></joinends>
</joinends>

Xlm-attribute

Description

target

Name of the groups that are operation targets. It is possible to give multiple names using separator |. The name may contain wild cards * and ?, * replaces any text and ? single character.

Group names may refer to another layer in multilayer element. If that is needed, the layer type tag is given before the group name having dot as a separator. For example, to match another layer to core layer’s top&bottom plates:

operator="core.bottom*|core.top*|core.vertical_x*|core.contourtilted*"

It is possible to use plank indexes in target and operator definitions. The syntax is #num1[,num2,num3…]

For example to list three planks:

target="#1,9,12"

operator

Operation operator group names.

targetskip

To be used by scripts: Comma separated lists of plank guids/ptrs to exclude from the group. Also group names with wild characters may be used.

operatorskip

The same for operators.

19.2.8.1 Limiting operation with plank connection type <xxx conntype="yyy>

In many operations it is possible to limit the plank connection types. Attribute conntype may have following values:

Value (yyy)

Description

endtoend

Plank reference lines must be connected from ends.

endtoline

Target plank reference line must connect with its end to middle of the operator plank's reference line. Possible additional definitions:

  • •

    mindisttoend = "meters" defines target end's minimum distance from end of operator plank ends.

  • •

    disttoend = "meters", as previous but length must match exactly. Useful for weatherboards.

linetoend

Operator plank reference line must be connected from end to middle of target plank's reference line. Additional definitions as in endtoline-connection.

linex

Target plank's reference line must intersect with operator plank. Note! It is ok if target reference line just intersects the operator – the reference lines may not intersect. Possible additional definitions:

  • •

    maxdisttoend = "meters" defines maximum distance from intersection to the end of target plank.

  • •

    maxdisttoendop = “meters” same as previous but distance from operator piece.

  • •

    mindisttoend="meters", mindisttoendop="meters" as previous but defines required minimum distance instead of maximum.

  • •

    absangle="degrees" tells the maximum positive angle between the planks for rule to be true. Value is always between 0…90 deg.

Please note that if intersection point is outside the line, the distance is negative and max distance condition is always true.

hasx

The planks have any intersection. Possible additional definitions are the same as for linex above.

19.2.8.2 Adjusting planks to another planks side <jointo>

Straight cut is made with <cut>-tag:

<jointo target="target_groups" operator="operator_groups">
  <cut jointgap="0.000" extendmaxlen="0.0" expandopfind="0.0" endshape="angled"></cut>
</jointo>

Xlm-attribute

Description

jointgap

Gap between the planks, negative value produces overlapping.

skipopface

Bit mask defining operator plank sides to be skipped: 1=top, 2=front, 4=bottom, 8=back, 16=begin, 32=end. Default is 0. To skip all side surfaces and search connection to begin and end only, value 15 is used.

extendmaxlen

Maximum distance between target and operator plank to make the operation.

expandopfind

How much the operator plank is expanded from each side before checking the intersection. Pieces touching just from the corner will not be found unless for example 1 mm (0.001) is given here.

endshape

Possible additional definition for the cut:

  • •

    "angled", extend and cut to the operator (default).

  • •

    "anglednoext", just cut without extending.

  • •

    "angleddel", as angled but remove all existing cuts.

  • •

    "angleddelfirst", as previous but delete all existing only for first joint. For next join operations old cuts are preserved (to keep two cuts at hip).

  • •

    "straightshort", straight cut to first intersection.

  • •

    "straightlong", straight cut to last intersection.

toend

Cut surface:

  • •

    0, trim to first intersecting surface (default).

  • •

    1, trim to further surface.

removepart

Remove part:

  • •

    "up", remove upper part

  • •

    "down", remove lower part

  • •

    "between", adjust between first and last operator (if other end is missing, that end will be unmodified)

  • •

    "keeplonger" to always select the longer part of the piece and stop processing when end is cut away:

dontcuttarget

Set to 1 if just adding markings – do not cut the piece.

domark

Set to 1 to add marking lines to connection.

markside

Forced marking side, 0=automatic

marklines

0=to sides, 1=to center, -1=no lines

markauto

Set the Managed by ArchiFrame-setting for the marking machinings to this value.

marktext

Marking text if any, tags as in the tool palette

markposx

Text position 0 = left, 1 = center, 2 = right

markposy

Text position 0 = bottom, 1 = center, 2 = top

markfontsize

In centimeters, 0 = default

markdir

0=default direction, 1=text in line’s direction

conntype

See Limiting operation with plank connection type <xxx conntype="yyy>.

Mortise and tenon joint is done with <mortisetenon>-tag:

<jointo target="targets" operator="operators/female parts">
  <mortisetenon len="0.056" bordertop="0.02" borderbot="0.005" borderside="0.01" roundingr="0.0225" endgap="0.001" sidegap="0.001" topgap="0.010"></mortisetenon>
</jointo>

Dovetail with <dovetail>-tag:

<jointo target="targets" operator="operators/female parts">
  <dovetail len="0.038" bordertop="0.00" borderbot="0.050" bottomwidth="0.06" roundingr="0.0225" endgap="0.000" sidegap="0.000" angle="6" ></dovetail>
</jointo>

19.2.8.3 Adjusting ends <joinends>

This operation connects two planks together halving the angle. Both targets and operators are handled the same way.

<joinends target="horizontal*|inclined*" operator="horizontal*|inclined*">
  <joinends conntype="endtoend" jointgap="0.000"></joinends>
</joinends>

Xlm-attribute

Description

jointagap

Gap between plank ends.

keepend

If given, will say which end to keep from the target plank: -1=begin, 1=end

keepside

Useful for short (weatherboard) pieces: If given, selects the preserved end by selecting the longer remaining piece on the given plank side 1-4. For example, here we want to keep the longest possible top surface/3:

conntype

See Limiting operation with plank connection type <xxx conntype="yyy>.

19.2.8.4 Grooves and balk joint <groove>

This operation is used for example to make grooves to the studs for a beam inside the element.

<groove target="vertical_y|vertical_spacing|vertical_force" operator="balktop*">
  <groove overtop="0.000" overbot="0.000" overside="0.000" overlen="0.000"></groove>
</groove>

Xlm-attribute

Description

overtop

Oversize at operator plank's top side.

overbot

…bottom side.

overside

…sides, may be given individually with attributes overleft and overright.

overlen

…lengthwise.

forcedepth

To force depth as in groove tool.

force90

To force groove as perpendicular.

forcetargetside

Value 1...6 of forced target surface.

autoupdate

Value 0 makes groove that is not automatically updated and value 1 or missing definition makes automatically updating one.

conntype

See Limiting operation with plank connection type <xxx conntype="yyy>.

Narrowed balk (adds machinings to operator plank too):

<groove target="vertical_y|vertical_spacing|vertical_force" operator="balktop*">
  <balkborder bordertop="0.02" borderbot="0.005" borderside="0.01" overtop="0.001" overbot="0.000" overside="0.001" overlen="0.000"></balkborder>
</groove>

Xlm-attribute

Description

bordertop

Narrowing depth at operator-plank's top side.

borderbot

…bottom side.

borderside

…sides.

overlen

How much longer the narrowing part is than the related target plank. Other oversizes as in <groove>-operation.

19.2.9 Projections <projections>

Please see XML-file for details. Attribute layoutmargins defines marginal in order: Left, right, top, bottom.

<projections>
  <group layout="horizontal">
    <group layout="vertical">
      <!-- Only planks belonging to the element are included in cutlist -->
      <!-- valign: -1=left/bottom, 0=center, 1=right/top -->
      <cutlist valign="-1" layoutmargins="0.1,0.1,0.1,0.1" layoutminwidth="2.0" layoutminheight="7.0" settingsref="cutlist"></cutlist>
    </group>
    <group layout="vertical">
      <projection type="front" layoutmargins="2,2,2,2">
        <dimlines>
          <dimline ref="wall_elevation"></dimline>
        </dimlines>
        <elemmarkings>
          <opening ref="mark_opening"></opening>
        </elemmarkings>
      </projection>
      <projection type="top" layoutmargins="2,2,0,2">
        <dimlines>
          <dimline ref="wall_top"></dimline>
        </dimlines>
      </projection>
      <projection type="back" layoutmargins="2,2,0,2">
        <dimlines>
          <dimline ref="wall_elevation"></dimline>
        </dimlines>
      </projection>
    </group>
  </group>
</projections>
</elemtype>

Xlm-attribute

Description

layoutalign

Obsolete.

valign

Align vertically in the parent:

  • •

    -1, top (default).

  • •

    0, center.

  • •

    1, bottom.

halign

Align horizontally in the parent:

  • •

    -1, left (default).

  • •

    0, center.

  • •

    1, right.

type

For projection tag, possible values:

  • •

    front

  • •

    back

  • •

    top

  • •

    bottom

  • •

    topflipx (will mirror X-coordinates of the projection)

  • •

    bottomflipx (will mirror X-coordinates of the projection)

  • •

    left

  • •

    right

  • •

    frontrot180 (rotated 180 degrees)

  • •

    backrot180 (rotated 180 degrees)

For projections also rotation can be specified with rotate-attribute, for example:

<projection type="front" rotate="90" …

<projection>-tag may contain settings for specific layer’s projection plank objects with syntax:

<projection type="front" layoutmargins="2,0.5,0,1" exclude="*ext*" boardpanels="boarding_int*">
  <dimlines>
    <dimline ref="wall_elevation"></dimline>
  </dimlines>

  <projplanksettings type="core" objtype="1">
    <elemparam name="linetype">*dash*</elemparam>
    <objparam name="iFill">0</objparam>
    <objparam name="iShowID">0</objparam>
    <objparam name="iShowLen">0</objparam>
  </projplanksettings>
</projection>

This is useful for example, if the core layer should be shown as trace only. Settings may contain anything described in section XML-settings for an Archicad element. Attributes:

  • •

    type is the layer type to handle (please give just single type name, to set many types please add multiple projplanksettings-tags): core, intstud, extstud* etc.

  • •

    objtype can be added to apply the settings only for planks (objtype="1"), boards (objtype="4") or both (objtype="5").

To make more complicated settings, it is possible to add a Lua script for processing the projection planks. For example, the script at XML-path archiframe/elem/settings/scripts. The function name DoProjSettings() is fixed:


<!-- Sets ID to middle for horizontal planks -->

        <script id="yit_projplanks" merge="addpre">
          <![CDATA[
function DoProjSettings()
  local z
  
  for i=1,gnPlanks do
    ac_objectopen(string.format("#%d",i))
    -- Vertical (studs) with different fill
    z=ac_objectget("iEndZ")
    if z and math.abs(z)<0.001 then   -- nil if board
      -- Horizontal piece, ID to middle
      ac_objectset("iIDPlace", 0)
      ac_objectset("iXoffID", 0)
    end
    ac_objectclose()
  end
end
]]>
        </script>

And the reference to it:

<projection type="front" layoutmargins="2,0.5,1,1" exclude="*boarding*,*stud*,*finish*">
  <projplankscript ref="yit_projplanks">
  </projplankscript>

It is possible to place the core layer just by contour lines as reference and include it in offset dim lines:

The xml-syntax for that is (under <projection>-tag):

<contourlines create="1" holes="0" hatch="0" layer="core">
  <elemparam name="pen">1</elemparam>
  <elemparam name="linetype">*dash*|*katkoviiva*</elemparam>
  <layer>xxx</layer>
</contourlines>

This will create the dashed lines as in example above on Archicad layer xxx. Attribute layer="core" allows setting the construction layer used to generate the lines. Its value can be like boarding_int3,studding_ext etc. Please note the reference with exclamation mark to include core layer to dimension line even if it is not visible in dimension line xml: includeelem="*boarding*,!core"

By default, holes are not drawn – just the contour line. Setting attribute holes="1" will include holes.

Setting attribute hatch="1" will create a hatch instead of lines.

<contourlines create="1" holes="1" hatch="1" layer="core">
  <elemparam name="pen">1</elemparam>
  <elemparam name="linetype">*dash*|*katkoviiva*</elemparam>
  <elemparam name="cutfill">*triangles*</elemparam>
  <elemparam name="cutfillpen">13</elemparam>
  <elemparam name="cutfillbgpen">0</elemparam>
</contourlines>

19.2.10 Projections/static texts

It is possible to include title/information texts inside <group>-definitions. For example, to add ID outside the print frame and text LOOKED FROM OUTSIDE to position X = 3, Y = -0.05 from current’s group’s top & left coordinates.

<group layout="vertical">
  <text content="#id#" anchor="7" x="0" y="0.1" update="1">
    <elemparam name="pen">1</elemparam>
    <elemparam name="fontname">arial</elemparam>
    <elemparam name="fontsize">30</elemparam>
    <elemparam name="fontstyle"></elemparam>
  </text>
  <text content="LOOKED FROM OUTSIDE" anchor="1" x="3" y="-0.05">
    <elemparam name="pen">1</elemparam>
    <elemparam name="fontname">arial</elemparam>
    <elemparam name="fontsize">1.5</elemparam>
    <elemparam name="fontstyle"></elemparam>
  </text>

Xml-attribute

Description

content

Text to add, following texts are replaced:

  • •

    #id# by the element id, for example EW01.

  • •

    #weightkg# by element weight in kilograms.

  • •

    #weightlb# by element weight in pounds.

  • •

    #elemtype# by composite element’s type ID.

  • •

    #floornum# by the home floor number.

  • •

    #floorname# by the home floor name.

anchor

Text anchor point:

1 2 3

4 5 6

7 8 9

x,y

Offset to place text from current position.

update

By default, these static texts are created once – they are not moved, nor is content updated afterwards. By setting this to value 1, the position and content will be updated when element is updated.

script

Refers to xml-path /archiframe/elem/settings/script/script id="xxx". This scrip has environment of a projection’s dimension line script like dim_camera is available. ArchiFrame calls fixed name function GetText() The script generates the content of the text returned like below

Attributes to anchor the text to a projection:

Xml-attribute

Description

projanchor_id

Value refers to an <projection id="xx" … >-tag

projanchor_anchor

Anchor point in the projection for text’s position like anchor above.

projanchor_xoff,

projanchor_yoff

Offset from the anchor point.

A partial example to generate content from Lua-script:

-- To be set by luasettings-tag
gnSide=-1     -- -1=left, 1=right
gsLayer=nil   -- nil=just corner type, str=elem layer to find offsets from

function GetText(sSettingsLua)
  local res
  
  if sSettingsLua and sSettingsLua~="" then
    -- String contains lua script that fills global settings variables
    local f
    
    f=loadstring(sSettingsLua)
    if not f then
      ac_environment("tolog", string.format("GetText: Bad settings Lua-script: %s", sSettingsLua))
    else
      f()
    end
  end
  
  -- Return text in table for future extensions
  res={}
  res.text=GetSideInfo(gnSide, gsLayer)
  return res
end

An example scipt based static text xml-defintion. There is a special <luasettings>-section that allows passing Lua-code to the GetText()-function.

<projection id="page1_front" type="front" …>

…

</projection>

<text content="(UNUSED)" anchor="6" update="1" script="CornerAndOffInfo" projanchor_id="page1_front" projanchor_anchor="4" projanchor_xoff="-0.1" projanchor_yoff="0">

<elemparam name="fontname">arial</elemparam>

<elemparam name="pen">1</elemparam>

<elemparam name="fontsize">2.5</elemparam>

<elemparam name="fontstyle"></elemparam>

<luasettings>

<![CDATA[

gnSide=-1

gsLayer=nil

]]>

</luasettings>

</text>

19.2.11 Projections/element stamp <projections>

It is possible to use any kind of stamp object in the element drawings. ArchiFrame library contains at least single stamp that can be slightly customized. As default the stamp looks like:

The field names and values all come from ArchiFrameElements.xml. The default definition is:

<elemstamp valign="-1" layoutmargins="-2.2,0,0,0" layoutminwidth="10.0" layoutminheight="1.0" libname="{9FD03D30-6A12-4B0F-AB3A-01410A529E38}-{D420792D-C066-42CF-988C-9596DD164EB7}" settingsref="elemstamp">
  <script ref="elemstamp"></script>
</elemstamp>

Xlm-attribute

Description

libname

Library part’s name, please use GUID that you can get from ArchiFrame main tool palette/Selecion/Other operations:

settingsref

Refers to common settings xml-tag in elem/settings/presettings.

script ref

Refers to xml-tag elem/settings/scripts. With element scripts multiple references may be given using attributes ref = “first” ref1 = “second” ref3 = “third” etc. To add text from current tag before referenced part(s), attribute currpre="1" is used. It is useful to set global variables before they are used in referenced script.

It is recommended to set the stamp field names in settings xml and the stamp parameters in Lua-script. For example the default settings for field names:

<!-- Used for element stamp -->
<elemstamp>
  <elemparam name="pen">1</elemparam>
  <objparam name="iFont">Arial</objparam>
  <objparam name="A">10</objparam>
  <objparam name="B">1</objparam>

  <objparam name="iName1">ID</objparam>
  <objparam name="iName2">Type</objparam>
  <objparam name="iName3">Date</objparam>
  <objparam name="iName4">Project</objparam>
  <objparam name="iName5">Designer</objparam>
  <objparam name="iName6">Project num</objparam>
  <objparam name="iName7"></objparam>
</elemstamp>

The default script sets field Date and Designer only if those are empty. To see available auto texts, open ArchiFrame main tool palette/Selecion/Other operations (picture above). To change the automatic values, select the stamps for example using Archicad Find & Select and open object settings.

Please see default ArchiFrameElements.xml for all the details.

19.2.12 Markings into planks <markings>

<markings id="mark_big">
  <bottomwood setcnc="0">
    <stud line="3" id="2" idline="1" markxpos="2" markypos="1" marksize="5" marktextdir="1"></stud>
    <opening line="1" windowtext="Vindu [width]x[height]" doortext="Dør [width]x[height]" marksize="5"></opening>
    <neighbour begtext="&lt;[id]" endtext="[id]&gt;" marksize="10" marktextdir="1"></neighbour>
    <joint char="*" marksize="10" marktextdir="1"></joint>
  </bottomwood>
  <topwood setcnc="0">
    <stud line="3" id="2" idline="1" markxpos="2" markypos="1" marksize="3" marktextdir="1" forceside="0"></stud>
  </topwood>
</markings>

Specifies markings to the planks in the element. Markings are set whenever the element is updated. Attribute setcnc controls whether plank's cnc-parameter is set to 1 if there are markings added. Default value is 1. Currently it is possible to mark only the top and bottom wood (connecting elements, studs and openings).

Tag

Description

stud

Stud markings, attributes:

  • •

    line, 1 = mark left, 2 = mark right, 3 = mark both.

  • •

    id, 1 = mark whole id, 2 = strip elem id away, just the plank number.

  • •

    skipid, if given, tells the iElemGroup-values not to add IDs

  • •

    idline, 1 = left hand side, 2 = right hand side, 3 = let ArchiFrame calculate position not under any stud, 4 = to middle of the stud

  • •

    skipline, if plank’s iElemGroup-value matches this list, no markings are added to the plank at all.

  • •

    markxpos, justify 1 = left, 2 = middle, 3 = right.

  • •

    markypos, justify 1 = bottom, 2 = middle, 3 = top.

  • •

    marksize, text size in centimetres, 0 = default.

  • •

    marktextdir, 0 = in plank dir, 1 = in line dir.

  • •

    forceside, 0=automatic target side, 1-6=force marking to given side

opening

Mark openings, attributes:

  • •

    line, 0 = no line, 1 = line covering the opening.

  • •

    windowtext, text for window, [width] and [height] are replaced with AC locale aware dimensions.

  • •

    doortext, the same for doors.

neighbour

Mark connecting elements (only end connections):

  • •

    begtext, text to connection at plank begin, [id] will be replaced with connecting element id.

  • •

    endtext, the same for plank end.

  • •

    mark*, the same as for studs.

joint

Mark joints, attributes:

  • •

    text, the character to use to mark connecting pieces 

19.2.13 Element options, <options>

All element options are defined in <options>-section of the ArchiFrameElements.xml–file. Single option definition is like:

<option id="openingsides" name="Planks to openings sides" applystate="prespacing" ordernum="100">
  <script ref="openingsides">
    <![CDATA[
]]>
  </script>
</option>

Xlm-attribute

Description

id

Unique id of the option. Not visible to the user.

name

Visible name.

applystate

Specify to alter the phase when the option is applied. Default phase is after creating all element planks. Possible overrides are:

  • •

    prespacing, after all element edge pieces have been creates but spacing rule has not been applied yet. Used if the option moves studs.

  • •

    postcreatelayers, after all element layers have been created. Used when option needs information from other layers.

autoreset

Specified if other option(s) need to be reset when this one is set. For example autoreset = “openingsides”.

ordernum

Options may depend on each other. This sets the applying order for the options. Smaller number (default = 100) will be applied first.

reapplyupdate

If set reapplyupdate = “1” and option is checked on, the option is first cleared and then set again when the user clicks Update from the element tools. This is useful for example to add markings to the pieces.

<reapply>-tags may be given if some options should be reapplied when current one changes. For example, if double top is changed, grooves at top must be reapplied to the lowest top piece and balk top level may change:


<option id="doubletop" name="Double top" name_fin="Tuplayläjuoksu" name_nor="Dobbel Toppsvill" name_swe="Dubbla hammarband">
<!-- If there is already grotop for the element, remove existing and set after running this option --> <reapply id="grotop"></reapply> <reapply id="balktopint"></reapply> <reapply id="balktopext"></reapply> <reapply id="automodule" doreset="0"></reapply>

Attribute doreset defines if the reapplied option is first cleared calling Reset()-Lua function. Default value is 1 to call it.

The option itself is defined with Lua-script, please see Lua-scripts with elements.