© 2026 MVC Software Ltd. All rights reserved. Free to download. AutoStruct 0.1, made from the source of 2026-11-21 (1ed71f970). Driving AutoStruct from TCL A reference for the AutoStruct command channel

Driving AutoStruct from TCL
A reference for the AutoStruct command channel

AutoStruct

November 21, 2026

Abstract

AutoStruct embeds a TCL interpreter and listens on a loopback socket, so a script outside the application can drive the real user interface with real painting. The aim is that a script can stand in for the mouse over the whole span of a project, so every command here is the one the interface itself uses rather than a parallel path that has to be kept in step.

This manual is the whole vocabulary: what each command takes, what it answers, what it refuses, and the rules about levels, labels, history and saving that a script has to respect.

1 Getting a command into AutoStruct

Start the application with a port. Nothing listens unless one is asked for, so an ordinary run is unaffected.

AUTOSTRUCT_TCL_PORT=7373 AutoStruct &

Then send it script text — one script per line, one reply line back:

printf ’autostruct::element::kinds\n’ | nc 127.0.0.1 7373 
printf ’source /path/to/myscript.tcl\n’ | nc 127.0.0.1 7373

Replies are OK result or ERR reason . Sending source path has the interpreter read the file itself, so a multi-line script needs no escaping. The same commands can be typed into the console’s Commands panel without any port at all.

A script file is read as UTF-8, and the names of the files a script opens, sources or lists are UTF-8 too, on every system and whatever language the computer is set to: a level named Çatı Katı is reached under its own name, and one named in Greek alike. Save a script in UTF-8; one saved in a code page of its own (Windows-1254, ISO 8859-7) is read wrongly wherever it goes beyond ASCII.

Every command returns only once the GUI thread has drained, so a reply means the work is finished, not that the request was accepted.

A script runs to its end before anything else happens in the application, so TCL’s own waits for an event — vwait, update, and after given a script, idle, info or cancel — would never end, and are refused with that reason. after with a time in milliseconds alone pauses the script, the whole application with it. To wait for something that takes its time, such as the window minimising, send the next command a moment later.

2 What each command touches, and what an undo can take back

The table below groups the whole vocabulary by what a command changes, because that is what decides whether autostruct::undo can take it back.

BOARD

changes what is on a board — an element, its fields, the selection. An edit here goes onto the history stack and an undo takes it back, which is the pattern every drawing command follows.

PROJECT

changes the project rather than a board: a setting, a document, a storey model, another level. These are across boards by nature — one grid for the whole building, so that axis A is axis A on every floor; one site; one rib catalogue — so they run directly, and they are written to disk as they are issued. There is no save to wait for and no undo to take them back.

SESSION

the application itself: opening, saving, closing, quitting, the channel, the console panels, the project wizard. These cannot be undoable.

READ

answers a question and changes nothing.

The nine BOARD commands marked “no” are not a gap. Six of them are drawing aids — the snap, the angle constraint, the beam axes, the developments, the measure, the plan — which change what the board shows and nothing in the model; a level switch resets them by design. The other three are the selection, and a selection is not an edit: it is what an edit is performed on, and ?none is how it is dropped. Every command that changes the model already goes through the history stack.

BOARD — changes what is on a board, and belongs on the history stack

command

takes

undo

action

button

yes

anaptygma

?beam|column|slab|footing? ?n | x y | off?

no

angle

?off|degrees?

no

axisbeam

x1 y1 x2 y2 width ?label? ?-field value ...? ?-level name?

yes

beamaxis

?on|off?

no

camera

?reset|turn az el|zoom f|look x y z?

no

carrybeams

?level?

yes

centrebeams

?widest?

yes

dialog::cell

row column ?value?

yes

dialog::fields

–-

no

dialog::paste

text

yes

dialog::press

button

yes

dialog::set

field value

yes

dialog::tab

?tab?

no

draft::declutter

?-ask?

yes

drawraft

?projection?

yes

element::clipcopy

?-level name?

no

element::clipcut

?-level name?

yes

element::clippaste

x y | -inplace ?-level name?

yes

element::copyselected

dx dy ?times? ?-level name?

yes

element::create

kind geometry... ?label? ?-level name?

yes

element::deselect

?-level name?

no

element::divideselected

parts ?-level name?

yes

element::mirrorselected

x1 y1 x2 y2 ?-move? ?-level name?

yes

element::moveselected

dx dy ?-level name?

yes

element::offsetselected

distance | x y -through ?-level name?

yes

element::opening

label ?-at m -width m -height m ?-sill m?? ?-remove n? ?-level name?

yes

element::release

ortho|beam label ?-start y|z|yz|none? ?-end y|z|yz|none? ?-torsion on|off? ?-level name?

yes

element::remove

kind label ?-id prefix? ?-all? ?-level name?

yes

element::removeselected

?-level name?

yes

element::revert

?id? ?-level name?

yes

element::rotateselected

angle ?x y? ?-level name?

yes

element::select

kind label ?-add? ?-id prefix? ?-level name?

no

element::set

kind label field value ?field value ...? ?-level name?

yes

element::steel

ortho|beam|brace label ?section|default|concrete? ?grade? ?-level name?

yes

element::steelgrow

?-level name?

yes

element::steelselected

?section|default|concrete? ?grade? ?-level name?

yes

element::tosteel

ortho|beam label|selected|beams|columns|members standard/family stiffness|capacity ?grade? ?-level name?

yes

element::zoellner

type ?label ...? ?-level name?

yes

footings

?cantilever?

yes

key

key

yes

levels::copydrawing

from ?kind ...?

yes

measure

?x1 y1 x2 y2?

no

menu::choose

entry ?entry ...?

yes

menu::close

–-

no

menu::items

–-

no

mouse::click

x y ?-alt? ?-shift? ?-ctrl?

yes

mouse::doubleclick

x y ?-alt? ?-shift? ?-ctrl?

yes

mouse::drag

x1 y1 x2 y2 ?-alt? ?-shift|-edit? ?-ctrl?

yes

mouse::move

x y ?-alt? ?-shift? ?-ctrl?

no

mouse::rightclick

x y ?-alt? ?-shift? ?-ctrl?

yes

mouse::wheel

x y notches ?-alt? ?-shift? ?-ctrl?

no

plan

–-

no

proposebeams

?width? ?depth? ?-level name?

yes

raft

?thickness?

yes

snap

?off|on|angle|object|grid?

no

strips

?width?

yes

type

text

yes

wallbeams

?depth?

yes

PROJECT — across boards; written to disk as it is issued

command

takes

undo

decks::add

project|person name ?number value ...?

no

decks::remove

project|person name

no

dimensioning

?-grid? ?-chains? ?-coordinates?

no

drawing

?kind? ?property? ?value? ?-board name? ?-worn?

no

engine::building

?building?

no

engine::div1

level

no

existing::catalogue

?add kind field value ...|remove n|clear?

no

existing::clear

member ...|all ?-level name?

no

existing::copy

from to ...|-from level ?member ...? ?-level name?

no

existing::fromDesign

?member ...? ?-level name?

no

existing::intervene

member kind ?field value ...?|-remove ?-level name?

no

existing::screen

–-

no

existing::screening

?field value ...?

no

existing::set

member field value ?field value ...? ?-level name?

no

existing::survey

?field value ...?

no

export::bars

?beam|column|slab|footing? ?n? ?file?

no

export::dxf

?file? ?-units m|mm?

no

export::ifc

?file?

no

export::pdf

?file? ?scale? ?-sheet A0|A1|A2|A3|A4? ?-roll mm? ?-landscape? ?-titleblock? ?-title text? ?-boards names?

no

foundation::clear

–-

no

foundation::pad

cantilever ?-ortho? label ?label ...?

no

foundation::strip

width label ?label ...?

no

foundation::undo

?label ...?

no

foundation::void

label ?label ...?

no

frame::collect

?building? ?-inprocess?

no

frame::cracked

?default|off|<factor>|<kind>? ?<action>|<factor>? ?<factor>?

no

frame::history

?building? ?-elastic?

no

frame::model

?building?

no

frame::push

?building?

no

frame::solve

?building? ?-inprocess? ?-model?

no

grid::angle

?degrees?

no

grid::axis

name vertical|horizontal at

no

grid::clear

–-

no

grid::drop

name

no

grid::make

?-corners|-centres? ?tolerance?

no

grid::new

name ?-ortho|-polar?

no

grid::origin

?x y?

no

grid::positions

x|y ?at ...?

no

grid::rays

?degrees?

no

grid::remove

name ?name ...?

no

grid::rename

from to

no

grid::rings

?radius?

no

grid::use

name

no

import::dxf

propose file | plan file ?profile? ?directory? ?-sheet title? ?-window x0 y0 x1 y1? ?-origin x y? ?-reference title?

no

import::ifc

file ?directory? ?-profile name?

no

interchange::export

profile dxf|ifc ?file? ?-level name?

no

levels::assess

?level ...?

no

levels::category

?level? ?category|default?

no

levels::copy

from to ?to ...? ?-kinds kind ...?

no

levels::design

?level ...? ?-inprocess?

no

levels::fill

from to ?to ...?

no

levels::jackets

?-apply? ?level ...?

no

levels::materials

?level? ?{path}? ?value|default?

no

levels::tilt

?level? ?Gx Gy|default?

no

orio::box

?x1 y1 x2 y2?

no

orio::clear

–-

no

orio::line

x1 y1 x2 y2

no

project::copy

name

no

project::export

directory

no

project::import

recipe directory

no

rc::designslabs

<configuration json> <level json>

no

report

list | run ?routine ...? | status ?job? | renderers | check ?report ?all|none|chapter ...?? | bind | print ?printer? ?file? | printers ?network?

no

sections::add

key shape ?name value ...?

no

sections::remove

key

no

settings::annex

?annex?

no

settings::defaults

?group?

no

settings::export

design|cad file

no

settings::import

design|cad file

no

settings::mine

design|cad

no

settings::reset

design|cad ?shipped|mine?

no

settings::set

path value

no

slab::category

slab ?category|default?

no

zoellner::type

n ?bx v? ?ax v? ?by v? ?ay v? ?d v? ?h1 v? ?h2 v? ?aa1 v? ?aa2 v? ?aa3 v? ?aa4 v?

no

SESSION — the application itself; cannot be undone

command

takes

undo

ask

?question?

no

blueprint

list | check ?all|none|sheet ...? | print ?printer? ?file? | status ?job?

no

building

?notice?

no

channel

?port?

no

close

?save|discard?

no

database::recording

?on|off?

no

diagrams

?off|toggle|panels|frame beam|quantity? ?quantity? ?loading? ?-along x|y? ?-beams selected|mark ...? ?-only beams|columns|slabs|pads|rafts? ?-map?

no

drain

–-

no

editlevels

–-

no

existing::schedule

?-level name?

no

form::accept

–-

no

form::cancel

–-

no

form::clear

–-

no

form::id

name ?owner? ?practice?

no

form::level

name height ?x y dx dy rotx roty?

no

form::levels

name height ?name height ...?

no

form::show

–-

no

help

?topic?

no

labels

?on|off kind ...?

no

language

?code?

no

level

level

no

licence::check

–-

no

licence::key

key

no

licence::refusal

kind count bound

no

licence::release

–-

no

licence::server

file

no

manager

?tab?

no

new

–-

no

open

project

no

panel

?name? ?listed?

no

quit

?save|discard?

no

redo

–-

no

ribbon

?tab? | -picture file ?tab?

no

save

–-

no

tab

board

no

theme

?-tokens | -picture file ?width height??

no

undo

–-

no

undo::begin

?text?

no

undo::end

–-

no

undo::rollback

–-

no

visible

?on|off kind ...?

no

window

?minimise|restore|maximise|fullscreen? | docks ?left width? ?bottom height?

no

READ — answers a question and changes nothing

command

takes

undo

database::wait

–-

—

decks::get

name

—

decks::list

–-

—

draft::clashes

–-

—

element::centre

kind label ?-level name?

—

element::count

kind ?-level name?

—

element::defaults

kind ?-level name?

—

element::fields

kind label ?-level name?

—

element::geometry

kind label ?-level name?

—

element::kinds

–-

—

element::list

kind ?-level name?

—

element::properties

?-level name?

—

element::selected

?-level name?

—

existing::check

?-level name?

—

existing::fields

column|beam|intervention

—

existing::get

member ?-level name?

—

existing::list

?-level name?

—

existing::rank

project ?project ...?

—

foundation::list

–-

—

grid::grids

–-

—

grid::list

–-

—

interchange::profiles

–-

—

levels

–-

—

levels::capacity

?level? ?-detail?

—

levels::checksync

?level ...?

—

levels::foundations

?level? ?-detail?

—

levels::mats

?level? ?-detail?

—

levels::stubs

?level? ?-detail?

—

licence::status

–-

—

measure::last

–-

—

measure::points

–-

—

orio::lines

–-

—

programs

–-

—

scene::items

x y ?within?

—

scene::labels

x y ?within?

—

scene::paints

?milliseconds?

—

sections::get

standard/family/key

—

sections::list

?standard? ?family?

—

settings::describe

path

—

settings::differs

design|cad

—

settings::find

text

—

settings::get

path

—

settings::tree

?path?

—

shortcuts

?tab? | -window

—

slab::categories

–-

—

slab::design

–-

—

status

–-

—

tabs

–-

—

usage

?command?

—

view3d::colour

kind

—

view3d::count

kind

—

zoellner::types

–-

—

3 Every command

The whole vocabulary, as registered. Each is described in the section named beside it.

Command

Arguments

Described in

   
Getting about
   

autostruct::open

project

§4

autostruct::level

level

§26

autostruct::tab

board

§4

autostruct::levels

—

§4

autostruct::tabs

—

§4

autostruct::building

?notice?

§4

autostruct::window

?minimise|restore|maximise|fullscreen? | docks ?left w? ?bottom h?

§4

autostruct::ribbon

?tab? | -picture file ?tab?

§4

autostruct::shortcuts

?tab? | -window

§4

autostruct::theme

?-tokens | -picture file ?w h??

§4

autostruct::programs

—

The programs chain

autostruct::database::wait

—

§13

autostruct::database::recording

?on|off?

§13

autostruct::settings::tree

?path?

§12

autostruct::settings::get

path

§12

autostruct::settings::set

path value

§12

autostruct::settings::describe

path

§12

autostruct::settings::find

text

§12

autostruct::settings::defaults

?group?

§12

autostruct::settings::annex

?annex?

§12

autostruct::status

—

§4

autostruct::usage

?command?

§16

autostruct::action

button

§10

autostruct::drain

—

§4

autostruct::close

?save|discard?

§4

autostruct::quit

?save|discard?

§4

   
Making a project
   

autostruct::new

—

§5

autostruct::editlevels

—

§5

autostruct::form::id

name ?owner? ?practice?

§5

autostruct::form::level

name height ?x y dx dy rotx roty?

§5

autostruct::form::levels

name height …

§5

autostruct::form::clear

—

§5

autostruct::form::show

—

§5

autostruct::form::accept

—

§5

autostruct::form::cancel

—

§5

   

autostruct::project::copy

name

§6

autostruct::project::export

directory

§6.7

autostruct::project::import

directory

§6.7

   
The building’s frame
   

autostruct::levels::fill

from to ?to …?

§6

autostruct::levels::copy

from to ?to …? ?-kinds …?

§6.2

autostruct::levels::copydrawing

from ?kind …?

§6.2

autostruct::frame::collect

?building?

§6

autostruct::frame::solve

?building? ?-model?

§6, §12.0.0.0

autostruct::frame::model

?building?

§12.0.0.0

autostruct::frame::history

?building? ?-elastic?

§12.0.0.0

autostruct::frame::push

?building?

§6

autostruct::frame::cracked

?default|off|factor|kind? ?action|factor? ?factor?

§12.0.0.0

autostruct::levels::design

?level …?

§6

autostruct::levels::checksync

?level …?

§6.3

autostruct::levels::capacity

?level? ?-detail?

§6.4

autostruct::levels::foundations

?level? ?-detail?

§6.4

autostruct::levels::stubs

?level? ?-detail?

§6.4

autostruct::levels::mats

?level? ?-detail?

§6.4

autostruct::levels::category

?level? ?category|default?

§12.0.0.0

   

autostruct::levels::materials

?level? ?{path}? ?value|default?

§12.0.0.0

   

autostruct::levels::tilt

?level? ?Gx Gy|default?

§12.0.0.0

   
Elements
   

autostruct::element::kinds

—

§17

autostruct::element::create

kind geometry…?label?

§18.1

autostruct::axisbeam

x1 y1 x2 y2 width ?label?

§18.2

autostruct::proposebeams

?width? ?depth?

§18.3

autostruct::element::count

kind

§18.4

autostruct::element::list

kind

§18.4

autostruct::element::geometry

kind label

§18.6

autostruct::element::defaults

kind

§18.6

autostruct::scene::items

x y ?within?

§7

autostruct::scene::labels

x y ?within?

§7

autostruct::scene::paints

?milliseconds?

§7

autostruct::draft::clashes

—

§8

autostruct::draft::declutter

?-ask?

§8

autostruct::camera

?reset|turn az el|zoom f|look x y z?

§19.11

autostruct::view3d::count

kind

§19.12

autostruct::view3d::colour

kind

§19.12

autostruct::element::select

kind label ?-add?

§19.4

autostruct::element::deselect

—

§19.4

autostruct::element::revert

?id?

§20

autostruct::element::fields

kind label

§19.5

autostruct::element::set

kind label field value …

§19.5

autostruct::element::opening

label ?-at -width -height ?-sill?? ?-remove n?

§19.6

autostruct::element::steel

kind label ?section? ?grade?

§19.7, §19.9

autostruct::element::steelselected

?section? ?grade?

§19.7

autostruct::element::release

kind label ?-start e? ?-end e? ?-torsion on|off?

§19.8

autostruct::element::tosteel

members family stiffness|capacity ?grade?

§19.10

autostruct::element::steelgrow

?-level name?

§19.10

autostruct::element::remove

kind label ?-id? ?-all?

§18.5

autostruct::element::removeselected

—

§19.13

autostruct::element::moveselected

dx dy

§20

autostruct::element::rotateselected

angle ?x y?

§20

autostruct::element::copyselected

dx dy ?times?

§20

autostruct::element::mirrorselected

x1 y1 x2 y2 ?-move?

§20

autostruct::element::offsetselected

distance

§20

autostruct::element::clipcopy

—

§24

autostruct::element::clipcut

—

§24

autostruct::element::clippaste

?dx dy?

§24

autostruct::element::divideselected

parts

§21

autostruct::element::zoellner

type ?label ...?

§22

autostruct::zoellner::type

n ?field value ...?

§22

autostruct::zoellner::types

—

§22

autostruct::export::pdf

?file? ?scale? ?-sheet s|-roll mm? ...

§23

autostruct::export::dxf

?file? ?-units m|mm?

§23

autostruct::export::ifc

?file?

§23

autostruct::import::dxf

propose|plan file ... ?-sheet t? ?-window ...?

§23

autostruct::import::ifc

file ?dir? ?-profile p?

§23

autostruct::interchange::profiles

—

§23

autostruct::interchange::export

profile dxf|ifc ...

§23

autostruct::blueprint

list|check|print|status

§23

autostruct::panel

?name? ?listed?

§23

autostruct::help

?topic?

§23

autostruct::ask

?question?

§23

   
The licence
   

autostruct::licence::status

—

§14

autostruct::licence::check

—

§14

autostruct::licence::key

key

§14

autostruct::licence::release

—

§14

autostruct::licence::server

file

§14

autostruct::licence::refusal

kind count bound

§14

autostruct::language

?code?

§15

   
History and saving
   

autostruct::undo

—

§27

autostruct::redo

—

§27

autostruct::undo::begin

?text?

§27

autostruct::undo::end

—

§27

autostruct::undo::rollback

—

§27

autostruct::save

—

§27

Every one of them accepts -level name, described in §26. The shorthand layer of §19 is built out of these and adds nothing the interpreter cannot already do.

4 Getting about

autostruct::open Test12       -> OK 269      ;# milliseconds 
autostruct::level Isogeio     -> OK 76 
autostruct::tab Draft         -> OK 41 
autostruct::levels            -> OK {A Orofos} Isogeio Ypogeio Themeliosi 
autostruct::tabs              -> OK Design Draft Details 3d 
autostruct::status 
  -> OK project Test12 level Isogeio board Design levels 4 
        open disabled exit enabled channel 7373 keyboard - 
autostruct::drain             -> OK 3 
autostruct::close             -> OK {closing, saving} 
autostruct::quit discard      -> OK {exiting, not saving}

tab Design answers OK when the Design board is in front, not merely its tab: a Design tab with no Design board behind it is switched to again, and if the board still does not come the answer is an error saying the application did not settle.

ribbon answers what the ribbon shows. With no argument, each tab shown with the number of its buttons and how many of them have no image; with a tab, that tab’s buttons, each with image or none. Tabs are named in English whatever the language spoken; the buttons’ text is as the window shows it. Only the buttons shown are counted: the Control tab carries the copy of the board in front. -picture saves the ribbon as a PNG, the tab named brought in front first — how the images and their lettering are looked at from a script, on any platform and with no display:

autostruct::ribbon            -> OK {File 8 3} {Edit 13 0} {View 8 0} ... 
autostruct::ribbon View       -> OK {Zoom image} {{Zoom In} image} ... 
autostruct::ribbon -picture view.png View -> OK C:/.../view.png

shortcuts answers the keys. With no argument, or with a tab, each button the ribbon shows: its tab, its text, its keys (the portable spelling, Ctrl being Command on the Mac; none is {}), whether it is enabled, its class, and whether the main window holds it — 1 means its key works whatever tab is in front. -window answers the main window’s actions that have a key: text, keys, enabled, visible, class. A key acts only through an action that is enabled and visible, so among those no key may appear twice; two would silence each other:

autostruct::shortcuts Edit  -> OK {Edit Undo Ctrl+Z 1 ...UndoAction 1} ... 
autostruct::shortcuts -window -> OK {Save {Ctrl+S, Save} 1 1 ...} ...

theme answers the window’s theme as worn: the theme the person chose (Display.theme, the settings manual’s The window’s colours), the theme worn, the application’s style, the main window’s Window, a tree’s ground (tree), the board in front’s ground, and seen, the commonest colour of that board’s outer band as painted — the canvas with its cyan surface over it, where it shows between the drawing and the edge — and row, the commonest colour of the board tabs’ row beside the tabs. -tokens lists every colour of the navy theme as {name #rrggbb}. -picture saves the main window as a PNG, at a width and height given in pixels if they are — its content, without the platform’s title bar:

autostruct::theme         -> OK chosen navy worn navy style fusion window #011b2e 
                              tree #052439 board #0a0416 seen #092231 
                              row #011b2e 
autostruct::theme -tokens -> OK {window #011b2e} {panel #052439} ... 
autostruct::theme -picture navy.png 1612 934 -> OK /.../navy.png

close shuts the project and leaves the application up, where quit shuts the application as well. Both take the same argument and answer the same way about it, and both default to saving — see §27, where the default and how to override it are set out for quit; close follows it exactly.

A project is open in one AutoStruct at a time. Opening it takes a lock, .autostruct.lock in the project’s directory, and closing it gives the lock back. A second AutoStruct asked to open the same project is refused — the window shows a message, and open answers at once rather than waiting for levels that will not come:

autostruct::open Test12 
  -> ERR Test12 is open in another AutoStruct (pid 1816660 on host)

A lock left by an AutoStruct that crashed or was killed is recognised as stale — its process is gone — and the next open takes it over.

A name the projects directory does not hold is refused at once, whether or not a project is open; any other open waits for the projects window as long as it takes to list the project:

autostruct::open Test13 
  -> ERR no project named Test13

open, level, tab and drain answer with the milliseconds they took, because every command returns only once the GUI thread has drained. The number is the work and its repaint, not the latency of dispatching it — so timing a level switch is simply calling it:

set ms [autostruct::level {A Orofos}]

With the Design board in front, level — and any command’s -level — answers only once the level is on the board: its record is read on another thread and drawn when it arrives, and a switch that answered earlier left the next command looking at an empty board.

drain does nothing but wait for that quiet, which makes it the way to time something the mouse did. Quiet includes the window’s own movement: an animation with an end still running — the scroll bars a board shows fading in — is waited for, so a board just brought to the front has stopped painting when the command answers.

levels and tabs answer with a proper TCL list rather than words joined by spaces — levels are routinely called things like A Orofos, and a caller that had to split on spaces would read that as two.

status is one line of the things a script most often needs to assert before doing anything: where it is, and whether a project is open at all.

building brings the Building tab to the front — the last of the levels’ tabs, and not a level: the whole building in 3d, every level drawn from the engine’s answer for it (designs/json/<level>.json). It reads those again and answers with what it drew, level by level, naming any level that has no answer yet (no Create Model) and any it could not read:

autostruct::building 
  -> OK {Drawn: Foundation (0 columns, 12 beams, 0 walls, 4 slabs); 
         First (9 columns, 12 beams, 0 walls, 4 slabs); ...}

Given notice it answers instead the line shown over the picture, which names only what you can act on — a level with no model yet, one that could not be read — and is empty, and hidden, when every level was drawn. building counts no columns or walls on the lowest level, whatever its drawing shows (element::count ortho counts the drawing’s): there is no storey under it for them to span. Going to the Building tab saves nothing and switches no board; coming back from it to the level that was in front is no switch at all, and going to another level is an ordinary switch. levels and status’s count do not include it, and while it is in front status says level Building board Building.

window answers the main window’s state — normal, maximised, minimised or fullscreen. Given minimise it asks the system to minimise the window, as its title bar’s button does; given restore, to give it back as it was before. Every board’s commands go on answering while the window is minimised. The system may take a moment to do what is asked (on a Mac the window first flies to the Dock), so the state answered is the state at that moment: ask again a second later to see the outcome.

autostruct::window 
  -> OK maximised 
autostruct::window minimise 
  -> OK minimised 
autostruct::window restore 
  -> OK maximised

On a Linux display with no window manager — a virtual display a script started — nothing minimises a window, and window minimise leaves it as it is.

Given maximise or fullscreen, window asks for that state and answers once the window has stopped changing size — the state, the width and the height — or, if the system has not given it within five seconds, the state as it then is. On a Mac a full-screen window moves to a space of its own.

window docks answers the width of the docks on the left (the Control Manager) and the height of those at the bottom (the Control Board), in pixels. Given left with a width or bottom with a height, or both, it sets them first; the boards take the room given up. A dock never goes below the size its content needs, so the answer is the size laid out, which may be more than asked. Before a screenshot of a board, for instance:

autostruct::window fullscreen 
  -> OK fullscreen 1728 1117 
autostruct::window docks left 260 bottom 90 
  -> OK left 260 bottom 90 
autostruct::theme -picture board.png

theme -picture with a width and a height first gives the window back its normal state; without them it pictures the window as it is.

quit takes save or discard. Without either it refuses rather than choosing for you.

A quit asked for while the application is still starting — the first line of a batch, say — waits until it has started, as open does, and then leaves; it is answered only then. A command that presses a button waits the same way, however long the start takes: on a busy machine it can take more than a few seconds, and nothing is refused for it.

5 Making a project

The new-project wizard and the levels dialog both put a levels table behind the same model, so one set of commands drives either. new opens the wizard; editlevels opens the dialog on the project already open.

autostruct::new 
autostruct::form::id Test13 {C. Korras} {Korras and Co} 
autostruct::form::levels Themeliosi 0 Ypogeio 3.2 Isogeio 6.4   -> OK 3 
autostruct::form::show     -> OK Themeliosi 0 Ypogeio 3.2 Isogeio 6.4 
autostruct::form::accept   -> OK 1840

form::level appends one row and takes an optional origin and rotation; form::levels replaces the whole table in one call; form::clear empties it. form::levels answers how many rows it made. form::show reports the table as a list of name and height in turn — the shape form::levels takes, so it can be fed back — which is what a script asserts against before accepting.

form::accept answers with the milliseconds the dialog took to do its work. form::cancel closes it and changes nothing.

6 Copying a project, and standing the building up

A Create Model computes one level. It writes that level’s storey into the building’s model, <project>/calcs/<building>.pm.N, where N is the level’s place in the building counting from one at the lowest level — the engine’s own numbering, and the reverse of the order the levels tab shows, which puts the highest level first. Nothing else happens: no other level is touched, no frame is gathered, and nothing is solved.

The frame is a separate step, and it is about the building:

autostruct::frame::collect    -> OK Test12 
autostruct::frame::solve      -> OK Test12

Neither takes a level, because there is nothing about a level for them to take. They name the project that is open, or a building given as their one optional argument, and they answer with the building they worked on.

collect gathers the frame over every storey and refuses a building with one missing. solve solves, and that is the whole of its job: it checks the building is there and that the gather left its files, applies the seismic action, and solves. It reads no level document. What it leaves behind is the answer — <building>.pm.emm, the member end actions, and .stm, .dmx, .dmy, the displacements. The stage that walks the levels turning those displacements into each level’s internal forces is a separate one, and is not part of the solve.

6.1 Filling the storeys that have not been drawn

collect refuses a building with a storey that has no model, which is what it is for. Drawing thirteen floors by hand to try one foundation is not, so one level’s storey model can be copied into another’s slot:

autostruct::levels::fill {Eighth Floor Ceiling} \ 
    {Seventh Floor Ceiling} {Sixth Floor Ceiling} {Fifth Floor Ceiling} 
  -> OK {Eighth Floor Ceiling} -> filled {{Sixth Floor Ceiling}} \ 
        skipped {{Seventh Floor Ceiling} {Fifth Floor Ceiling}}

The first argument is the level to copy from and every one after it is a level to fill, as many as the building has. It is file work and no engine runs.

It fills gaps and it never replaces. A destination that already has a storey model is skipped, and the reply says which were filled and which were passed over.

This matters because the command cannot tell a storey somebody drew from one an earlier fill left. A storey that already has a model of its own — the foundation’s, say, with a drawing to match — is never replaced in silence.

To replace a storey deliberately, this is not the command. Remove the storey’s model first, or use levels::copydrawing for the drawing half. The whole copy — both halves, per kind — is autostruct::levels::copy, below.

A call that skips everything is not a failure. It answers OK with an empty filled list, which is the ordinary answer on a building whose storeys have all been drawn.

And it is all or nothing on the names. Every destination is resolved before any is written, so a name it does not know refuses the whole call and leaves the building as it was. A destination equal to the source is refused for the same reason: it means the caller has miscounted.

The levels need not have the same layout — only the columns need to stand in the same places. What fill is for is a building whose middle storeys have never been drawn, so that collect has something to gather.

6.2 Copying a level whole, and copying part of its drawing

fill moves the model half and only into an empty slot. To copy a level as a level — both halves, so the destination needs no Create Model of its own — use copy:

autostruct::levels::copy <from> <to> ?<to> ...? ?-kinds <kind> ...?
autostruct::levels::copy {Third Floor Ceiling} {Fourth Floor Ceiling} 
  -> OK {Third Floor Ceiling} -> 
     {{Fourth Floor Ceiling made 178 removed 184 drawn yes}} saved yes

A level exists twice and a copy takes both halves: the drawing on the board and the storey model the computation works from. The drawing is read from the source’s designs/json/<level>.g.json and the elements are made on each destination; then the source’s storey files are copied into the destination’s slot. Taking one half leaves two halves that disagree with nothing to report it, and a later Create Model silently undoes it — because a Create Model regenerates the storey from a drawing the model copy never touched.

It replaces the kinds it copies. Every element of a kind being copied is removed from the destination first, so the reply counts both: made is what was laid and removed is what went. Without that a level that already had columns would end up with twice as many.

Slabs are not copied — they are derived, and the copy derives them. A slab is bounded by the members round it rather than placed, so there is no set of numbers that would create one. It does not need copying: once the columns, beams, walls and the rest are on the destination, a Create Model derives that level’s own panels from them. So the copy presses it, per level, and waits for the computation — drawn yes in the reply — and the destination ends up with the source’s slabs because it has the source’s geometry.

And it saves at the end, once, after the last destination — saved yes. A level switch writes only into <project>/tmp, and tmp goes when the application closes, so a copy that is not saved is a copy that is lost.

It is therefore not quick. Each destination costs a level switch and a whole Create Model, so a copy onto one level takes about as long as that level’s Create Model. That is the price of a destination that needs nothing done to it afterwards.

Per kind, with -kinds. Everything after -kinds is a kind and everything before it is a destination, so a level called “Walls” cannot confuse it. With no -kinds it copies every kind a level is drawn with — ortho, beam, wall, boundaryline, strip and foot — which is the whole-level case, the foundation’s own kinds included. Braces are not copied yet: a copy lays what the source level’s model holds, and a brace is not part of the model so far. Make them again on the destination with element::create brace. A copy of the beams alone leaves the destination’s columns where they are:

autostruct::levels::copy {Ground Floor Ceiling} {Mezzanine Ceiling} -kinds beam

It walks the levels, so it is not instant. Each destination is switched to, in turn, because elements are laid on a board and only the board in front has one. The level the caller was on is restored at the end. Every destination is resolved before any is touched, as in fill, so a name it does not know refuses the whole call.

One Undo per destination. The elements laid on a level go into a single macro, so a copy is taken back by one Undo however many hundred it made.

levels::copydrawing is the same drawing work aimed at the level in front rather than at named destinations, and it adds instead of replacing — it was written for a level that is missing something and must keep what it has:

autostruct::levels::copydrawing {Ground Floor Ceiling} beam 
  -> OK 62 from {Ground Floor Ceiling}

It answers how many elements it made. With no kinds it lays all seven — columns, beams, walls, edge lines, slabs, strips and footings. It touches no storey model at all, so a level built with it still needs its own Create Model.

6.3 Is the model still in step with the drawing?

A level exists twice, and the two halves are written at different moments by different things:

designs/<level> the level’s record, what a save writes
designs/json/<level>.g.json what a Create Model sends to the computation
designs/json/<level>.json the computation’s answer

Nothing reconciles them. A geometry change that was saved and not recomputed leaves the record ahead of the document — and collect, the frame, the design and every bar are then worked out from a drawing that no longer exists. Nothing reports it. The rule is therefore that every change of geometry on the Design board is followed by that level’s Create Model, which brings the model back into step with the drawing.

levels::checksync finds the change that was not followed by one:

autostruct::levels::checksync 
  -> OK checked 13 disagree 0 nodocument 0 noanswer 0 unreadable 0 
autostruct::levels::checksync 
  -> OK checked 13 disagree 1 nodocument 1 noanswer 1 unreadable 0 
     {Roof beam record 80 document 79} 
     {Fifth Floor Ceiling has no document and carries 42 ortho(s)} 
     {Third Floor Ceiling WAS SENT AND NEVER ANSWERED - the engine did not 
      write designs/json/Third Floor Ceiling.json, so its run did not finish}

Named with no level it walks every level the building has; named with levels it checks those. It leaves the caller on the level it started from. The repair is a Create Model on each level it names.

The four verdicts are kept apart on purpose, because three of them have different repairs and the fourth is not about the model at all. They are not added together:

disagree

the record and the document describe different drawings. The repair is a Create Model.

nodocument

the level was never computed — it has geometry and no .g.json at all, so it contributes nothing to the frame.

noanswer

AutoStruct sent the level and the computation never came back: a .g.json with no .json beside it. This is what a computation that stopped part way looks like.

unreadable

the checker’s own failure, not the model’s — a level switch that left no board to count. It says nothing about whether that level agrees; run the check again.

Which document a kind is compared against is not the same for all four, and the reply says document rather than sent for that reason. A Create Model takes the beams off the board and makes them again from the computation’s answer, so the board’s beams are the answer’s; it does not remake columns or walls, so theirs stay the sent document’s.

It takes some seconds over a tall building — about 17 over thirteen storeys — and holds the command line while it does. The walk switches levels one by one and keeps the application responsive between them, but no other command runs until it has finished. That is deliberate: a second command driving the levels while the walk is under way would derail it.

It compares the structure and nothing else — the columns, the beams, the walls and the boundary lines. The bars are the engineer’s to move, add to and take away on the draft, so a difference in them is not a fault and is not reported as one.

And it compares them element by element, not merely by count — because a count cannot see an element that moved. Every member on the board is joined to its twin in the document, and one the document has never seen is a disagreement. A beam moved with no Create Model behind it is named even when the counts agree.

The marks are not compared, only the members’ geometry: a Create Model renumbers the beams, so a mark that differs is not a fault.

And it needs the Design board in front, because that is the board the document is written from; it says so if it is not. The draft and the details carry copies, and a difference there is a different fault with a different repair.

6.4 What a computation made of a level

Four commands answer, each on its own, what one computation made of a level. None of them computes: each reads what the computation wrote, the level’s own documents, so it answers the same from any board and whether the level is open or not. The level is the one in front unless named; -detail lists the elements as well as counting them. A document that is not there is an error naming it — a level never designed and a level designed to nothing are different answers.

levels::capacity

EN 1998-1 5.4.2.2 and 5.4.2.3, out of membersDesign.json: how many beams and column rectangles carry a capacity shear, and in how many it governs the design shear. With -detail, each one’s V 𝐸𝑑, capacity shear and clear span or height.

levels::foundations

out of foundationsDesign.json: the footings, strips and raft panels designed.

levels::stubs

the rigid stubs Create Model delivered at the mat’s columns, rigidStubs in the level document.

levels::mats

each panel’s verdict, bearsDirectly: a mat (the grid’s) or Czerny’s.

autostruct::levels::capacity {Eighth Floor Ceiling} 
  -> OK {Eighth Floor Ceiling} {beams 80 governed 30 columns 32 governed 32} 
autostruct::levels::mats Foundation 
  -> OK Foundation {mat 5 czerny 20 unmarked 0}

6.5 Designing the levels, once the frame is solved

The solve is the building’s and ends with the displacements and the member end actions on disk. Turning those into each level’s design — the reinforced-concrete design of its members — is the stage after it:

autostruct::levels::design 
  -> OK {Ninth Floor Ceiling} {Eighth Floor Ceiling} ... 
autostruct::levels::design {Third Floor Ceiling} 
  -> OK {Third Floor Ceiling}

Named with no level it walks every level the building has, which is the ordinary case. Named with levels it walks those, in the order given. Each step reads the storey table and that storey’s model back from disk and runs the design stage only — no Create Model, so the slabs are not renumbered and nothing set on them since is undone, and no gather and no solve, because frame::collect and frame::solve have done those.

Every level is resolved before any is designed, as with fill. A level with no document, or with no design configuration — which a Create Model on that level writes — refuses the whole call by name. A building designed half one way and half the other is worse than one not designed at all, because nothing on it says which half is which.

For the same reason a level whose Eurocode design fails stops the walk. In a Create Model that failure is forgiven, the slabs keeping the engine’s own design and the log saying so; here it is a refusal, because the design is this command’s only job.

6.6 Copying the project

Trying two foundations means two buildings, and a building is a directory:

autostruct::open Test12 
autostruct::project::copy Test12b   -> OK /home/.../Test12b 36

The answer is where it went and how many files were repointed. A project holds absolute paths in its level records, so a copy made with cp or tar writes back into the original; this rewrites them. It also does the things that are about a name rather than a path, without which a copy would not open:

What is deliberately left naming the source. The logs, because falsifying one to say a run happened on a building it did not is worse than letting it read oddly; and a case document’s "level" field, which records the model base that produced it and is rewritten by the next run.

The lock file is not copied: it says which running AutoStruct holds a project, which is a claim about a process and not part of the project.

6.7 A project as a recipe

A copy moves a project within one machine. To take a project to another machine, or to keep it as text, write it as a recipe: text that holds what a person drew and set, and nothing the engine computed.

autostruct::open Test12 
autostruct::project::export /somewhere/Test12 
  -> OK levels 13 drawn 13 settings 8

The directory must be new or empty. What goes into it:

recipe.tcl            the name, owner, practice and the levels table 
levels/<level>.json   each level’s drawing: orthos, beams, walls, 
                      boundary lines, strips and foots 
settings/<file>.json  the settings a person makes

A level’s drawing is cut from the <level>.g.json its last Create Model sent, so a level never computed has none and the answer names it under undrawn. A settings file that holds this project’s own directory is named too, under carrying this machine’s path, because it would not mean the same on another machine. Everything is read before anything is written, so a refusal leaves the directory as it was.

Building a project from a recipe takes the New Project wizard, the import and a Create Model per level, so it is a sequence and not one command: make the project with the recipe’s levels, put the recipe’s files in with autostruct::project::import, reopen it, lay each level’s drawing on its Design board with levels::copydrawing, save, and press each level’s Create Model. The collect, the frame analysis and the design follow as for any building.

autostruct::project::import refuses a project that already has a computed level, so it cannot be turned on a working building. The wizard creates every project in Documents/AutoStruct and refuses a name already there, so a build never overwrites a project.

What a recipe does not carry. The slabs, which the Create Model makes again; a choice made on one slab on the board, a slab not being placed by geometry; and any hand edit on the Draft or the Details board, which lives in a binary record. Recipes are text and nothing else.

7 What the board carries at a point

autostruct::scene::items 29.25 15.8 0.15 
  -> OK {{draftitems_AnnotationPath} {28.606 5.675 30.806 16.450} {}} 
autostruct::scene::labels 29.7 16.0 1.2 
  -> OK {{QGraphicsSimpleTextItem} {29.666 15.290 29.830 15.400} {B 71}}

scene::items answers everything the board in front draws within within metres of the point — five centimetres when it is left out — topmost first. Each answer is three things: the item’s own class, its box in the plan’s coordinates as x1 y1 x2 y2, and the words it carries where it is lettering. scene::labels answers the lettering alone, which is what a check for overlapping text walks. Both work on every board and change nothing.

They exist to name what a drawing shows when the documents cannot: a line that runs into a void, a mark printed over another. The class says which part of the program drew it, and the box says how far it reaches.

autostruct::scene::paints 1500          -> OK 0

scene::paints watches the board in front for a while — a second when the time is left out, at most a minute — and answers how many times it painted itself. A board nobody touches paints nothing; a board that keeps painting keeps a processor busy for nothing. The 3d board draws no scene and is refused.

8 The Draft’s lettering apart

autostruct::draft::clashes 
  -> OK {{12Ø18+6Ø14} {35.786 -0.001 36.359 0.109} {0.15} {35.886 0.097 35.996 0.282}} ... 
autostruct::draft::declutter -ask       -> OK moved 163 before 194 after 5 
autostruct::draft::declutter            -> OK moved 163 before 194 after 5

draft::clashes answers every clash on the Draft in front. Two pieces of lettering clash when their boxes lie over each other, both ways, by more than a twentieth of the smaller one’s height: two marks set one after the other on a line touch at their edges and do not clash. A piece of lettering clashes with a bar when a bar other than its own runs through it. Each answer is four things: the lettering’s words and its box, as x1 y1 x2 y2 in the plan’s coordinates, then the other lettering’s words and box — for a bar, no words and the bar’s box.

draft::declutter moves each clashing label to the nearest place round it that clashes less. It tries rings round the label, each half the label’s height further out, sixteen directions on each, up to three heights away, and stops at the first ring holding a place clear of everything; a label with nowhere better stays where it is. Lettering over lettering costs more than a bar through it. It goes over the board up to three times, since one move can free another label’s nearest place, and answers how many labels it moved and how many clashes there were before and after. With -ask it moves nothing and answers what it would do.

All the moves are one step on the history: one Undo takes them back, and element::revert takes them back with every other change on the board. A moved label is recorded by its words and the place its drawing gave it, so it comes back moved whenever the board is drawn again — another board and back, the level reopened — until the next computation, which draws every label afresh and clears the Draft’s changes, as it does a moved bar. Only the label moves; what it names stays. Both commands are the Draft’s own: on any other board they answer invalid command name.

9 The force diagrams

autostruct::diagrams My                  -> OK plan My envelope 80 0 
autostruct::diagrams Vz G -along x       -> OK plan Vz G 41 0 
autostruct::diagrams My -beams {B 7} {B 8} 
autostruct::diagrams My -beams selected 
autostruct::diagrams frame selected      -> OK frame My envelope 5 6 
autostruct::diagrams frame {B 7} N Ex    -> OK frame N Ex 0 6 
autostruct::diagrams mx                  -> OK plan mx envelope 31 0 
autostruct::diagrams my P4 -along y      -> OK plan my P4 27 0 
autostruct::diagrams Mz Ex -only columns -> OK 3d Mz Ex 0 35 70   ;# on the 3d board 
autostruct::diagrams mx -only slabs      -> OK 3d mx envelope 31 0 62 
autostruct::diagrams p ULS               -> OK plan p ULS 140 0   ;# a level of pads 
autostruct::diagrams my ULS -only pads   -> OK 3d my ULS 70 0 70 
autostruct::diagrams my -only rafts      -> OK 3d my envelope 48 0 48   ;# a raft 
autostruct::diagrams mx max -map         -> OK map mx max 1964 0 
autostruct::diagrams panels              -> OK panels moments design 26 104 
autostruct::diagrams                     -> OK 3d Mz Ex 0 35 70 
autostruct::diagrams off                 -> OK off 
autostruct::diagrams toggle              -> OK plan My envelope 80 0

diagrams draws the members’ internal-force diagrams, on the Design board and on the 3d board. By default a diagram is the envelope, the greatest and the least over the combinations the members are designed under; a case of the frame, G, Q, Ex or Ey, draws that case alone. One scale serves the beams and one the columns, so two members of a kind compare by eye: the largest value of a kind is drawn half a mean member deep on the Design board and three quarters of one on the 3d board, the settings Display.diagramDepthOnDesignBoard and Display.diagramDepthIn3d (the settings tree’s Display group), read each time the diagrams are drawn. A member whose largest value is more than four times its kind’s median — a wall, a core — is drawn to the same depth by itself: its values are lettered, and under the common scale every other member would be drawn a centimetre deep. Each member’s extremes are lettered in kN or kNm.

While the beams’, the columns’ or the strips’ diagrams are drawn over the plan of the Design board, the slabs step aside, and their labels with them, so the diagrams lie on a clear board. The choice visible answers (§30) is not changed, and the slabs are back when the diagrams are put away. A slab’s own diagrams, the panels’ moments and a raft’s map keep the slabs, whose diagrams they are.

On a dark board — the Design board in the navy theme, and the 3d board in either — a diagram is drawn in brighter colours, with a denser fill and a heavier line, than on a light board or in a report, where the darker colours read better.

A beam has My, its bending moment, and Vz, its shear. It has no axial force of its own: the slab’s diaphragm takes it. A column has all five in its own axes, its principal ones: My and Vz bending it in the plane of its local x, Mz and Vy in the plane of its local y, and N, negative in compression.

Over the plan. On the Design board diagrams My or diagrams Vz draws each beam’s diagram along its axis. -along x keeps the beams that run nearer the x axis than the y, -along y the others; -beams keeps the beams named after it, or the selected ones. A beam drawn across several supports is as many spans of the frame and is drawn span by span.

A frame. diagrams frame followed by a beam’s mark, or by selected, draws that beam’s frame in elevation in place of the plan, as the Details board shows a beam run’s bars: the beams the frame runs on through, from joint to joint while it bends by no more than thirty degrees, developed along it at their height, and the columns standing at its joints. A beam’s sagging moment is drawn below it, on its tension side. In plan, read from below and from the right, the same holds: a beam running across has its sagging below it, one running up has it to its right, whichever way the beam was drawn. A column’s diagram is the one of its two that lies nearer the frame’s plane: asked for My, a column across the frame shows its Mz; Vz likewise brings a shear. N draws the columns’ axial forces alone. diagrams off, or plan, brings the plan back.

A foundation of strips. On a level founded on strips, each strip’s diagrams are its own: the strip solved as a beam on the ground that carries it, under the columns’ forces, not the frame’s beam on its line. Besides My and Vz a strip has w, its settlement, lettered in mm, and p, the pressure on the ground under it, in kN/m2. Its loadings are static, the permanent and imposed loads together, Q, the imposed alone where the strips were solved under it, and the earthquake’s Ex and Ey; its envelope at each point is the static value and the static plus and minus the earthquake at its worst angle, Ex2 + Ey2. A strip’s positive moment pulls its top into tension — the ground pushing up between the columns — and is drawn on the side opposite to a beam’s sagging: above it on the plan read from below, upwards on the 3d board. A strip has no frame: diagrams frame on one answers so.

Continuous slabs. A level’s slabs are computed, besides, as strips one metre wide running across them, each strip continuous over the beams it crosses, under the load patterns that give the greatest span and support moments. diagrams mx draws the moment of every strip running along x, diagrams vx its shear; my and vy the strips running along y. Each span of a strip is drawn through its slab, from the support it starts at — a beam, or the free edge of a cantilever — to the one it ends at, across the slab where the slab and both supports meet it; where a slab is crossed between two different pairs of supports, it has a strip for each. Values are per metre of width, lettered in kNm/m and kN/m, the sagging moment drawn below as a beam’s. The loadings are the patterns, P1 to P5, and the envelope over them; where several strips run through a slab between the same two supports they are drawn as one, the second’s patterns named P1.2 to P5.2. They have a scale of their own, apart from the beams’. Where the slabs are designed by Czerny’s tables, the strips are still computed and drawn, and each section of a slab is designed for the greater of the two moments.

Pads. A pad is designed each way as the cantilever from its edge to the face of the column it carries, under the greatest pressure on the ground the combination that governed it gives, taken uniform over the cantilever; the moment at the face is the one its steel is designed for. On a level of pads, diagrams mx and diagrams vx draw each pad’s two cantilevers along x, from each edge to the face, the moment rising from nought at the edge to the face’s; my and vy the two along y; p the pressure under them. Values are per metre of width, as a slab’s, and the pads have a scale of their own. Over the column the design says nothing, and nothing is drawn there. Their one loading is ULS, the design’s; the envelope is the same curve.

Rafts. A raft is solved as a grid of crossing strips on the ground, once for each combination the members are designed under, and its steel is designed for the moments per metre that grid answers. On a raft, diagrams mx draws the raft’s sections along x through its columns and the middles of its panels, diagrams my those along y, and p the pressure on the ground under them: the greatest sagging below the line and the greatest hogging above it, and the greatest and least pressure, over all the combinations. Values are per metre of width, and the raft has a scale of its own. Over a column the grid is rigid and says nothing, so a section stops at it and goes on beyond. Its loading is the envelope alone.

The raft’s maps. diagrams mx -map draws the raft’s whole field over the plan instead: each strip of the grid along x a tile coloured by its moment, white at nought, the sagging blue and the hogging red, its greatest and least lettered where they are. max draws the greatest sagging (the bottom steel), min the greatest hogging (the top steel), and envelope, the default, whichever is the larger; my the strips along y; p the pressure on the ground, max its greatest and min its least. A map is the Design board’s and covers the whole plan, so it takes no -along or -only; diagrams off takes it away.

The panels’ moments. A slab designed as a panel — spanning one way or two, between its supports — has no curve: its design gives it a moment each way in its span and one at each supported side. diagrams panels letters them over the plan where they act, in kNm per metre: each span’s at the panel’s centre, mx along x over my along y, in the sagging colour; each side’s a little inside the panel’s edge, opposite the middle of its support, negative and in the hogging colour. A nought — a free or hinged side, or a direction the panel does not span — is not lettered. The answer counts the panels lettered and their moments. It is the Design board’s and takes nothing more; the 3d board answers that the moments are on the plan. The level’s slabs must have been designed.

On the 3d board. Each member’s diagram stands in a vertical plane over its solid: a beam’s in the plane of its axis, a column’s in the plane of the quantity asked for — My one way, Mz the other. Any of the five may be asked for; a beam has only the first two. -only beams, -only columns, -only slabs or -only pads or -only rafts draws one kind, and -along keeps the beams of one direction, as on the plan. Each member’s extremes are lettered beside the curve, turned to face the camera. While diagrams are shown the members are drawn as lines on their axes, as on the Design board, and the solids are put away; diagrams off brings them back. view3d::count diagram counts what is drawn: the members’ lines, the fill and the curves.

The button. The Analysis tab’s Force Diagrams runs diagrams toggle: where diagrams are shown it takes them off; otherwise, on the Design board with a beam selected, it draws that beam’s frame, and else every member’s My, over the plan or on the 3d board.

The answer is where the diagrams are shown — plan, frame, map, panels or 3d — the quantity, the loading and the number of beams and columns drawn — on the 3d board, and the number of values lettered — or off. The diagrams are the design’s: the level’s membersDiagrams.json, which the design writes for every beam and column, designed or not, and which a report draws with the same painter (report.diagram, in the reports’ manual). Before the level’s design has run there is nothing to draw, and the command says so. They are read afresh at each call, so after a design the command shows the new diagrams. On the Draft and Details boards the command answers that the diagrams are the Design and 3d boards’.

10 Pressing a button from a script

autostruct::action Cut     -> OK 42      ;# milliseconds 
autostruct::action Mirror 
autostruct::action Nonsuch -> ERR there is no action called Nonsuch

Any button of the ribbon can be pressed from a script; pressing it this way is exactly what a click does.

Matched on the text as read, with or without its ampersand, so Cut finds &Cut. Every board carries its own copy of each Edit action and only the one in front of you is enabled, so a button that is there but greyed says so rather than pretending. Only the ribbon’s buttons are pressed: a level’s window has a menu of its own (Restore, Move, Size), and its Move is not the ribbon’s, so with nothing selected action Move answers that the button is greyed:

autostruct::action Divide  -> ERR Divide is there but disabled

A button that starts a computation is answered when the computation is over, not when the button has been pressed. Create Model answers only after its own computation has begun and then ended, so the next command of a script never lands while the level is still being computed. If the press starts no computation at all, the answer is an error that says so.

10.1 One client at a time

The command channel takes one client at a time. So a button pressed through the channel cannot use it — the script holding it is in the way, and the console answers ERR channel in use. Pressing a button with a mouse, with no script running, is unaffected.

It is worth knowing for the other direction too: while a long script runs from a file, the console in the application is locked out until it finishes.

11 The Edit buttons and the console

The Edit tab’s buttons do not do the work themselves. Each offers its command to the console, and the command does what it already does from a script:

Button Command

What happens

   
Cut cx

runs

Copy cy

runs

Paste ps

fills the command line, prints its usage

Move mv

fills the command line, prints its usage

CopyObjects cp

Array ar

Mirror mi

Offset off

Divide dv

A command that takes nothing simply runs — pre-filling cy for somebody to press Enter over would be an insult rather than a help. One that takes numbers puts itself on the command line with the cursor after it, and asks the application what it takes; the answer appears in the output panel by the ordinary route.

Nothing here knows anything about any command. The button names one, the usage comes from that command’s own registration, and the work is done by the same code a script reaches. There is no second implementation to keep in step, and a button cannot fall behind the command it names.

Undo, Redo and Delete are left alone: they have working paths of their own and do not need a command line to reach them.

11.1 Clicking the numbers instead of typing them

For the commands that name places, the pointer supplies what would otherwise be typed:

Command Clicks What they become
   
ps one point where the clipboard’s corner lands
mi two points the mirror line
mv two, from and to the displacement between them
cp two, from and to the same

Press the button, and the output panel says how many points it wants. Click them on the drawing; when the last one arrives the command line is completed and submitted, exactly as if the numbers had been typed and Enter pressed — because that is what happens.

A click that a command is waiting for does not change the selection. While picking, the selection is usually the very thing the command will act on — move what is selected, mirror what is selected — so a click that changed it would destroy the subject before the verb arrived.

Entering anything cancels the wait, including an empty line, and so does Escape. A command offered and then left alone arms the drawing to take the next click as its point — and a click meant for anything else is then spent on it, which is how an element ends up somewhere nobody asked for. The output panel says what is being waited for while the wait lasts.

off takes a click too, but the point means something else: the copy passes through it. Each element takes its own perpendicular distance from the point, so several offset together all reach it rather than all moving by whatever the first of them needed.

;# a vertical beam at x 10 
off -through 13.5 5   ;# the copy lands at x 13.5 - the y is not its business 
off 3                 ;# or simply three metres to the right

ar and dv are still typed: a count is not a thing a click can supply.

For those, the selection survives being clicked past while the command line is still being completed. Their numbers are typed, so the drawing sits there clickable, and a click on empty space would otherwise have thrown away the very elements about to be offset — leaving the command to answer that nothing was selected.

12 Settings

The project’s settings — everything the Control Manager’s Design tab shows — are reached by path: the internal names from the top of the tree down, written as a TCL list.

autostruct::settings::tree                     -> OK KtiriouConst ... Codes Slabs Actions ChernerConst Bending Concurrent Frame Shear Torsion 
autostruct::settings::tree Slabs               -> OK alternativeLoading patternMethod loadDistributionModel 
autostruct::settings::get {Slabs patternMethod} -> OK Czerny 
autostruct::settings::get {Actions categoriesOfUse E psi0} -> OK 1 
autostruct::settings::describe {Actions partialFactors gammaQ} 
  -> OK kind number label {...} min 1 max 2 step 0.05 description {...} readBy {...} 
autostruct::settings::find gamma 
  -> OK {Actions partialFactors gammaGsup} {Actions partialFactors gammaGinf} {Actions partialFactors gammaQ}

The category is always part of a path, because two categories may carry the same name; find is for when only a piece of the name or the label is known, and it answers every path that matches. The twelve categories the engine reads directly — KtiriouConst, DesignConst, NeosKanonConst and the rest — are two deep, {KtiriouConst Seismos}, and appear in the settings tree under their groups like every other; the newer ones nest as their subject does.

Setting is validated. set checks the value against what the schema says the setting is — a number within its limits, one of a choice’s values, yes or no — and refuses anything else with the reason, leaving the document as it was. It answers the value it replaced and the new one, and recompute when the setting is read by a computation, because the last Create Model no longer reflects it:

autostruct::settings::set {Slabs patternMethod} Strips     -> OK Czerny Strips recompute 
autostruct::settings::set {Slabs patternMethod} Wavelets 
  -> ERR Slabs patternMethod is one of Czerny, Strips, and Wavelets is not 
autostruct::settings::set {Actions partialFactors gammaQ} 2.5 
  -> ERR Actions partialFactors gammaQ is between 1 and 2, and 2.5 is not

A choice may be typed in any case and is stored as the schema spells it. The Control Manager’s editor goes through the same check, so the screen and the channel cannot accept different things.

One category per strength mechanism. Bending, Shear, Torsion and Concurrent hold the decisions each mechanism needs, and every one of them is a decision rather than a preference: two engineers following the same code can answer them differently and both be right, so the program must be told rather than choose.

autostruct::settings::tree Shear    -> OK strutMethod shearForStirrups cotThetaMax strutLimit roundStrutAngle strutStrength 
autostruct::settings::tree Torsion  -> OK classification compatibilityWhenFramedBothSides wallThickness minimumSteelWhenNotDesigned 
autostruct::settings::get {Shear shearForStirrups}  -> OK reduced

Four of them are worth knowing by name.

{Shear strutMethod} chooses between struts at 45° and struts as flat as the code allows. Flatter struts cross more stirrups and so need less steel, at the cost of strut capacity — on Roux’s own example the same beam wants two and a half times the steel by one method as by the other, and both answers are correct.

{Shear shearForStirrups} settles a question the textbooks disagree about. A load applied within d of a support travels straight into it and never crosses a stirrup, so the code allows the stirrups to be sized for the reduced shear; Roux’s shear chapter does that and his torsion chapter does not, and on his own example the two differ by a fifth. The reduced value is the code’s own rule and is the default.

{Shear roundStrutAngle} is off by default, and the reason is worth a sentence. The formula for the strut angle solves V 𝑅𝑑,𝑚𝑎𝑥 = V 𝐸𝑑, so a section built at exactly that angle has no margin against its struts at all and anything flatter fails outright. Hand calculation rounds the angle down before using it, which is what buys the margin — and it must be down from the angle actually computed, not from a printed one.

{Torsion classification} answers the first question torsion asks, which is whether there is anything to design at all. Where a twist cannot be shed without the structure falling down — a beam carrying a canopy — it must be reinforced for; where it is only the price of two members being built into one another — a beam a slab frames into — it falls away as the member cracks and is allowed for in what it frames into instead. Nothing in the frame document says which a member is, so {Torsion compatibilityWhenFramedBothSides} is the rule the model is read by, and the other two values of classification are for a project that would rather be told nothing.

The frame’s basic load cases. {Frame basicLoadCases} is read by the frame analysis rather than by the member design. The frame is ordinarily solved for one vertical load vector, with the permanent and the imposed load already added together; asked for the basic load cases it solves for the imposed load on its own as well, and writes <model>.frameCases.json beside the model — G and Q apart, six end actions and the case’s own load for each member. It is named after the model because every level of a project writes into the same calcs directory. It is off until it is asked for.

autostruct::settings::set {Frame basicLoadCases} true   -> OK false true

The defaults are TCL. Every category is filled from scripts shipped in share/autostruct/defaults/, one group per category and named after it, each made of nothing but autostruct::settings::set. The twelve categories the engine reads take their defaults from the engine’s own values, so the two cannot differ. A new project takes all its values from the scripts, and a project made before a category existed gets that category the first time it is opened. A category a project already has keeps every value in it; opening it only fills in a setting added to the category since the project was made — {Actions categoryOfUse} is one — at its default. defaults runs them on request: a group puts back its own category and nothing else, and with no group every category is put back.

autostruct::settings::defaults Slabs    -> OK Slabs 
autostruct::settings::defaults          -> OK Actions Codes DIN1045Const ... XylConst

The second form resets every value in the project, the engine’s twelve categories included, and nothing restores them but the project’s backup.

The national annex. The defaults are the recommended values of the Eurocodes. A national annex is another script, annex-<name>.tcl, holding only where that annex departs from them; annex chooses one, and applies again the categories it, or the annex it replaces, changes — nothing else in the project is reset. Without an argument it says which annex is chosen and which there are.

autostruct::settings::annex             -> OK recommended {recommended CY} 
autostruct::settings::annex CY          -> OK Actions 
autostruct::settings::get {Actions combination}   -> OK 6.10 
autostruct::settings::annex recommended -> OK Actions

Cyprus is the first, from the annex to EN 1990 that CYS publishes: it requires expression 6.10 and otherwise keeps the recommended values. Applying the defaults never changes which annex is chosen.

A slab’s own category of use. {Actions categoryOfUse} is the project’s — residential, A, by default — and under the combination 6.10a/b its ψ0 is what expression 6.10a takes. A slab that is something else — a storage room on a residential floor, a balcony — is given its own category, and takes that category’s ψ0 instead:

autostruct::slab::category {P 5}          -> OK A {the project’s} 
autostruct::slab::category {P 5} E        -> OK E; it reaches the design on the next Create Model 
autostruct::slab::categories              -> OK {P 5 E} 
autostruct::slab::category {P 5} default  -> OK the project’s A; it reaches the design on the next Create Model

A slab is named by its mark on the level in front, P 5 or 5, and kept by its centre of gravity, in settings/slab-categories.json: a Create Model numbers the slabs afresh, and the centre is the only name a slab keeps from one run to the next. default gives the slab back to the project’s category. The slab’s own right-click menu offers the same, under Category of Use, and runs this command. Nothing is computed by these commands; the category reaches the design on the next Create Model, which matches it to the slab whose centre is nearest, within half its shorter span. A category whose slab is gone — the drawing changed under it — names no slab, and the run says so.

A level’s own category of use. A level may be of another use than the project — shops on the ground floor of a block of flats, a plant floor, a roof of category H. EN 1990 Table A1.1 then gives it its own ψ0, ψ1 and ψ2:

autostruct::levels::category                     -> OK {Foundation A project} ... {Roof A project} 
autostruct::levels::category Roof H              -> OK H own; it reaches the design on that level’s next Create Model and the seismic mass on the next epilysi 
autostruct::levels::category Roof                -> OK H own 
autostruct::levels::category Roof default        -> OK A project; ...

Levels are named as the building names them, in calcs/json/storeys.json, and kept in settings/level-categories.json; the last one given back leaves no file. A level’s category reaches three places:

A slab’s own category, slab::category, still stands over its level’s. ψ2 has one home: {Actions categoriesOfUse <category> psi2}; SeismicMass holds only φ, EC8’s own. Nothing is computed by the command: the Create Models, the collect, the frame analysis and the design are the user’s to run.

A level’s own materials. A level may be built of another concrete or steel than the project — stronger concrete in the lower columns, another grade of steel above some floor. Its own values are laid over the project’s material paths when its configuration is written, so its design — every code’s, the path being what the setting is — takes them:

autostruct::levels::materials                                         -> OK {Foundation project} ... {Roof project} 
autostruct::levels::materials {Ground Floor Ceiling} {EC2 Concrete fck} 35 
                                     -> OK {{EC2 Concrete class} C25/30 project} {{EC2 Concrete fck} 35 own} ...; it reaches the design on that level’s next Create Model 
autostruct::levels::materials {Ground Floor Ceiling}                  -> OK {{EC2 Concrete class} C25/30 project} {{EC2 Concrete fck} 35 own} ... 
autostruct::levels::materials {Ground Floor Ceiling} {EC2 Concrete fck} default 
autostruct::levels::materials {Ground Floor Ceiling} default          -> all of them back to the project’s

The material paths are {EC2 Concrete class|fck|E|poisson}, {EC2 Reinforcement class|fyk|Es}, {ACI318 fcPrime|grade|stirrupGrade}, {IS456 fck|fy|linksFy} and the engine’s indices {NeosKanonConst NeosKan_TyposBeton|NeosKan_TyposSidiroy}; any other path is refused with the list. A class is a name, every other value a positive number. Kept in settings/level-materials.json, levels named as the building names them; the last one given back leaves no file. Nothing is computed by the command: the level’s next Create Model, and levels::design, write its configuration with them. The engine’s own frame stiffness stays the project’s: the frame is analysed with one modulus until the engine reads a storey’s own.

A level’s tilt. A level need not be level: a pitched roof, a ramp. The engine’s storey table has always carried a tilt per storey and puts a point of the storey at z = z0 + xtan⁡Gx + ytan⁡Gy, the angles in degrees; this gives a level its two:

autostruct::levels::tilt                   -> OK {Foundation 0 0} ... {Roof 0 0} 
autostruct::levels::tilt Roof 3 0          -> OK 3 0; it reaches the storey table on the next Create Model, and the frame on the triad after every level’s 
autostruct::levels::tilt Roof              -> OK 3 0 
autostruct::levels::tilt Roof default      -> OK 0 0; ...

Each angle lies between − 45∘ and 45∘. Kept in settings/level-tilts.json; a level with none sends exactly what it sent before, and the last one given back leaves no file. Nothing is computed by the command. A beam on a tilted level that does not run along a contour comes out of the frame sloping: its two ends at different heights, its members the length of the slope. Its load is per length of the slope, and only its part across the beam bends it, so its fixed-end moment is qLLh∕12, Lh its length in plan, not the level beam’s qL2∕12; its end moments are read with qL2∕12 taken off like any beam’s (The Theory, the frame’s loads). Its bars are laid along its plan, as the engine lays them, and each entry on the Details carries the angle of the spans it belongs to (go1, go2, go3, whole degrees). Like a category, a tilt wants every level’s Create Model and then the collect, the frame analysis and the design.

The earthquake’s cracked stiffness. EN 1998-1 4.3.1(7) analyses the earthquake on the cracked frame — one half of the uncracked flexural and shear stiffness — and gravity on the uncracked. The twelve factors are the settings SeismicModel, by kind (beam, column, wall) and by action (flexural, shear, axial, torsional) — or, when Codes seismic is IS 1893, TBDY or ASCE 7, the same twelve in that code’s group (IS1893, TBDY, ASCE7), which the analysis then reads instead. This reads and sets the twelve the analysis reads, in one command:

autostruct::frame::cracked                        -> OK {beam flexural 0.5 shear 0.5 axial 1 torsional 1} {column ...} {wall ...} 
autostruct::frame::cracked column                 -> OK flexural 0.5 shear 0.5 axial 1 torsional 1 
autostruct::frame::cracked column 0.7             -> OK flexural 0.7 shear 0.7 ...; the frame takes it on the next frame::solve, ... 
autostruct::frame::cracked wall flexural 0.35     -> one of the twelve 
autostruct::frame::cracked 0.6                    -> flexure and shear of every kind 
autostruct::frame::cracked default                -> the code’s own: EN 1998-1’s 0,5 and 1, IS 1893’s 0,35 and 0,70, ... 
autostruct::frame::cracked off                    -> all twelve at 1: the uncracked frame, solved once

A factor alone sets flexure and shear, the two 4.3.1(7) halves; axial and torsional are named to be moved. default puts back only the twelve; the rest of a code’s group stays. A factor is a fraction of the uncracked stiffness, above nought and at most 1. It is written to the project’s settings, as settings::set would write it, and nothing is computed: the frame takes it on the next frame::solve, and the design after it. The cracked seismic model, in the Help’s Theory, has the theory.

The frame, solved a second time. frame::solve -model solves the frame as frame::solve does and also writes down the model it solved: every node’s freedoms, weight and pile springs, every member’s section, the three load cases. frame::model then solves that model again with a second, independent solver — the one the response history is built on — and compares: the displacements of the static case and of the two seismic ones, each to one part in ten thousand, and the fundamental periods. It changes nothing.

autostruct::frame::solve -model -> OK ... 
autostruct::frame::model        -> OK agrees .stm 4.97e-05 .dmx 3.10e-05 .dmy 2.86e-05 T1x 1.36552 T1y 1.62804

The three figures after agrees are each case’s worst difference, relative; T1x and T1y the second solver’s periods nearest the frame’s. ERR differs: names what does not agree; ERR cannot measure: says what is missing — a frame solved without -model, a frame solved to second order, which a linear solve does not reproduce.

The response history. frame::history shakes the frame the last frame::solve -model wrote down through accelerograms, with a plastic hinge at each end of every member the pushover gave a yield moment (EN 1998-1 4.3.3.4.3). So the solve must have pushed: EC8 Pushover on, the yield moments from EC8 pushoverCapacities — a designed building’s from its design, an existing one’s from its record. The records are artificial, ResponseHistory records of them in each horizontal direction, generated to match the frame’s own elastic spectrum, or recorded pairs from the project’s accelerograms folder scaled to agS (ResponseHistory accelerograms); either set is checked against 3.2.3.1.2(4) before any is run — or, where the solve formed TBDY 2018’s earthquake, against its 2.5.2.1(b), each pair then run again with its two records exchanged (5.7.2.1), or where it formed ASCE 7-22’s, against 16.2.3.3 (16.2.3.2 for recorded pairs) on its MCER spectrum, the gravity 16.3.2’s D + 0.2Q, refused where a slab’s live load exceeds 4.79kN/m2 or 0.5L a quarter of D, or where it formed IS 1893’s, against 7.7.4 on 6.4.2’s spectrum at R = 1 over the range of the modes 7.7.5.2 takes, its count, floor, range and design value the project’s IS1893 history settings; recordRule names the rule held. Each analysis takes one record of each direction together, the x record along x and the y record along y (4.3.3.5.1(7)P). It writes calcs/<Building>.pm.history.json: each analysis’s peaks, the hinge ends that yielded and the largest plastic rotation, each storey’s drift (4.4.2.2(2)), and the design values of 4.3.3.4.3(3) — the mean of seven or more analyses’ peaks, otherwise the largest — which the answer names, with the damage limitation of 4.4.3.2 on the design drifts (ν and the limit from EC8 DriftReduction and EC8 DriftLimit).

autostruct::frame::solve -model    -> OK ... 
autostruct::frame::history         -> OK 3 analyses, x and y together, E_d the most unfavourable of 3: x 0.0213 m, y 0.0240 m; 21 of 408 hinge end(s) yielded, 42 of 102 members with a capacity; the largest drift over the height x 0.00439 at storey 3, y 0.00370 at storey 3; the damage limitation (4.4.3.2) nu d_r over 0.005h at most 0.439 at storey 3 in x, met 
autostruct::frame::history -elastic -> OK elastic agrees 3.1e-09

-elastic checks the road itself and writes nothing: the first pair of records with nothing able to yield, against the linear history of the same pair; the figure is their largest difference, relative. ERR says why it was not run — no model, a solve that did not push, a set of records that fails the code’s checks, a step that did not converge. Under ResponseHistory hingeRule takeda the hinges follow Takeda’s degrading rule, each with its own unloading exponent from its shear span over its depth, and the answer ends with their range and the reloading parameter:

autostruct::frame::history         -> OK 3 analyses, ...; the hinges under Takeda’s rule, alpha 0.322 to 0.584, beta 0

It refuses when the push gave no section depths (an older push: push again). The document then carries hingeRule, takedaReloading and each member’s four exponents, takedaUnloading.

Where the solve’s earthquake is a RYTEİE 2019 assessment’s (Codes assessmentCode RYTEIE19 on a high-rise building), the history is that code’s Chapter 6 and takes nothing of the push: its hinges and stiffnesses are those the assessment wrote into calcs/<Building>.pm.ryteieHinges.json, each end’s capacity on either side, its rotations 𝜃a and 𝜃p and its group, whose rule it unloads and reloads by. The set is RYTEİE’s: eleven pairs, each also run with its components exchanged (ResponseHistory bothWays true, which it refuses without and EN 1998-1 refuses with), whose mean SRSS spectrum is not under 1,3 times the elastic between 0,2T1 and 1,5T1; ResponseHistory recordScaling srssMean scales the recorded set onto that floor, and an artificial set short of it is raised to it. Each analysis then names its orientation and adds every member end’s largest chord rotation (chordRotations), every member’s largest shears (shears) and every storey’s largest drift ratio at its centre of mass (centreDriftRatios); the document’s pairs has the set’s check, its factor and the hinges document’s SHA-1 it ran on:

autostruct::frame::history         -> OK 22 analyses of recorded pairs to RYTEİE 2019 Chapter 6, each pair as given and exchanged; the set times ...

A TBDY 2018 design’s spectrum is refused: its own design by histories is not built.

Whose design was laid. A Create Model lays the Eurocode design where it has one, and the engine’s own where the Eurocode design fails, so that a level is never left without one. The two look alike on the board; design says which the level’s last run laid, from its log:

autostruct::slab::design   -> OK eurocode 44 
autostruct::slab::design   -> OK engine {the Eurocode design ended with code 1}

eurocode is followed by the number of sections the Eurocode design laid; engine by why the engine’s own design was laid instead: the Eurocode design ended with a code other than 0, or did not run.

13 The project database

Every run of the engine — each level’s Create Model, the gather, the solve, each level’s design — is written, as it ends, to <project>/database/project.sqlite, and recorded in <project>/database/journal.sqlite, refusals included. The writing is done on a thread of its own, after the run has answered, so a script that reads either file straight after a stage may read it a moment early. autostruct::database::wait waits until everything queued is written and answers the two paths:

autostruct::levels::design 
autostruct::database::wait 
  -> OK .../MyProject/database/project.sqlite .../MyProject/database/journal.sqlite

It acts on no board, so every board’s interpreter has it — a design walk ends on the Draft — and it refuses when no project is open. A level’s bars are written after its design, from the Draft and the Details once its code has detailed them, so they too are in when autostruct::database::wait answers after autostruct::levels::design. A solve’s arrays — the members’ end actions, the nodes’ displacements and reactions, the modes — and those of a pushover, a response history and a mat’s or a raft’s grid go to <project>/database/analysis.h5, written by the program’s Python a moment after the database; autostruct::database::wait waits for that file too. The database and the arrays are derived from the computation’s documents and are rebuilt by running the staging again; the journal is kept.

The codes also record what they work out, where they work it out: the quantities of a check with the clause each comes from and what each was computed from, the check’s outcome, and every step a section grew by. These go into the database with the level’s design run. autostruct::database::recording turns that off or on again for the design runs that follow, and answers how it stands; without an argument it only answers. It is on when the application starts. Recording changes no document: every design document is the same either way, which is what the switch is there to show.

autostruct::database::recording off 
  -> OK off 
autostruct::database::recording 
  -> OK off

14 The licence

AutoStruct is rented by the year. Your firm has a licence key, and each subscription it pays for gives it a number of licences, one for each computer working at the same time. A computer takes one of the firm’s licences when it checks the key and one is free, and keeps it while it goes on checking. When the firm has fewer licences than computers holding them — a subscription has ended — the computers that checked most recently keep theirs.

AutoStruct checks as it starts, every few hours while it runs, and when you save, create a model, gather or solve the frame or design, if it has not checked for an hour. It checks in the background and never holds the window. Away from the network the last check holds for two weeks, and never past the last day your firm has paid for.

Without a licence AutoStruct is read-only. You can open a project and look at it, but not save it, create a model, gather or solve the frame or design; a window says why and asks for the renewal, and so does the Licence button on the Help tab, where the key is typed and the licence checked or released. The same from the command line:

autostruct::licence::key AS-ABCD-EFGH-JKLM-NPQR 
  -> OK state licensed answer licensed firm {Example Engineering} ends 2027-10-26 seats 3 held 2 ... 
autostruct::licence::status 
autostruct::licence::check 
autostruct::licence::release 
  -> OK released 
autostruct::save 
  -> ERR Cannot save the project without a licence: Your firm’s subscription has ended. ...

autostruct::licence::status answers what is known now, as name–value pairs: state (licensed; grace, the last check holding while the licence server cannot be reached; unlicensed; or development, a build that checks no licence), answer (the licence server’s word: licensed, unknown-key, no-purchase, no-free-seat, released, unreachable or no-key), firm, ends (the last day paid for), seats and held (the firm’s licences and the computers holding them), the last four characters of the key, asked, told (how often an action was refused), whether this installation can reach a licence server at all (driver, 1 or 0), whether the licence window is open (dialog), the capacity reports below (reports, kept on this computer and not yet sent; reported, sent since AutoStruct started; reportanswer, the licence server’s word on the last one, or why it could not be reached) and the reason in words; then the build’s edition (its market), the codes it offers in the roles of Codes, comma-separated, the open project’s code (its first code by role: its concrete code wherever it has one; empty with no project open) and whether this edition holds it (codeheld, 1 or 0). A project whose code the edition does not hold is read-only, as without a licence: it is opened and read, but not saved, modelled, solved or designed. Last, packages: the packages your licence covers today, comma-separated, or every where it covers every package this edition holds. An element whose package your licence does not cover is still drawn, analysed and reported; it is not designed, and the report names the package it needs. autostruct::licence::check asks the licence server now and answers the same, once it has answered or could not be reached; ::key keeps a key on this computer and checks it; ::release gives this computer’s licence back, so that another computer of your firm can take it. autostruct::licence::server gives a build that checks no licence a licence server to test against, from a file of its connection, whose root certificate is named by a path beside the file or a whole one; an installed AutoStruct refuses it, and so does a build that cannot reach a licence server at all (driver 0).

A building larger than the frame analysis holds is reported. When gathering or solving the frame stops because the building passes one of the analysis’s limits (its nodes, its members, the members meeting at a node, or the size of its stiffness matrix), the level’s log names the limit, and AutoStruct sends the licence server which limit it was, what the building needed, the limit, and when — with the key, this computer’s code and name and the version, and nothing of the project. It is sent in the background beside the next licence check and never holds the computation; away from the network it is kept on this computer and sent with the first check that reaches the server. A build that checks no licence sends nothing. autostruct::licence::refusal reports one by hand, as the analysis would, in a build given a licence server to test against, and answers the status once it has gone or been kept:

autostruct::licence::refusal frame-nodes 15001 15000 
  -> OK state licensed ... reports 0 reported 1 reportanswer kept reason ...

The kinds are frame-nodes, frame-members, frame-ends-at-node, frame-blocks and frame-column; the licence server keeps no other (unknown-kind), none under a key it does not know, and no more than its hourly share from one computer (too-many). An installed AutoStruct reports only the analysis’s own refusals and refuses the command.

15 The language

autostruct::language 
  -> spoken en chosen en edition en available {en el} states {machine 0 reviewed 0 approved 0 untranslated 0} 
autostruct::language el 
  -> spoken en chosen el edition en available {en el} states {...}

AutoStruct speaks English unless another language is chosen. Without a code, autostruct::language says the language this run speaks, the one chosen for the next start, the languages this installation has, and how many of the spoken language’s phrases are drafts nobody has reviewed yet (machine), reviewed, approved, or not yet translated, which are shown in English. With a code it chooses that language for this computer; the program speaks it from its next start, because each window takes its words when it is made. A language this installation does not have is refused, naming those it has. With no choice made, AutoStruct speaks its edition’s language (edition), the language of the market it was made for, whatever language the computer itself speaks. While a language has unreviewed drafts, the window’s title says so beside the program’s name.

16 Asking what a command takes

usage mi 
  -> mi x1 y1 x2 y2 ?-move?     a mirrored copy about that line 
usage mirrorselected 
  -> autostruct::element::mirrorselected x1 y1 x2 y2 ?-move? ?-level name? 
usage 
  -> every shorthand, then every command underneath them

usage is the one to type. It describes the shorthands itself — they live in the same file — and falls through to autostruct::usage for everything else.

autostruct::usage answers from the registration each command was declared with, so there is no second copy of a usage line to go stale. The first thing to rot in a hand-written help table is the entry nobody looks at while changing the command it describes.

A namespace need not be typed: usage create, usage element::create and usage autostruct::element::create all find the same command.

usage nonsuch   -> ERR there is no command called nonsuch

The answer appears in the console’s output panel, being a reply like any other.

17 The element kinds

Seven kinds can be injected. Which ones a given build offers is not fixed in the command layer — ask it:

autostruct::element::kinds 
  -> beam boundaryline brace foot ortho strip wall

An ortho is a column — or one rectangle of a column — and a foot a footing; the other kinds are named as they are. The geometry differs by kind and is not interchangeable:

Kind Geometry

Meaning

ortho x y dx dy

corner and extent of a rectangle

foot x y dx dy

corner and extent of a rectangle

beam x1 y1 x2 y2 width

a guide line and its width

wall x1 y1 x2 y2 width

a guide line and its width

strip x1 y1 x2 y2 width

a guide line and its width

boundaryline x1 y1 x2 y2 ?width?

a guide line, drawn thin

brace x1 y1 x2 y2

its lower end, on the floor below, and its upper end, on this level

A boundary line is a member of the beam family rather than a bare line: it carries a width like the rest and is simply drawn thin. The width may be left out: given its two ends alone, a boundary line takes the level’s own boundary line width — the setting the mouse draws from and element::defaults boundaryline answers — and a fifth number, when given, is the width and overrides it. Only a number in the fifth place is taken for a width, so a label after the four ends is still a label.

autostruct::element::defaults boundaryline 
  -> OK 0.005 0.5 
autostruct::element::create boundaryline 1 1 3 1          ;# the setting’s width 
autostruct::element::create boundaryline 1 2 3 2 0.15     ;# 0.15 overrides it

What the line stores is a tiny width, whatever it was made with; the computation reads a boundary line’s four coordinates and never its width.

A brace has no width. It is a steel member between two points in plan, rising from the floor below to the level it is drawn on — the level it belongs to, as a column belongs to the level it holds up. Its size is its section’s (§19.9). X and chevron bracing are two braces drawn.

Slabs are not on this list, and will not be. AutoStruct generates slabs itself, from the closed perimeters formed by the other elements. Asking for one is refused, and the refusal names what is available:

autostruct::element::create slab 0 0 1 1 
  -> ERR nothing in this application makes a slab; it makes 
     beam, boundaryline, brace, foot, ortho, strip, wall

18 Command reference

18.1 autostruct::element::create

autostruct::element::create <kind> <geometry...> ?<label>? ?-level <name>?

Creates one element and answers with the label it was given. An omitted label asks for the automatic one — O 21, B 15, L 8 and so on.

autostruct::element::create ortho 1.0 1.0 0.4 0.6 
  -> OK {O 21} 
 
autostruct::element::create beam 1.0 1.0 5.0 1.0 0.25 {B 15} 
  -> OK {B 15} 
 
autostruct::element::create brace 0 0 5 3.2 
  -> OK {BR 1} 
autostruct::element::create brace 5 0 0 3.2 {BR 7} -steel EN10210/CHS/CHS168.3x8 
  -> OK {BR 7}

Refusals are specific:

autostruct::element::create beam 0 0 1 1 
  -> ERR a beam needs 5 numbers, 4 given 
autostruct::element::create beam 1 1 1 1 0.25 
  -> ERR a beam needs two different points 
autostruct::element::create strip 1 1 2 2 0 
  -> ERR a strip needs a width greater than zero

18.2 autostruct::axisbeam: a beam drawn by its axis

autostruct::axisbeam <x1> <y1> <x2> <y2> <width> ?<label>? ?-<field> <value> ...? ?-level <name>?

A beam’s line is one of its two long edges, not its axis. That is how an engineer draws one — along a face, through the fixed points — and it is what element::create beam and the mouse both take. So a beam drawn through two columns’ centres does not run through them: its body lies half a width to one side, and the side is the drawing’s convention. A beam within 45 degrees of the x axis, 45 included, is horizontal, and its body lies above its line; any other is vertical, and its body lies to the left.

axisbeam takes the line the beam’s axis is to follow — two columns’ centres, typically — and lays the beam so that its axis is that line. The beam it makes is an ordinary one: the stored line is still an edge, in the order a person draws it (left to right, or bottom to top), and the body lies where a drawn beam’s would. Only where the edge is put differs.

autostruct::axisbeam 0 0 5 0 0.25            ;# the axis on y = 0 
  -> OK {B 1} 
autostruct::element::fields beam {B 1} 
  -> OK ... x1 0 x2 5 y1 -0.125 y2 -0.125 b 0.25 b0 -0.25 ... 
autostruct::axisbeam 10 6 10 0 0.40 -d0 0.6  ;# either direction; a field after a dash 
  -> OK {B 2}

Everything after the geometry is element::create’s: a label, then fields after a dash. The beam is made and then moved half its width across, by the b0 it carries, and the two are one undo entry. centrebeams run over beams laid this way finds nothing to move: it applies the same rule to beams already drawn, where this draws new ones and leaves the commands an engineer draws with as they are. It is the design board’s command, and its refusals are element::create’s.

A steel beam is laid the same way, with element::create’s -steel <section|default> and -grade <grade>: the beam is given its section first and then put on its axis, so the axis line is the section’s own centre line — a section changes the width the beam carries, and given after the move it would leave the axis half that change off the line. Both are one undo entry, and a section or grade that is refused leaves no beam at all; -grade without -steel is refused.

autostruct::axisbeam 0 6 5 6 0.25 -steel default -grade EN10025-2/S355 
  -> OK {B 3}

18.3 autostruct::proposebeams: the beams a flat slab’s columns want

autostruct::proposebeams ?<width>? ?<depth>? ?-level <name>?

Under a flat slab the beams are the engineer’s to draw, no deeper than the slab, and they decide where the frame joins the floor: a column that no beam reaches is not joined to the floor at that level at all. The Create Model refuses such a level, and names each column, before it writes the storey model:

autostruct::engine::div1 First 
  -> ERR ... 
# the level’s log: 
the Create Model is refused: 1 column(s) of storey 2 stand under a flat slab 
with no beam reaching them, so the frame would not join them at this level - 
draw a beam to each, no deeper than the slab: the column at 5.00 6.00

A column is asked about when it lies on a panel that bears directly, or within the column reach of one; a column only Czerny’s panels touch is never asked, its beams being stiff supports, and nor is the foundation, where a column stands on its footing or the raft. A beam reaches a column when one of its ends is that column, which is what the frame joins by.

proposebeams draws what a regular plan makes obvious: a beam on its axis between every two neighbouring columns on a line parallel to x or y, where no beam runs already. Two columns are on one line when each one’s centre lies within the other’s extent across it, and neighbours when no other column on that line stands between them. The width and the depth default to the project’s DesignConst.PlatosDokou and DesignConst.FatnPahos, so a proposed beam is as deep as the slab.

autostruct::proposebeams 
  -> OK 4 made, 8 already there: {B 9} {B 10} {B 11} {B 12} 
autostruct::proposebeams 0.30 0.25 
  -> OK 0 made, 12 already there

It proposes; the engineer decides. Every beam is an ordinary one, to keep, move or delete, and all of them are one undo entry, so one Undo takes the proposal back whole. A line at an angle, or a column off every line, is left to the engineer — and the Create Model’s refusal is what says one was missed. It is the design board’s command.

18.4 autostruct::element::count and ::list

autostruct::element::count <kind> ?-level <name>? 
autostruct::element::list  <kind> ?-level <name>?

count answers with a number, list with the labels as a proper TCL list — so a label containing a space survives being read back:

autostruct::element::list boundaryline 
  -> OK {L 1} {L 2} {L 3} {L 4} {L 5} {L 6} 
 
foreach l [autostruct::element::list ortho] { ... }

18.5 autostruct::element::remove

Since a mark can be shared — see §25 — remove takes two further options:

autostruct::element::remove <kind> <label> ?-id <prefix>? ?-all? ?-level <name>?
autostruct::element::remove <kind> <label> ?-level <name>?

Removes the element carrying that label and answers with the elapsed milliseconds. Pass whatever list reported — the two agree.

autostruct::element::remove boundaryline {L 6} 
  -> OK 24 
autostruct::element::remove boundaryline {L 99} 
  -> ERR no boundary line labelled L 99

18.6 autostruct::element::geometry and ::defaults

autostruct::element::geometry <kind> <label> ?-level <name>? 
autostruct::element::defaults <kind> ?-level <name>?

geometry answers where an element sits, as the numbers create would take to make it again. defaults answers the dimensions the project’s settings give that kind — the same settings the interactive tools draw from, so a scripted element and a hand drawn one come out alike.

Both answer with a genuine TCL list, so lassign reads the numbers straight out.

autostruct::element::geometry ortho {O 6} 
  -> OK 5 5 0.5 0.5 
autostruct::element::defaults ortho 
  -> OK 0.25 0.5 
 
lassign [autostruct::element::geometry ortho {O 6}] x y dx dy

A brace’s geometry is its two ends, x1 y1 x2 y2. A brace has no dimensions of its own, so defaults brace answers what a new one is made of instead: the section and the grade, Steel.braceSection and Steel.grade.

autostruct::element::geometry brace {BR 1} 
  -> OK 0 0 5 3.2 
autostruct::element::defaults brace 
  -> OK EN10210/CHS/CHS139.7x6.3 EN10025-2/S355

18.7 autostruct::element::centre

autostruct::element::centre <kind> <label> ?-level <name>? 
 
autostruct::element::centre ortho {O 20} 
  -> OK 15.8 0.75

A geometry answers a CORNER and two extents, not a centre, and that is a convention a reader has to know before any of the four numbers means anything. So the middle of something is arithmetic on the answer, and centre does the arithmetic.

The corner is a number that moves. Neighbouring pads share edges, so a pad that goes changes the size, and so the corner, of the ones beside it; their centres hold. A script that means to find a pad again should hold on to its centre.

It is narrow on purpose. Only the kinds whose geometry really is a corner and two extents — columns and footings, the pair geometry puts together — are answered. Anything else is refused, and says so:

autostruct::element::centre beam {B 1} 
  -> ERR a centre is only answered for a kind placed as a box - ortho 
     and foot - because those are the geometries that are a corner and 
     two extents. beam’s numbers mean something else.

A beam answers four numbers too, and they are two points. Halving them would give something plausible and wrong, which is the same shape of trap as b0’s sign — a printed number meaning nothing until you know which convention produced it.

19 Shorthand for the console

The commands above are deliberately plain: one element at a time, one thing each. That is what a file of them wants to be. It is not what typing at a prompt wants to be, so a layer of shorthand sits on top — ordinary TCL, carried by the program and defined in every board’s interpreter from the moment it starts, adding no capability that the commands below it do not already have. There is nothing to load:

goc b ba bl wa sa -o -b -bl -w -f -s ...

Every one of them acts on the level in view. Switch first, with autostruct::level.

19.1 A startup file of your own

AutoStruct also reads a startup script when its interpreters come up: whatever AUTOSTRUCT_TCL_INIT names, or ~/.autostruct.tcl when it exists. It is the place for procedures of your own; it is read after the shorthand, so it may redefine any of it. Keep it to procedures and source: it is read by all four interpreters, so a command in it would run four times.

A mistake in the startup file is reported and survived rather than fatal — otherwise there would be no console left to fix it from.

19.2 Making elements

Command

Reads

goc x y …

pairs, a column at each corner given

b n m …

pairs of column numbers, a beam joining each

w n …

a wall along each beam named

ba x1 y1 x2 y2 …

fours, a beam from one point to the next

bl …

the same, as boundary lines

wa …

the same, as walls

sa …

the same, as strips

Dimensions come from the project settings, by way of element::defaults. Each command carries a fallback for a project too old to hold them — 0.5 × 0.5 for a column, 0.2 wide for a beam — but the settings win whenever they can be read.

goc 0 0 5 0 10 0 15 0 0 5 5 5 10 5 15 5 
  -> OK O 1, O 2, O 3, O 4, O 5, O 6, O 7, O 8 
 
b 1 5 2 6 3 7 4 8 
  -> OK B 1  0.25x0.5, B 2  0.25x0.5, B 3  0.25x0.5, B 4  0.25x0.5 
 
ba 0 0 15 0 
  -> OK B 5  0.25x0.5

b asks each column where it is rather than remembering it from whatever drew it, so it works just as well on a drawing opened from disk — which is the case that matters, because the numbers are read off the labels on the screen.

w asks each beam where it is, so a wall follows the beam as it stands on the drawing. Every beam is looked up before any wall is made, so a wrong number stops the lot rather than leaving half a storey built. The wall takes its own width from the settings, not the beam’s — they are different things that happen to share a line.

b 1 5 2 6 3 7 4 8 
  -> OK B 1  0.25x0.5, B 2  0.25x0.5, B 3  0.25x0.5, B 4  0.25x0.5 
w 1 3 
  -> OK W 1  0.25x0.5, W 2  0.25x0.5

19.3 Removing elements

-o 1 3 5        -b ...      -bl ... 
-w ...          -f ...      -s ...

Columns, beams, boundary lines, walls, footings and strips, by number — or by range, mixed freely with numbers.

-o 1-6 
  -> OK removed 5: O 1, O 2, O 3, O 5, O 6 
-o 2-3 6 
  -> OK removed 3: O 2, O 3, O 6

A range and a number are not treated alike when nothing carries the number. A range is a sweep, so a gap inside it is passed over — marks are allocated as the highest in use plus one, so a removal leaves its number behind and any useful range will straddle gaps. A bare number is a request, and a mistake worth reporting.

-o 4      -> ERR there is no ortho numbered 4 on this level 
-o 6-2    -> ERR the range 6-2 runs backwards 
-o 8-9    -> ERR no ortho on this level carries any of those numbers
-o 9 11 
  -> OK removed 2: O 9, O 11 
-b 7 8 
  -> OK removed 2: B 7  0.25x0.5, B 8  0.25x0.5 
-o 99 
  -> ERR there is no ortho numbered 99 on this level

The number is read out of each label rather than glued onto a prefix, because a label is not always the two words it looks like: a beam lists as B 7 0.25x0.5, section and all, and that whole string is what remove wants. Every number is resolved to a label before anything is removed, so one wrong number stops the lot instead of taking half of them first.

19.4 Opening an element’s properties

?o 3            ?b ...      ?bl ... 
?w ...          ?f ...      ?s ...

Selects the element and opens its properties on the left of the window: the tree of its fields, with the editable ones editable and the computed ones not. Exactly what clicking the element opens, because it is the same thing — selecting is all these commands do, and the panel watches the scene’s selection. A script and a mouse arrive by the same door, so there is no second path to keep in step with the first.

It answers with the line that would set the element’s fields as they are — one per element, ready to edit and submit:

?o 3    -> mo 3 -x 10 -y 0 -dx 0.5 -dy 0.5 -orientation 0 ; 
?o 3-5  -> mo 3 -x 10 -y 0 -dx 0.5 -dy 0.5 -orientation 0 ; 
           mo 4 -x 15 -y 0 -dx 0.5 -dy 0.5 -orientation 0 ; 
           mo 5 -x 0 -y 4.95 -dx 0.5 -dy 0.25 -orientation 0 ;

Named rather than positional, because a named line says what each number is and cannot be broken by miscounting; positional input still works, and is quicker once the order is familiar.

The trailing semicolons matter. The console joins a pasted block into a single line, so they are what let a screenful of these be edited and pasted back in one go.

A range prints every line at once rather than stepping through them one at a time. There is no prompt state to be in, nothing half applied to abandon, and it agrees with the tree in the Control Manager, which shows all of them at once as well.

Several numbers select several, and ranges work as they do for removal (section 19.3). The first replaces whatever was selected and the rest join it, so one command reads as one selection rather than as a sequence that happens to end in the right place.

?o 3 5 7  -> OK selected 3: O 3, O 5, O 7 
?o 1-6    -> OK selected 5: O 1, O 2, O 3, O 5, O 6

The primitive underneath is autostruct::element::select:

autostruct::element::select ortho {O 3} 
autostruct::element::select beam {B 1  0.25x0.5} -add

Slabs are selectable too, and are the one kind nothing draws. They are found by the engine on a Create Model, so there is no drawing tool to ask — which is how every other kind is reached — and the board is walked for them instead. The mark is the slab’s number:

autostruct::element::select slab 3 
autostruct::element::select slab 7 -add 
zo 1   -> OK 3 7

which is what clicking two slabs and pressing Draw Zoellner does, in the words the button would have written.

-add keeps what is already selected. It is the only way to build a selection that spans kinds, because each of these commands knows about one kind and nothing else:

?o 3 5 
?b 1 -add 
  -> two orthos and a beam, held together

Every number is resolved to a label before anything is selected, so one wrong number leaves the selection alone rather than replacing it with half of what was asked for.

?o 99     -> ERR there is no ortho numbered 99 on this level 
?o x      -> ERR "x" is neither a number nor a range like 1-6

A shared mark is refused for the same reason remove refuses it (section 25), and for one more: the panel that opens is the one that edits, and editing the wrong element is no better than removing it.

What is selected can be asked for, which matters as soon as a press rather than a name does the selecting — a press that took the wrong thing reads exactly like one that took the right thing until you ask:

autostruct::element::selected   -> {ortho O 3} 
                                -> {slab.bar 97ce23a7-9355-43e5-...}

One line per selected element, its kind and its mark.

And what the properties panel would show of it. The panel is built from one document of the selection, grouped by category; this reads that document back, a line per category with the marks in it:

autostruct::element::properties  -> {braces BR 1} {beams B 9}

A category the panel does not carry is absent here, which is how the panel’s coverage of a kind is tested. Boards with no properties panel answer nothing.

Selecting nothing is its own command. Every form above needs something to select, so a selection can be replaced but never emptied:

?none     -> let go 
autostruct::element::deselect

It closes the properties panel with it, which came up with the selection and describes nothing without one. Worth issuing before a screenshot or an export: a selection is drawn selected, and a highlighted reinforcement bar in a drawing of hairlines has been read as a fault in the drawing more than once.

19.5 Changing an element’s fields

mo 3 -dy 0.75                 mb ...  mbl ...  mw ... 
mo 3 12.0 1.0 0.6 0.6 0.0     ms ...  mf ...   mstr ...

Columns, beams, boundary lines, walls, slabs, footings and strips. The first argument says which element, or which range of them; everything after it is the change.

By name sets those fields and leaves the rest alone, which is what most edits are:

mo 3 -dy 0.75          -> OK changed 1: O 3 
mo 3-5 -dx 0.4         -> OK changed 3: O 3, O 4, O 5

By position sets every field, in the order element::fields reports:

mo 3 12.0 1.0 0.6 0.6 0.0    -> OK changed 1: O 3

That order is asked of the application rather than written down in the shorthand, so the line printed and the line accepted cannot drift apart. Ask for it by giving no values at all:

mo 3   -> mo 3 -x 10 -y 0 -dx 0.5 -dy 0.5 -orientation 0 ;

which is the same line ?o 3 answers with — see §19.4.

A flag reads 1 or 0, true or false, and is set back with either form (1, 0, true, false); a number, as everywhere, reads as a number and a name as a name.

A range or a list of fields is one entry on the history, so one Undo takes back the whole line rather than its last word.

19.5.1 What is editable, and what a field is called

The same rule the properties panel applies: every field of the element except its identity and anything the computation worked out.

A field is named by its leaf name where that is enough. Where it is not, it is named by its full path, and a bare name that could mean two things is refused rather than guessed at:

mb 1 -diameter 8 
  -> ERR diameter could mean 
        supportRole/compressionBarsOfReinforcement/diameter or 
        supportRole/tensionBarsOfReinforcement/diameter; say which 
mo 3 -nosuch 1 
  -> ERR a ortho has no editable field nosuch; 
        it has x, y, dx, dy, orientation 
mo 3 1 2 
  -> ERR a ortho takes 5 values in the order x y dx dy orientation; 2 given
19.5.2 The primitives
autostruct::element::fields ortho {O 3} 
  -> OK x 10 y 0 dx 0.5 dy 0.5 orientation 0 
autostruct::element::set ortho {O 3} x 12.0 dy 0.75 
  -> OK {O 3}

A field that is a yes-or-no flag reads 1 or 0, and set takes 1, 0, true or false for it. set takes any number of field and value pairs and applies them as one step. Every name is resolved and every value applied to a copy before the element is touched, so a mistake in the fourth of five fields leaves the element as it was rather than half changed.

The change reaches the drawing exactly as a field typed into the properties panel does, so a field set from a script goes onto the same history and is undone the same way.

A slab’s own type, thickness and loads outlive the Create Model. A Create Model takes every slab off and makes them afresh, so a value held only by the slab would die with it. Four fields are therefore also kept, per level, by the slab’s centre of gravity, in settings/slab-properties.json: useType (0 a void, 1 solid, 2 and 3 a slab carried one way along x or y, which is how a stair is made; a ribbed type is zoellner’s, §22), d, gEpikl (the finishes, kN/m2) and q (the imposed load). Every Create Model sends them and the engine sets each on the panel its centre lies in. The own weight, g, is not kept: the engine works it out from d.

autostruct::element::set slab {P 5} useType 3 d 0.15 gEpikl 2.5 q 3.5 
autostruct::element::set slab {P 9} useType 0 
autostruct::level Ground 
autostruct::action {Create Model}    ;# P 5 a stair, P 9 a void

19.6 A hole in a wall

A wall’s holes — a window, a door, a duct — belong to the wall, as its size does: they move, copy and are removed with it, and one Undo takes back each change. element::opening lists a wall’s holes, adds one, or takes one away:

autostruct::element::opening {O 25}                    ;# its holes 
autostruct::element::opening {O 25} -at 1.0 -width 0.9 -height 2.1 
autostruct::element::opening {O 25} -at 3.0 -width 1.2 -height 1.1 -sill 0.95 
autostruct::element::opening {O 25} -remove 2          ;# the second away

A hole runs through the wall’s thickness, along its long side — the longer of the rectangle’s two sides, whichever way the wall is drawn. In metres: -at is the distance from the corner the wall is stored by (the first corner it was drawn from) to the hole’s near edge, -width its length along the wall, -height its height, and -sill the height of its underside above the storey’s floor, nought when it is not given, which is a door. The answer is the wall’s holes after the change, numbered from 1:

-> OK {O 25} {1 at 1 width 0.9 height 2.1 sill 0} {2 at 3 width 1.2 height 1.1 sill 0.95}

A hole is refused when it runs past the end of the wall, overlaps another of its holes, or is asked of a round, a square or a steel column, none of which is a wall with a side to run along; two holes may share an edge. Each hole’s numbers are fields of the wall as well, so element::set changes one (§19.5), the first hole being openings/0:

autostruct::element::set ortho {O 25} openings/1/width 1.5

On the Design board a hole is drawn as its band of the wall, cut back and crossed, whatever its sill: the plan shows every hole of the storey.

A hole reaches the computation at the level’s Create Model, like any change of the drawing. The frame is analysed without it; once the walls’ bars are laid, each hole is designed to the project’s codes — the steel it cuts put back round it, the bars its code asks for — and the level’s log says, for each, what was laid or why it was not: a hole through a wall’s end zone, one above the storey, and one larger than its code lets the frame leave out are refused. On the Draft the plan draws each hole’s band as the Design board does, and the wall’s detail says under its bars, hole by hole, the bars on each side and above and below, or that the hole was refused. The Details list a designed hole’s bars in its wall’s schedule, HOLE 1 SIDES, ABOVE AND BELOW and HOOPS, each with its length. detailing-theory, A hole in a wall, has each code’s rule.

A door cuts its wall. A hole whose sill is nought is a door, and a door is not left out of the frame: at the Create Model the wall is given to the frame as its piers, the lengths of wall either side of each door, named after it (O 25.1, O 25.2), each a wall or a column by its code’s ratio of length to thickness, and over each door a beam from pier to pier, the wall’s thickness wide and as deep as the storey above the door’s head. The level’s log says it:

O 25 is cut at its door(s) into piers O 25.1 3.00x0.30, 10.0 to 1; O 25.2 4.00x0.30, 13.3 to 1 - each a wall or a column by its code’s ratio of length to thickness 
O 25’s door 1: a beam over it 0.30 x 0.90 m, clear span 0.80 m, the coupling beam its code designs

The beam over the door appears on the board after the Create Model like any beam the frame was given, and is designed as a coupling beam — diagonal bars where its code asks for them. The wall and its door stay as drawn, and a project exported carries the wall with its door and no beam. frame-model-theory, A wall cut at its doors, has the whole of it.

A window past its limits cuts its wall too. A window — a hole with a sill — within its code’s limits stays a hole in the wall, as above. One past them, wider or taller than the code lets the frame leave out, cuts the wall at the Create Model as a door does: the wall goes to the frame as its piers, a beam over the window from its head to the storey’s top, and under it the spandrel, the wall below the sill. A window in a wall a door has cut is measured in the pier it stands in, and the windows left by a cut are measured again in the piers it leaves. The log says why, and what was made:

O 25: the window at 3.000 m cuts the wall: EN 1998-1 ... no wider than 1.560 m; it is 2.000 m 
O 25 is cut at its opening(s) into piers O 25.1 3.00x0.30, 10.0 to 1; O 25.2 2.80x0.30, 9.3 to 1 
O 25’s sill 1: the wall under the window, 0.30 x 0.90 m, clear span 2.00 m, joins its piers at the sill

The frame gives each pier a node at the sill’s height, so a pier is two members in its storey, one under the sill and one over it, and the spandrel joins the two piers’ sill nodes. By default the spandrel is a deep beam of its own section, the wall’s thickness by the sill; with Frame.wallSpandrel set to braces it is an X of two diagonals, each from one pier at the sill to the foot of the other, as stiff in shear as the panel they stand for (the-settings-tree). Each pier is designed once, for the worst of what its two members carry, its slenderness over its whole height. The drawing keeps its wall and its window. frame-model-theory, A wall cut at its window, has the whole of it.

19.7 A column or a beam of steel

A steel member is the ordinary column or beam with a section and a grade: there is no steel kind of element, and a member is steel exactly when its section is not empty. Both are named by their paths, the ones sections::list answers (the-settings-tree, Steel sections):

autostruct::element::steel ortho {O 3} 
  -> OK {{ortho O 3} concrete} 
autostruct::element::steel ortho {O 3} EN10365/HE/HE300B 
  -> OK {{ortho O 3} EN10365/HE/HE300B EN10025-2/S355} 
autostruct::element::steel beam {B 1} AISC/W/W14X90 ASTMA992/Grade50 
autostruct::element::steel beam {B 1} default     ;# Steel.beamSection 
autostruct::element::steel beam {B 1} concrete 
 
autostruct::element::select ortho {O 3} 
autostruct::element::steelselected default        ;# each its kind’s default

On the 3d board a steel column is its section stood through the storey: the same outline, triangulated with its holes so a tube stays open, extruded from the floor below to the level, on the column’s centre and turned with it; a steel beam is its section swept along its line. The Draft and the Details boards draw a steel member as itself, with no bars.

19.8 An end released: a hinge you place

autostruct::element::release beam {B 4} -start y 
  -> OK {B 4} start y end none torsion off 
autostruct::element::release beam {B 4} -end yz -torsion on 
  -> OK {B 4} start y end yz torsion on 
autostruct::element::release ortho {O 7} -end y 
autostruct::element::release beam {B 4} 
  -> OK {B 4} start y end yz torsion on 
autostruct::element::release beam {B 4} -start none -end none -torsion off

A column or a beam, concrete or steel, can have the moment at either end released — a hinge placed where the frame would otherwise hold the member fast — and its torsion released.

19.9 A steel brace

autostruct::element::create brace <x1> <y1> <x2> <y2> ?<label>? ?-steel <section>|default? ?-grade <grade>?

A brace is a steel member of its own kind: two points in plan, x1 y1 its lower end, on the floor below, and x2 y2 its upper end, on the level it is drawn on. It belongs to that level. X bracing and chevron bracing are two braces each. The ends are kept exactly as given — nothing moves an end onto a column — and the only refusal is two ends at one point in plan.

autostruct::element::create brace 0 0 5 3.2          ;# Steel.braceSection 
  -> OK {BR 1} 
autostruct::element::create brace 5 0 0 3.2 -steel EN10210/RHS/RHS200x100x8 
  -> OK {BR 2} 
autostruct::element::steel brace {BR 1} 
  -> OK {{brace BR 1} EN10210/CHS/CHS139.7x6.3 EN10025-2/S355} 
autostruct::element::steel brace {BR 1} EN10210/CHS/CHS168.3x8 EN10025-2/S275 
autostruct::element::fields brace {BR 1} 
  -> OK x1 0 x2 5 y1 0 y2 3.2 grade EN10025-2/S275 section EN10210/CHS/CHS168.3x8 
autostruct::element::steel brace {BR 1} default    ;# Steel.braceSection, its own grade 
autostruct::element::set brace {BR 1} x2 4.8 y2 3.0 
autostruct::element::remove brace {BR 1}

19.10 Concrete to steel: a family’s section, chosen

element::tosteel makes concrete members steel with the LIGHTEST section of a family — by its mass — that will do, and says for each which one and why:

autostruct::element::tosteel beam {B 1} EN10365/IPE stiffness 
  -> OK {{1 made steel, 0 left concrete, by stiffness} 
        {{beam B 1} EN10365/IPE/IPEA600 EN10025-2/S355 - EN10365/IPE/IPEA600: 
         E I 1.23 times the frame line’s}} 
autostruct::element::tosteel ortho {O 3} EN10365/HE capacity 
  -> OK {{1 made steel, 0 left concrete, by capacity} 
        {{ortho O 3} EN10365/HE/HE320A EN10025-2/S355 - EN10365/HE/HE320A: 
         0.95 of its resistance by EN 1993-1-1 - 6.3.3 bending and axial 
         compression (6.62), under G + 0.3Q +1.0Ex +0.3Ey}} 
autostruct::element::tosteel selected EN10365/HEA capacity 
autostruct::element::tosteel columns EN10365/HE stiffness    ;# every column of the level 
autostruct::element::tosteel members AISC/W capacity         ;# every column and beam

A failing member grows. When the steel design finds a member short, it tries the heavier sections of the member’s own family and grade, lightest first, against the same lines of the frame and the same combinations - the frame’s forces held, as a concrete section grows - and takes the first that is sufficient: the level log says FAILS …; grows to IPEA200, 1.00 of its resistance, steelDesign.json records it as grownTo, and EN 1998-1’s, ACI 318’s and IS 13920’s joints sum the grown section’s moment. Where the family runs out it says so. The family’s sections come from <level>.steelFamilies.json, which a Create Model writes beside the drawing.

autostruct::element::steelgrow 
  -> OK {{1 member(s) grown on Eighth Floor Ceiling - the frame describes 
        them no longer; the staging is what tells} 
        {{beam B 1} EN10365/IPE/IPEA200 EN10025-2/S355}}

element::steelgrow writes the grown sections onto the level’s members by element::steel’s own road, one Undo each; a drawn beam that crosses several spans takes the heaviest of theirs. The frame then no longer describes the level, so the staging follows.

19.11 The 3d board’s camera

The 3d board is not a drawing board, so the mouse commands do not reach it; this is what a script looks round it with.

autostruct::camera                       ;# where it is 
  -> OK {at {12.725 3.400 134.842} looking at {12.725 3.400 9.070}} 
autostruct::camera look 12.05 6.7 26     ;# a focal point, in metres 
autostruct::camera turn 0 -80            ;# elevation: down to the side 
autostruct::camera turn 30 0             ;# then azimuth: round the point 
autostruct::camera zoom 10 
autostruct::camera reset                 ;# from above, everything in view

turn applies the azimuth before the elevation, so from the view from above — where the board opens — tilt first and orbit second, as two turns. With the Building tab in front, the camera is that view’s, with the same words: the whole building, looked round from a script as the 3d board’s one level is. On any other board it is refused.

19.12 What the 3d board has drawn

The 3d board’s solids are not elements of a scene, so element::count and scene::items do not see them. This asks the board how many solids of a kind it has built and holds now.

autostruct::view3d::count brace      -> OK 2 
autostruct::view3d::count column     -> OK 42 
autostruct::view3d::count axes       -> OK 1 1.00 
autostruct::view3d::count wall 
  -> ERR wall is not a kind the 3d draws: ortho (or column), beam, 
         boundaryline, slab, foot, strip, brace, diagram or axes

The kinds are ortho (or column), beam, boundaryline, slab, foot, strip and brace, and diagram for the force diagrams (§9). A column, a beam, a brace, a boundary line, a strip and a slab are one solid each — a slab stood up from its outline as the Design board fills it, so the 3d shows as many slabs as that board — a sloped pad is two, and the force diagrams as three, the members’ lines, their fill and their curves. What is counted is what is shown: while the force diagrams are drawn the solids are put away, and a column counts nought, as a kind hidden by visible does. axes counts the small x, y and z arrows at the origin and gives their length in metres. With the Building tab in front it counts that view’s columns, beams, walls and slabs over every level, nought for a kind hidden. On any other board it is refused.

A brace is drawn as its steel section swept along its own line, from its lower end on the floor below to its upper end on this level, in orange. A level with no floor below draws no brace, as it draws no column. The 3d board shows what its level carried when it was last rebuilt from the Design board, which a computation marks it for; a brace drawn since then appears after the level’s next Create Model.

autostruct::view3d::colour slab      -> OK #30ffffff 
autostruct::view3d::colour beam      -> OK #3fc8c8 
autostruct::view3d::colour ground    -> OK #092231

view3d::colour answers the colours the solids of a kind are drawn in, each once, as the renderer holds them before its light; ground is the colour the solids stand on. A colour is given as #rrggbb for an opaque solid and #aarrggbb for a translucent one. Under the Navy theme the 3d draws each solid with the transparency the plan gives it: a slab, a fifth of white on the plan, is the same veil in the 3d, so the beams, the columns and the force diagrams behind it can be read through it. A pad, a strip and a pile take the slab’s veil where their own colour is less transparent, so what stands on the foundation reads through it as through a floor; view3d::colour foot and strip answer it. Under System every solid is opaque. With the Building tab in front it answers for that view, whose kinds are column, beam, wall and slab, and whose ground is the 3d board’s. On any other board it is refused.

19.13 Removing what is selected

del

Removes every selected element, of whatever kind, as one entry on the undo stack — so one Undo brings all of them back together. The same thing the Delete key does on the drawing; this is the door for a script.

?o 3 5 
?b 1 -add 
?w 1 -add 
del       -> OK removed 4

The primitive is autostruct::element::removeselected, which takes no arguments and answers with the number removed.

Each element is offered to every drawing tool until one recognises it, so the command pushed is the tool’s own — the same one its context menu pushes. An element no tool owns is reported rather than passed over:

del   -> ERR removed 3; 1 of 4 selected could not be removed; 
             no drawing tool owns them 
del   -> ERR nothing is selected

20 Editing what is selected

Six commands that change the elements already drawn. Each is one entry on the undo stack however many elements it touches, so one Undo takes the whole operation back.

mv 2.0 1.0        move by dx dy 
cp 0.0 -2.0       a copy at that offset, the original kept 
ar 0.0 -1.5 3     the same, three times over - an array 
rt 90             turn, in degrees anticlockwise, about their own centre 
rt 90 12.0 4.0    the same, about a point given instead 
mi 20 0 20 1      a mirrored copy about that line; -move mirrors in place 
off 1.5           a parallel copy at that distance, the sign choosing the side

They work on every kind of element alike.

The change reaches the drawing through the same call the properties panel makes when a field is typed into it, so an edit from a script is the command the panel would have pushed.

20.1 Driving the mouse

autostruct::mouse::click 12.05 6.70          a press and a release 
autostruct::mouse::click 3.03 3.02 -alt      the same, with Alt held 
autostruct::mouse::drag  12.05 6.70 14.05 8.70         a press, moves, release 
autostruct::mouse::drag  12.05 6.70 14.05 8.70 -edit   the same, editing

In the board’s own coordinates, the metres element::geometry answers in — not pixels, so a script does not have to know where the view is scrolled. The events are made by the program and given to the board as a real mouse’s would be.

-edit holds the edit key down for the whole gesture. Without it a drag is what a press has always been — a selection — and moves nothing. With it, the drag moves what is picked and the release commits it through the same operation element::moveselected calls, so it takes one entry on the undo stack and a mouse move and a commanded move cannot drift apart.

The edit press does not walk. A second plain press in one place takes the next element under it; a press with the edit key takes what the last press there took, so select-then-drag drags what was selected. Pressed on something selected, it moves the whole selection:

autostruct::element::select slab.bar <id> 
autostruct::element::select slab.bar <other> -add 
autostruct::mouse::drag  <x> <y> <x+0.4> <y+0.4> -edit   both move, one undo

The move itself runs when the release issues it, after the command that made the gesture has answered: read the result in the next command, not the same one.

20.2 The three modifiers

Both mouse commands take -alt, -shift and -ctrl, held for the whole gesture as a hand holds them. -edit is an older spelling of -shift and still works.

-alt      draw a new element      every drawing tool 
-shift    edit what is picked     the drag that moves 
-ctrl     rubber-band selection   -ctrl -shift adds instead of replacing

Alt makes, Shift edits, Ctrl selects. All three are taken and none is spare. A click carrying no modifier is a plain selection — and, importantly, is invisible to every drawing tool, which is why a script that means to draw and forgets -alt appears to be ignored entirely.

20.3 The rest of the hand: the right button, menus, dialogs, the wheel

autostruct::mouse::rightclick 2.5 3.0        -> OK menu {Properties} {(Paste)} ... 
autostruct::menu::items                       what the open menu offers 
autostruct::menu::choose Properties           an entry; a path goes through submenus 
autostruct::menu::close                       every open menu put away 
autostruct::mouse::doubleclick 2.5 3.0        two clicks in one place 
autostruct::mouse::move 4.0 3.2               the pointer, no button held 
autostruct::mouse::wheel 5.0 6.0 2            -> OK <scale> <x> <y> 
autostruct::dialog::fields                    -> OK {Width} 0.25 {Depth} 0.50 ... 
autostruct::dialog::set Width 0.30            a field set as a person sets it 
autostruct::dialog::press OK                  a button of the dialog in front 
autostruct::dialog::tab Interventions         a tab brought forward; none named, the one in front 
autostruct::dialog::cell {O 1} Links 8/150    a cell of the dialog’s table (row, column, ?value?) 
autostruct::dialog::paste "8/200\t2"          laid as the dialog’s Paste lays the clipboard 
autostruct::type 0.30                         typed into what has the keyboard

So that editing can be tested the way a person edits: press on an element with the right button, choose from its menu, fill the dialog that comes up, press OK. Each is an event given to the board in front, or to the menu or dialog that is up, as the window system would give it; the mouse commands take the board’s own metres and the three modifiers as above.

A gesture is answered by what it brought. A menu or a modal dialog runs a loop of its own, so a gesture that may open one is sent from a timer and answered from inside that loop: menu and the menu’s entries, dialog and the dialog’s title, or — when nothing came up — the gesture’s own word (no menu, double clicked, chosen, pressed) once the board has settled. rightclick, doubleclick, menu::choose, dialog::press, and key while a menu or a modal dialog is up, answer this way. An entry that cannot be chosen is listed in parentheses; choosing it, or one the menu does not have, is refused with what the menu does offer. A dialog is the modal one if any, else the last that is open; a gesture reports only a dialog it opened. dialog::fields and dialog::set reach only the tab in front, as a person sees only it; dialog::tab brings another forward. Where a label is repeated — the same field in two groups of a dialog — dialog::set also takes the field by its name, as concreteJacket.thickness.

Only where a hand could reach. click, rightclick, doubleclick, move and wheel, and drag where it presses, first scroll a point the board does not show into sight, as a person scrolls before pressing, and refuse one no scrolling reaches — 900 900 is beyond what the board can scroll to; zoom out to it first — because what a press there opens would be nowhere on the screen. A drag may end past the edge, as a hand’s may.

The keyboard goes where the keyboard is. With a menu or a modal dialog up, key goes to the menu or to the field that has the keyboard — key Escape puts a menu away, key Return takes a dialog’s default button — and otherwise to the board, as before. type sends text one key at a time to whatever has the keyboard.

A dialog’s fields go by the names beside them: the form’s label, a label naming the field as its buddy, a check box’s own text, else the field’s accessible or object name. dialog::set replaces the text and finishes the edit, clicks a check box that is not already on or off as asked, or chooses an entry of a list; it answers the field’s value as it then reads. mouse::wheel answers the board’s scale afterwards and the point of the drawing then under the pointer: how near, and whether what was under the pointer stayed there.

20.4 Drawing with the mouse

Drawing is click, move, click — not press, drag, release. The first Alt-click plants a corner and starts a tracking outline, the second finishes it, and the release brings the element into being.

autostruct::snap on 
autostruct::action "Draw Ortho" 
autostruct::mouse::click 3.03 3.02 -alt      plants the corner 
autostruct::mouse::click 3.53 3.52 -alt      finishes it

Aim at the middle of a snap cell, not its edge. A synthesised click cannot be finer than the view’s own pixel — about two centimetres of drawing at the usual zoom, against a five centimetre snap cell — so a click near a cell boundary lands in either cell depending on where the view happens to be scrolled. The snap is what makes a driven click repeatable at all, exactly as it is what lets a person draw to a known position while watching the coordinates in the status bar.

20.5 The drawing aids

autostruct::snap                 -> on          what it is set to 
autostruct::snap on              round to the drawing’s step 
autostruct::snap object          put the point on a nearby element 
autostruct::snap off             leave a point where the hand put it 
autostruct::snap grid            round to the drawing’s lattice

on rounds to the project’s snap step, which is five centimetres unless the project says otherwise.

object puts a point on the nearest corner, end or centre of an element within reach of the cursor — which is how “offset through that column’s corner” is said. The points are the element’s own, taken from what the model holds rather than from the ink: a column whose corner is at 11.80,6.45 offers exactly that, not the edge of its pen.

It reaches a drawn corner as well as a picked one. A tool being drawn with Alt and the left button asks the same question of the board, so Draw Ortho started three centimetres off a neighbour’s corner begins exactly on it. The reach is twelve view pixels — around twenty centimetres at the usual zoom — which is why a drawn corner can be asserted exactly where a step-snapped one cannot: the step rounds, and a click near a cell’s edge rounds the other way.

grid rounds to the lattice the boards draw, five metres unless a project says otherwise — not to be confused with on, which rounds to the snap step of five centimetres. A hundred to one between them, and they are separate settings for separate purposes.

Unlike object it takes no reach: it rounds every time, the way on does. Turning the grid on is opting into a coordinate system rather than asking to be attracted to one, and with crossings five metres apart an aid that fired only near them would do nothing almost everywhere. The grid is there to rail a click onto an intersection — which is what makes it the aid for laying out a frame, since the accuracy then comes from the lattice and not from the hand.

angle is no longer one of these, and asking for it here says so. Holding a drawing to an angle constrains a direction where all of the above choose a position, so the two compose rather than compete — §20.6.

20.6 Holding a drawing to an angle

autostruct::angle          -> 90        what it is held to, or off 
autostruct::angle 90                    square: horizontal and vertical 
autostruct::angle 45                    and the diagonals as well 
autostruct::angle off

This is not a snap and does not live with them. The snaps choose where a point goes; this chooses which way a line may run, so a drawing can be railed to the building’s own grid and held square at the same time. It sits on its own setting beside the snap, so the two compose.

The point is projected onto the direction, not rotated onto it. What is off the direction is dropped and what is along it is kept, so the drawing follows the cursor along the line and stops where the cursor stops.

The angle is the project’s, kept beside the snap step, and a project that has never said otherwise answers 90. It is applied after whichever snap chose the position, and only while a first point is down — before that there is nothing to take a bearing from.

The state is each board’s own, and this command speaks for the board in front. The Design board may be snapping to objects while the Draft snaps to nothing.

20.7 Measuring

autostruct::measure                 click two points 
autostruct::measure x1 y1 x2 y2  -> OK 5 
autostruct::measure::last        -> OK 5 
autostruct::measure::points      -> OK 0 0 3 4 
  me ?x1 y1 x2 y2?                  the same, typed short

It answers the distance. With no numbers it asks for two points and the clicks supply them; the distance appears in the console the moment the second click is made, so nothing further has to be typed to read it.

There is a Measure item at the foot of every right-click menu — on each element, and on the menu empty space gives — below a separator, after everything that was already there. It offers this same command, so the console shows what was run and the answer arrives in the same place whether it was typed or chosen. measure::last is for a script, which cannot see the console — a click answers the milliseconds it took, like every other, so the distance is asked for separately.

Where the points went is a separate question, and measure::points is where it is asked. It answers the two points as the model kept them, which with an aid on is where the snap put each press rather than where the cursor was. That makes it the one command that reports where a click landed: every other way of finding out reads an element’s geometry, which only works if the click made or moved something.

Without an aid it measures the cursor, and shows what that is worth. Clicking 5,5 and 8,9 with snap off gives 4.9936 rather than 5, because a synthesised press lands where the view’s own pixel puts it — about a centimetre at an ordinary zoom. Nothing is wrong with the measuring; that is the resolution of a click, and it is why the aids matter.

It is how a grid can be checked without drawing anything. With a stated grid current and snap grid on, two loose clicks land on named intersections: clicked near C-4 and D-6, measure answers the distance between those two crossings and measure::points names them.

20.8 Pressing a key

autostruct::key Delete       removes what is selected 
autostruct::key Escape

Keys are spelt as the toolkit’s key names spell them (Delete, Escape, Ctrl+Z) and a modifier may be written into the name. The keystroke goes to the board in front; a key meant for a dialog or for the console’s own command line cannot be driven this way. Nor can a key that belongs to a ribbon button: the keystroke is handed to the board itself and never meets the window’s shortcuts, so key Ctrl+Z is not Undo — undo is.

Delete is three doors onto one command. The key, the ribbon’s Delete button and del typed all issue element::removeselected, so they take one entry on the undo stack and cannot drift apart.

20.9 Opening the channel to outside clients

autostruct::channel              -> listening on 7373    or   closed 
autostruct::channel 0            any free port, answered 
autostruct::channel 7373         that one

Nothing listens unless it is asked. An ordinary run has no listening socket at all; one is opened by AUTOSTRUCT_TCL_PORT at startup or by this command afterwards.

Nothing inside the application needs it. The console, the ribbon’s buttons and every mouse gesture reach the interpreter directly, so the port exists purely so that a script or a terminal outside this process can drive the application. Asking twice is not a failure: a channel already open answers with the port it is on.

20.10 Taking a change back

rev             every change on the board in front 
rev <id>        that one, leaving the others

Only on a board that keeps changes, which today is the draft. An edit to a bar or to a column’s annotation is a blueprint change - a record of what a person made of what the computation drew - and this is how one is taken back by hand.

What the change stood for comes back with it: a bar that was removed is shown again, one that was added goes, one that was moved returns to where the computation put it. The id is the one element::list answers with.

rev not-an-id   -> ERR no change on this board is named not-an-id 
rev             -> ERR there is nothing on this board to take back

This is the manual half of a rule that otherwise runs wholesale. A computation discards every change on the level, because it has just redrawn everything they were made against; rev discards the ones named and leaves the rest, which is what is wanted when one edit was a mistake and the others were not.

20.11 Mirror

Reflects the coordinates and flips the sign of whichever dimension flips for that kind — the width of a beam, wall or strip; dx or dy of a column or footing, by which way the mirror runs. Slabs, boundary lines and braces do not flip: a brace is mirrored end for end.

mi 0 0 1 1   -> ERR the mirror line has to be vertical or horizontal

Vertical or horizontal only. A column is an axis-aligned rectangle held as a corner and two extents; mirroring one about a slanted line gives a rectangle at an angle it cannot hold, so it would quietly draw something that is not the mirror image.

The original is kept and a mirrored copy made, as drafting programs commonly do; -move mirrors in place instead.

20.12 Offset

On any board that can copy, not the design board alone. On the draft that means a bar, which is a blueprint change and is taken back with rev; a beam offset there makes nothing, because a beam is the design board’s to create.

Elements placed by two points only. “Parallel” needs a direction, and a rectangle placed at a corner has none:

?o 3 
off 1.5   -> ERR an offset needs elements placed by two points; an ortho or 
                 a footing has no direction to be parallel to

Positive is right, or up. The distance is measured along a normal fixed to the page — rightwards, and upwards when the element is horizontal and rightwards means nothing — so a vertical beam offset by 3 moves right and a horizontal one moves up — whichever way the element was drawn, so two beams lying on the same line offset the same way for the same number.

A mixed selection offsets what it can and says what it could not:

off 1.5   -> ERR offset 1; 1 could not be, having no direction to be 
                 parallel to

21 Dividing an element

dv 3

Splits each selected element into that many, end to end. It does not drop markers along an element, as a drafting divide does — it makes n elements where there was one.

The point is what becomes possible afterwards. A beam of varying cross section is a chain of beams with different sections; a load that varies along a member is different g and q on each part. Each part is independently editable the moment it exists:

?b 1 
dv 3            -> OK made 3 
mb 19 -d0 0.8   ;# the middle third, deeper than its neighbours

which gives 0.3–5.18 at d0 0.5, 5.18–10.07 at 0.8, and 10.07–14.95 at 0.5 — one beam, three sections.

The original becomes the first part rather than being destroyed and replaced. Its mark, its identity and its history stay with the piece that begins where it began. The rest are new elements, and each part starts exactly where the one before it ended.

Elements placed by two points only, and two parts at least:

?o 3 
dv 3   -> ERR dividing needs elements placed by two points; an ortho or a 
              footing has no length to divide along 
dv 1   -> ERR dividing takes a number of parts, two or more

Equal parts only: a division by given fractions or lengths is not offered.

22 Ribbed plates

autostruct::element::zoellner 1 15 20   -> OK 15 20 
autostruct::element::zoellner 2         ;# whatever is selected 
autostruct::element::zoellner 0 15      ;# back to a solid slab

Designates slabs as Zoellner plates — ribbed plates, with a grid of voids cast into them. The first argument is a rib type: a row of the project’s rib catalogue, which is ChernerConst in the model settings and holds the rib widths, the void widths, the depths and the edge margins for each type. Nought puts a slab back to an ordinary one.

The type is the direction. Whether the ribs run one way or both is the catalogue row having a width in x, in y, or in both — the computation reads it from there and works out the rib counts, the stiffnesses and the drawing itself. There is nothing else to say, and no second argument for it.

With no labels the command takes whatever is selected on the board, so clicking a slab and dragging a rubber band over several both reach it the same way. It is only useful after a Create Model, since until then there are no slabs to name.

The shorthand is zo, and it is what the ribbon offers. Draw Zoellner, on the Design tab of the design board, does not designate anything itself: it puts zo on the command line and leaves the cursor after it, the way Move, Offset and Divide do. From there the slabs can be typed as numbers, or clicked, or gathered with a rubber band — a click while a command is waiting to be finished does not clear the selection, so the drawing stays usable with the line half written:

zo              ;# the button writes this much 
                ;# click the slabs, or drag a band over them 
zo 1            ;# and the type, and Return

Or by number, without touching the drawing:

zo 1 15 20      -> OK 15 20 
zo 0 15 20      ;# and back to ordinary slabs

The button is greyed until a Create Model has found slabs to designate.

The rib catalogue

A rib type is the office’s, not the building’s — the same few formwork systems on every job — so it is written down once, in share/autostruct/zoellner-catalogue.json, or in your own copy of that file beside your model-defaults.json in the application’s config directory, which is preferred over the shipped one. Every project made afterwards starts from it, and then keeps its own copy, so a job can differ without disturbing the rest.

That copy is edited in the Control Manager, under Ribbed slab types, where each type is a node of its own — Type 01 to Type 10, ten dimensions under each — or from the console:

zts                                           ;# what the catalogue holds 
  -> 1: bx 0.2 ax 0.7 by 0.2 ay 0.7 h1 0.08 h2 0.05 aa 0.5 0.5 0.5 0.5 
     2: bx 0.15 ax 0.6 by 0 ay 0.6 h1 0.07 h2 0 aa 0.5 0.5 0 0 
 
zt 4 bx 0.12 ax 0.58 by 0.12 ay 0.58 h1 0.06 h2 0.05 aa1 0.5 aa2 0.5 
  -> OK 4

The fields are bx ax by ay d h1 h2 aa1 aa2 aa3 aa4, all in metres, and the ones you do not name are left alone. bx and by are the rib widths across x and y and ax and ay the clear voids between them — all four horizontal, measured face to face. d is the depth of the ribs, which is the slab’s own thickness. h1 is the topping, over the void; h2 the soffit under it, optional and present only on a sandwich section. aa1–aa4 are the solid margins at the four edges — the perimetric solid body at the supports — and they are taken off the span before the ribs are counted, aa2 and aa4 across x.

The void’s own height is not given and is not stored: it is 𝚍−𝚑1−𝚑2.

d, when it is above nought, is the slab’s thickness: a slab of that rib type takes it in place of DesignConst.FatnPahos. Left at nought, a ribbed slab takes its thickness from DesignConst.FatnPahos like any other — which is usually too thin for a rib, so give the type its depth.

Ten types, which is the engine’s limit, and all ten rows stand in the settings whether they are filled in or not. A row with no void in it is not a type: zts does not list it and zo refuses it, rather than letting a slab come back looking solid for no stated reason.

zo 5 3   -> ERR rib type 5 is not filled in; autostruct::zoellner::types 
                says which are

A slab keeps its designation, not its number. The numbering is made afresh by every Create Model and it moves; the designation is held against the slab’s centre of gravity and follows the shape. So designate by the numbers on the drawing in front of you, and expect those numbers — not the designations — to have changed after the next run.

Where it is kept. A Create Model takes every slab off before it computes and sends none, so a designation cannot live on the slab: it is kept per level in settings/slab-zoellner.json, as the slab’s label when it was given, its centre of gravity — read from the level’s own document, which is why the command wants a Create Model to have run — and the rib type. Every Create Model sends the level’s list, and the engine gives each type to the slab its centre lies in once the slabs are made. Type nought takes the entry away; the last one taken away leaves no file.

23 Plotting

pdf                       ;# the board in front, at the project’s own scale 
  -> OK <project>/publish/<level>.pdf 1:50 
pdf {} 100                ;# at one to a hundred 
pdf ~/plan.pdf 20         ;# somewhere else, at one to twenty

Plots the board in front of you to a pdf. The scale is Klimax out of the model settings unless you name one — 50 means one to fifty, so a metre of building is twenty millimetres of paper.

The page is made to fit the drawing at that scale, not the drawing squeezed onto a page. That is what plotting to scale means: a floor thirty six metres by seventeen comes out at 1:50 as a sheet 740 by 359 millimetres, and the sheet is cut or folded to it. Ask for 1:100 and the same floor is half that.

The drawing goes on white with nothing selected: the board’s dark ground and its selection marks belong to the screen. Everything else on the board is drawn, because everything on it was put there to be read.

Without a file it goes to <project>/publish/. Not drawings/ — the application takes every file in that directory for one of its own drawing documents, and a pdf left there stops the project opening.

A file named without a directory goes there too. Every export — pdf, export::dxf, export::bars, export::ifc, interchange::export, and the print of blueprint and report to a file — puts a relative name in <project>/publish/, and ~/ is your home; a picture from ribbon or theme goes to the copy’s own tmp. Never the directory the program happened to be started from, which nobody chose and which, for a copy started from its icon, is beside the program itself.

The drawing as a DXF

autostruct::export::dxf               ;# the board in front, in metres 
  -> OK {<project>/publish/<level> Draft.dxf} m 3493 BARS 131 BEAMS 81 COLUMNS 42 ... 
autostruct::export::dxf ~/plan.dxf -units mm

Writes the board in front of you as a DXF, for any drawing program to read. What is written is what the pdf shows: every line, outline, circle and text the board draws, at its true size — in metres, or in millimetres with -units mm, and the file says which. It is drawn from whichever board is in front: the Draft, the Details, a reinforcement layout on the Details, or the Design board.

Each kind of element has a layer of its own, so a drawing can be read a kind at a time: COLUMNS, BEAMS, SLABS, FOOTINGS, STRIPS, WALLS, BRACES, BOUNDARY, GUIDES, MODEL-LINES and ANNOTATION. A text an element writes itself goes on its kind’s -TEXT layer (COLUMNS-TEXT), and a bar it draws itself on its -BARS one. The bars and texts the Draft and the Details lay beside the elements belong to no element and go on BARS and TEXT, which is how the reinforcement is turned off, or printed alone; the rest of what those boards draw on their own is DRAWING. The bars are blue, the columns red, the beams green and every text white, or black on a white ground.

The answer is the file, its units, how many entities it holds, and how many there are on each layer. The file is the oldest kind of DXF, which every program reads: fills are not written, except a bar’s section, which is a filled circle. Without a file it goes to <project>/publish/, named after the level and the board.

The building as IFC

autostruct::python wait [autostruct::export::ifc] 
  -> OK {"file": "<project>/publish/<project>.ifc", "storeys": 13, 
         "elements": {"IFCBEAM": 1047, "IFCWALL": 819, "IFCSLAB": 333, 
         "IFCFOOTING": 34, "IFCCOLUMN": 496, "IFCREINFORCINGBAR": 11591}, 
         "analytical": {"nodes": 1171, "members": {"beam": 1034, ...}, ...}, 
         "reinforcement": {"bars": 11591, "levels": {...}}, 
         "skipped": [...], "spikes": 57, "entities": 177858} 
autostruct::export::ifc ~/building.ifc     -> OK 7

Writes the whole building, every level, as an IFC4 file, the form in which building-modelling programs pass a model to one another. The columns, beams, braces, slabs, pads and strips are solids at their places, each with its mark, its material and its section, and marked as load-bearing, so the program that reads them takes them for the structure; a brace runs from the floor below to its level. The walls are there too, of masonry, standing on their level to their height, and marked as bearing no load: the beams carry them.

Beside the building stands the frame the computation gathered and solved, as an analytical model: each node with the directions it is held in, and each column, beam, brace and rigid end piece between its two ends, joined to its nodes — with the distance between them where a beam’s end is off its node — and carrying the stiffness it was solved with. A frame that a Create Model has made stale since it was gathered is not written, and the answer says so.

The reinforcement the design drew is there as a schedule: each set of bars a part of its column, beam or slab, with its diameter, how many bars it holds and, where the Details give it, one bar’s length; a beam’s stirrups with their spacing. A bar has no shape in the file: the boards draw where a bar lies in their own terms, not in the building’s, and the file does not guess it. A level designed before its last Create Model has its bars left out, and the answer says so; so are the lowest level’s columns’, which are not in the file. The levels are the file’s storeys, each at its height: a storey holds the slabs and beams of its level and the columns that rise from it to the level above, which is how such programs see a floor. Each element keeps the same identity every time the building is written, so a model linked to the file sees the same elements move rather than old ones go and new ones come.

It is read from the levels’ files, not from a board, so it is asked of the Design board only and needs every level’s Create Model: the slabs, pads and strips are those the computation made. It runs on the program’s Python while the program goes on; the answer is the job’s number, and autostruct::python wait gives what was written: the file, the storeys, the elements of each kind, the entities, the doubled-back corners taken out of the slabs’ outlines (spikes), and what was left out and why — a pad with no depth, for instance, is not guessed at. Without a file it goes to <project>/publish/, named after the project.

A DXF into the Design board

autostruct::python wait [autostruct::import::dxf propose ~/plan.dxf] 
  -> OK {"file": ..., "units": "m, as the file says", "profile": {"kinds": 
         {"COLUMNS": "ortho", "BEAMS": "beam", ...}, "labels": {...}}, "layers": [...]} 
autostruct::python wait [autostruct::import::dxf plan ~/plan.dxf proposed] 
  -> OK {"level": "Roof", "plan": ".../plan.plan.json", "script": ".../plan.tcl", 
         "recognised": {"ortho": 41, "beam": 81, ...}, "marks": 188, "depths": 81, 
         "sections in": "cm", "left out": [...]} 
source .../plan.tcl                        ;# lays them: one undo step

A DXF holds lines, outlines and texts on layers, and says nothing of what they are; every program that draws structural plans names its layers and draws its elements its own way. So a drawing is read through a profile, which says which layer holds the columns, which the beams, the walls, the pads, the strips and the boundary lines, and which layers hold their labels.

propose makes a profile by looking at the drawing: what each layer holds — its outlines, rectangles, circles and the forms of its texts — and the kind its name says, in the languages structural drawings are written in. Read it, correct what it guessed wrong, keep it as a file, and give it to plan; proposed takes the proposal as it is, and autostruct reads a drawing written by autostruct::export::dxf on the Design board. A profile may also be named: one of the project’s, the person’s or those shipped with AutoStruct, which can read a drawing in a way of its own (§23).

plan reads the drawing for the level in front and writes two files: the plan, which can be read, and the commands it becomes, which source lays on the Design board as one step to undo. A column or a pad is a rectangle, a beam or a wall a rectangle along its length; each takes the mark written nearest it, and a beam its depth from a section written beside it (B21 25/50), in the unit the drawing’s own sizes say. A turned column or pad is laid by one of its corners and turned about it, and a circle on the columns’ layer is a round column, as wide as the circle and where it is; each takes its turn or its roundness from its mark, after it is made. Nothing is invented: an outline that is neither a rectangle nor made of rectangles, a line that is not an element’s outline, a beam’s depth or a column’s turn with no mark to set it by — each is left out and the answer says how many and why. The units are those the file says, else metres, and the answer says which. Without a directory the files go to the program’s temporary directory.

A drawing as it is delivered

autostruct::python wait [autostruct::import::dxf propose ~/building.dxf] 
  -> OK {..., "sheets": [{"title": "FOUNDATION", "window": [59.65, 36.75, 81.25, 53.65], 
         "elements": {"ortho": 11, "beam": 25}, "labels": 6}, {"title": "GROUND FLOOR ROOF", ...}]} 
autostruct::python wait [autostruct::import::dxf plan ~/building.dxf str-layers {} -sheet {GROUND FLOOR ROOF}] 
  -> OK {"recognised": {"ortho": 23, "beam": 14}, "marks": 25, "depths": 14, 
         "columns of rectangles": {"columns": 9, "rectangles": 21}, 
         "sheet": "GROUND FLOOR ROOF", "origin": [60.7, 67.8], "on": "FOUNDATION", 
         "landed": "92 of 92 column corners on its plan’s", ...} 
autostruct::python wait [autostruct::import::dxf plan ~/building.dxf str-layers {} -window 59.7 67.3 80.7 83.1] 
autostruct::python wait [autostruct::import::dxf plan ~/building.dxf str-layers {} -window 59.7 67.3 80.7 83.1 -origin 60.7 67.8]

A building’s plans usually come in one drawing: every level’s plan side by side or stacked up the sheet, each titled beneath it. propose answers the plans it finds, sheets: a group of columns with the beams or walls between them, nothing of another group within three metres, with the title written nearest outside it and the window that holds it. A text inside a plan — a room’s name on the architect’s background — is no title, and a group of columns alone, a schedule of sections, is no plan.

plan reads one of them. -sheet names it by its title (case, accents and underlining aside; part of the title will do when only one plan holds it); -window x0 y0 x1 y1 gives the rectangle that holds it, for a drawing whose plans stand too close to be told apart. A plan read either way is put on the first plan of the drawing by its columns: the shift that lands most of its column corners on the first plan’s, and the first plan read from its lowest, leftmost column corner, so every level’s plan comes out above the one below and the answer says how many corners landed. -reference names another plan to put it on; -origin x y reads it from a point of one’s own choosing instead. The window and the origin are in metres, as the drawing reads once its units are known.

What such a drawing draws is read too:

The shipped profile str-layers reads plans drawn on the layers STR_COLUMN, STR_BEAM, STR_WALL and STR_FOUNDATION, labelled on STR_BEAM_TEXT and STR_COLUMN_WALL_TEXT; a beam’s mark keeps the drawing’s number with the program’s word (D1 is B 1), and a second series keeps its own (HB1 is HB 1). A profile of one’s own asks the same of the generic reading with "faces": ["beam", "wall"], "flanges": {"<layer>": "beam"}, "prefix": "ours" and, for labels in blocks, "attributes": "{D}{1} {B/H}" where the attributes’ own order will not do. A profile that reads a drawing its own way takes none of -sheet, -window, -origin and -reference.

An IFC into the Design board

autostruct::python wait [autostruct::import::ifc ~/building.ifc ?directory? ?-profile name?] 
  -> OK {"level": "Roof", "plan": ".../building.plan.json", "script": ".../building.tcl", 
         "recognised": {"ortho": 42, "beam": 81, "wall": 63}, "marks": 186, 
         "depths": 144, "other levels": 2210, "left out": [...]} 
source .../building.tcl                    ;# lays them: one undo step

An IFC file says what each of its elements is, so it needs no profile. The elements of the level in front are those whose tops are at its height — nearer it than any other level’s — whichever storey the file put them in. Each element’s shape is built whatever the program that wrote it made it of, and read from above: a column or a pad whose outline is a rectangle is laid by its corner and size, a beam or a strip by its length and width, a beam with its depth; each takes its mark from the file where its name reads as one. As with a DXF, two files are written, the plan and the commands, and source lays them as one step to undo. A turned column is laid turned and a round one round, as from a DXF. A wall the file says bears no load is a wall, an infill, standing on the level its foot is at, its height its own; one it says bears load is a column, a shear wall. An outline that is not a rectangle, a slab (the computation makes the slabs from the beams), a wall that does not say whether it bears load, and every other kind of element are left out and counted, with the reason. With -profile, the file is read by that profile (§23): its own reader, or ours and then its correction.

Profiles: a DXF or an IFC for one program

autostruct::python wait [autostruct::interchange::profiles] 
  -> OK [{"name": "autostruct", "place": "shipped", "path": ..., "overridden": false, 
          "about": "AutoStruct’s own layers ...", "can": ["PROFILE", "dxf_after_write"]}, 
         {"name": "centre-lines", ...}, {"name": "ifc-properties", ...}, {"name": "formwork-pairs", ...}] 
autostruct::python wait [autostruct::interchange::export centre-lines dxf ~/plan.dxf -level Roof] 
  -> OK {"level": "Roof", "drawn": {"ortho": 40, "beam": 80, ...}, "file": ..., "profile": "centre-lines", ...} 
autostruct::python wait [autostruct::import::dxf plan ~/plan.dxf centre-lines] 
autostruct::python wait [autostruct::interchange::export ifc-properties ifc]

Every program reads and writes a DXF its own way, and an IFC with its own expectations. A profile is one Python file that says how, for one program; what it does not say is done the generic way, so a profile is often a few lines. It is looked for by name in the project’s interchange/profiles/, then the person’s (in AutoStruct’s home), then those shipped with AutoStruct, and the first of a name wins: copy a shipped one beside the project under the same name to change it for that project alone.

What a profile is given and what it answers is fixed. Reading answers a plan — the elements of the level in front, each a kind with its corner and size or its line and width, a mark and a beam’s depth — which is checked element by element and becomes our own commands, laid as one step to undo; so a profile can propose a wrong plan, which the person reads before laying it, and can do nothing else to the board. Writing is given the building as its json documents say it is, every level’s drawing and the engine’s answer, with each element’s outline as the application draws it; a profile never touches the database. A profile defines any of:

PROFILE a DXF read by our reader, with these layers
dxf_read, ifc_read a file read its own way into a plan
dxf_after_read, ifc_after_read our reading, corrected
dxf_write, ifc_write the building written its own way
dxf_after_write, ifc_after_write our writing, adjusted

autostruct::interchange::profiles answers every profile found, where it is, what it says it is for, which of these it has, and whether one of its name found earlier overrides it; a profile that does not load is listed with its error. autostruct::interchange::export writes by a profile: a DXF of one level (the lowest unless -level names another), or the whole building as IFC; without a file it goes to <project>/publish/, named after the project and the profile. Those shipped are autostruct (our own layers, both ways), centre-lines (a beam or a wall as one line down its middle, its size in its label), str-layers (stacked plans on STR_ layers, §23), formwork-pairs (columns as solids, beams as two lines drawn alike whatever their size, the true section in the label, footings as outlines; a pair of lines no label goes to is left out; from a drawing of every level’s plan stacked one above another it reads the plan of the level in front, put where the lowest plan lies, and the answer’s description says which plan it took) and ifc-properties (our IFC with each element’s mark, project and level in a property set, for a BIM program’s schedules).

The ribbon’s Export and Import

The File tab’s Export DXF, Import DXF, Export IFC and Import IFC ask for the file and the profile, then put the command on the Control Board’s line and run it, so what a button did can be read there and typed again. Export DXF is always there and draws the board in front (autostruct::export::dxf, in metres or millimetres); by a profile it writes the level in front, which is offered on the Design board only. Export IFC is always there and writes the whole building. The two imports are on the ribbon while the Design board is in front, as Create Model is: they read elements for the level in front. Without a file an export goes to <project>/publish/. The profiles offered are the person’s and those shipped; a project’s own, or a profile’s file, can be typed in.

An import lays nothing by itself: it runs autostruct::import::dxf plan or autostruct::import::ifc into the program’s temporary import/ directory, and leaves source with the commands it wrote on the line. Read the answer — what was recognised and what was left out — then press return to lay them, as one step to undo; a read that failed leaves nothing to lay.

The Control Board’s panels

autostruct::panel 
  -> OK Commands of {Commands Python Notebook JavaScript Plugins Reports Blueprints Help} 
autostruct::panel Reports     -> OK Reports 
autostruct::panel Blueprints  -> OK Blueprints 
autostruct::panel Reports listed 
  -> OK {2026-10-24_031522 {{1 Project} 0 1} {{2 Frame} 1 0}} {2026-10-23_221004 ...} 
autostruct::panel Blueprints listed  -> OK {Roof} {Level 1}

Brings a panel of the Control Board to the front, or with no name says which is showing and which there are. With listed the panel brought forward also answers what its list shows, newest first: Reports each delivery by its folder’s name with its chapters, the page each begins on, counted from nought (- where the report does not say), and whether its box is checked (1) or not (0); Blueprints each sheet. A panel with no list refuses the question.

autostruct::help                    -> OK 13 manuals 319 topics 
autostruct::help {simple bending}   -> OK {Simple bending at the ultimate limit state} flexure-theory/flexure-theory.html 
autostruct::help nonesuch           -> ERR there is no help on nonesuch

autostruct::help brings the Help panel to the front: these manuals and the theory ones, with their contents, index and search. With no topic it shows the start and says what there is; with one, the section whose title it is, in any case, else the first whose title contains it, and answers that title and its page. A topic nothing matches is refused, and so is the command in a copy of the program without its Help.

autostruct::ask {How many columns are there on this level?}   -> OK asked 
autostruct::ask       -> OK waiting 
autostruct::ask       -> OK answered {There are 9 columns on this level. ...}

autostruct::ask puts a question to the assistant on the Help’s Ask tab, which it brings to the front. The assistant answers from these manuals and from the project that is open, which it reads with the commands that only answer questions (the READ class above); it lists the sections it used, as links that open them in the Help, and what it read. A change asked for is proposed, not made: each proposal carries a Make it link, and only a person pressing it makes it — there is no command that does. The answer comes later, made on the program’s Python thread by a language model on this computer; with no question the command says where the tab is: idle, waiting, or answered and the answer as text. A question while another is being answered is refused, and so is the command where the program has no Help or no Python.

Reports lists what autostruct::report has delivered (the Analysis tab’s Report button), newest first, each delivery opening onto its chapters; a chapter picked is shown at its page, and the chapters checked are what Print Report prints (autostruct::report print). Blueprints is the sheets the project has published in publish/, with the sheet itself shown rather than a picture of it. Both watch their folders: a report made or a sheet printed while either is open appears in it without anything else being asked for.

Blueprints for the plotter

autostruct::export::pdf {} 50 -sheet A1    ;# 1:50 on an A1, centred 
  -> OK {<project>/publish/<level>.pdf} 1:50 A1 portrait 512.4 377.0 
autostruct::export::pdf {} 50 -sheet A1 -landscape 
autostruct::export::pdf {} 100 -sheet A1 -landscape -title {Formwork plan} 
  -> OK {<project>/publish/<level>.pdf} 1:100 A1 landscape 466.0 319.5 841.0 594.0 
autostruct::export::pdf {} 100 -roll 914 -titleblock 
  -> OK {...} 1:100 roll portrait 466.0 319.5 914.0 393.5 
autostruct::export::pdf {} 100 -sheet A0 -landscape -boards {Draft Details} 
autostruct::blueprint list                 ;# the sheets in publish/ 
autostruct::blueprint check <sheet> ...    ;# or all, or none 
autostruct::blueprint print ?printer? ?file? 
  -> OK 7                                  ;# a job a sheet 
autostruct::blueprint status 7 
  -> OK done printer {ipp://plotter.local:631/ipp/print} pages 1

A sheet named with -sheet is drawn at its scale: a metre of the building is 1000∕𝑠𝑐𝑎𝑙𝑒 millimetres of the paper, centred inside a ten millimetre margin, and never shrunk to fit. A drawing larger than the sheet at that scale is refused, saying its size and the sheet’s, rather than drawn smaller — a blueprint that measures wrong is worse than none. The answer adds the sheet, which way round it is, and the drawing’s width and height on the paper in millimetres. Without -sheet the page is made to fit the drawing, as above, which is at its scale too.

A title block and a scale bar come with -titleblock, or with -title and the title’s text. They stand in a strip of their own along the foot of the sheet, and the drawing is centred above it, so it never runs under them; a drawing that no longer fits above it is refused. The block, at the right, says the title (the level and the board unless one is given), the project, the level, the board, the scale, the paper and the date; the bar, at the left, is five divisions of a round length in metres. On a roll, -roll and its width in millimetres take the place of a sheet: the paper is that wide and as long as the drawing wants, with the drawing’s width across the roll, or along it with -landscape. With either, the answer ends with the paper’s width and height.

Several boards on one sheet come with -boards and their names, Design, Draft or Details, of the level in front: each at the same scale, side by side from the left in the order named, their tops in line and ten millimetres between two. Each is brought in front in turn and drawn as it is then, and the board that was in front is brought back before the answer; one with nothing drawn on it is refused, as is the 3d board, and nothing is asked while a computation runs. The sheet, or the roll, must hold the whole row, or nothing is written; the answer’s drawing size is the row’s, and the title block names every board.

Printed, a sheet is never fitted either. Check the sheets in the Control Board’s Blueprints and press Print the checked sheets there, or use autostruct::blueprint print: each sheet is a job of its own, sent point for point. A printer or plotter of this computer prints it only when it has paper of the sheet’s size, and otherwise refuses, naming the size it lacks; a network printer, found as for the reports, is told the paper by its standard name (iso_a1_594x841mm) and asked not to scale. The printer is chosen in the same dialog as the reports’, and Look on the network finds plotters there. A file is written only by a printer of this computer that writes one, and holds one sheet.

24 The clipboard

cy          copy what is selected; the drawing is not touched 
cx          cut it - copy and remove, as one entry on the undo stack 
ps 40 40    draw the clipboard again, its corner at that point 
ps -inplace draw it again exactly where it came from

The clipboard belongs to the application rather than to a level, so a paste can land on a different floor from the copy — which is most of what anyone wants a clipboard for.

Paste on the Edit tab is enabled exactly when the clipboard holds something, and greyed when it does not. The other Edit commands are enabled by the selection, so they grey after a Cut — there is nothing selected to cut, copy or move any more — while Paste stays live, which is the one that has to.

It also outlives the elements it was filled from. Elements are kept as their own json and the numbers that would draw them again, not as pointers, so pasting after a cut works, and so does pasting after the originals have been deleted.

Paste asks where. A point, not an offset — pasting in place drops a copy exactly on top of what it came from, where nobody can see it and nobody wanted it. The point is where the clipboard’s lower-left corner lands: for one element that is its own corner, and for several it keeps their arrangement and moves the group.

;# two orthos at (10, 0) and (0, 4.95) 
cy 
ps 50 50    ;# they land at (60, 50) and (50, 54.95)

24.1 Pasting onto another level

-inplace takes no point, because in place is where it came from. That is what a paste onto another floor wants: a column below stands under the one above it, not beside it.

;# on Isogeio, two orthos at (10, 0) and (0, 4.95) 
cy 
autostruct::level Ypogeio 
ps -inplace                    ;# they land at (10, 0) and (0, 4.95)

Or without going there, since every element command takes -level:

autostruct::element::clippaste -inplace -level Themeliosi
cy            -> ERR nothing is selected 
ps            -> ERR ps takes a point: x and y, or -inplace 
ps -inplace 1 2 -> ERR ps -inplace takes no point; in place is where 
                       it came from

So the Paste button fills the command line and waits for the point, as Move and Mirror do, rather than running on the spot.

25 When a mark is not unique

A label is a mark for people to read, and it is allocated as the highest number in use plus one, so two elements of a kind are never given the same one. Older drawings can still hold duplicates, and a label supplied by hand is used as given, so it can be made to collide deliberately.

When a mark is shared, it cannot say which element is meant, and remove refuses rather than guessing:

autostruct::element::remove ortho {O 9} 
  -> ERR 3 elements carry the mark O 9, so it does not say which one. 
        Hover over the one you mean to read its id, then name it with -id, 
        or take every one of them with -all. The ids here are 
        275616, 64d909, 55cf41

Refusing matters. Removing whichever element the scene happened to hold first is invisible to whoever asked and is the wrong one more often than not.

25.1 The id, and how to find it

Every element carries a unique id, made when it is first drawn and written into the level file, so it is the same identity for the life of the element — across saves, reloads and any renumbering of marks.

Hover over an element to read it. The tooltip gives the mark and the first six digits of the id:

O 9 
id 64d909

That is the whole mapping: point at the element on the drawing, read its id, type it back. Nothing has to be looked up or remembered, and the id never needs to be drawn on the sheet.

25.2 -id and -all

autostruct::element::remove ortho {O 9} -id 64d909 
  -> OK 23                       that one, and only it 
autostruct::element::remove ortho {O 9} -all 
  -> OK 45                       every element carrying the mark 
autostruct::element::remove ortho {O 9} -id ffffff 
  -> ERR no ortho labelled O 9 with an id starting ffffff

-id matches on a prefix, so six digits are enough — they only have to separate the few elements sharing one mark on one level, never the whole project. A prefix that matches nothing is refused rather than widened.

26 Levels

26.1 The -level option, and why it sticks

Without it, a command acts on the level currently showing. That is a poor bargain for an unattended run: if a switch fails, or the application is not where the script assumes, every element afterwards lands on the wrong level silently and is then saved.

Every element:: command therefore takes an optional trailing -level name . It performs a real level switch, so it stays put — only the first element of a run needs to name the level:

autostruct::element::create ortho 5 5 0.4 0.4 {C 1} -level {A Orofos} 
autostruct::element::create foot  6 5 0.5 0.5 {F 9} 
autostruct::element::create beam  5 5 9 5 0.25    -level Ypogeio

Here the column and the foot are both on A Orofos; the beam moves to Ypogeio and anything after it stays there.

A level that does not exist is refused before anything is created, and the refusal names the ones that do:

autostruct::element::create ortho 1 1 0.4 0.4 -level NoSuchLevel 
  -> ERR no level NoSuchLevel among A Orofos, Isogeio, Ypogeio, Themeliosi

It is a switch rather than a write into the named level’s world by design. The other levels’ boards are retained but deactivated, and their save-on-deactivation has already run; a command pushed into one of them would leave the change unwritten until that level was next activated and deactivated.

To ask where the application currently is, use autostruct::status:

array set l_status [autostruct::status] 
puts $l_status(level) 
puts $l_status(project)

project is the name autostruct::open takes, or - when no project is open. A client that delivers work written for a named project needs it: opening a project while one is open is refused, so without asking first there is no way to tell the right project is already here from the wrong one is — and the second, drawn anyway, puts one building’s frame into another’s.

channel is the port the command channel listens on, off when none was asked for, or could not listen on port with the port and the system’s reason — most often that another copy of AutoStruct holds that port. The same sentence is written into the Commands console when the copy starts. Commands typed in the console, and a batch, still run; a script sent to that port reaches the other copy, not this one.

keyboard is the level the window gives the keyboard back to when it is next activated, or - when that is outside the levels (the command line, a dock). It is the level in front or -: focus given to a board in any other level activates that level, which is a level switch nobody asked for, so a switch moves the window’s keyboard to the level it puts in front.

26.2 Only the Design board

Only the Design board changes the structure. The commands that make, take away or resize an element — element::create, element::remove, element::steel, element::steelselected, element::tosteel, element::steelgrow, element::zoellner, carrybeams, centrebeams, axisbeam, proposebeams, wallbeams, drawraft, foundation::void and the shorthands built on them — are the Design board’s interpreter’s alone: typed with another board in front they answer invalid command name. Those that move, turn, mirror, divide, copy or remove the selection, the clipboard’s, and element::set are the Design board’s and the Draft’s: on the Draft they reach the bars and lettering the Draft draws, and refuse an element,

  -> ERR this ortho is the structure’s, and only the Design board changes the structure; autostruct::tab Design

which is also what a script run with another board in front is told: it runs in the Design board’s interpreter, which has every command, and the board in front refuses. With another board tab showing, element::create and element::remove answer

  -> ERR this command is the design board’s; another board is in front

rather than acting on the wrong board. Those that select, read and take back (element::select, element::selected, element::count, element::geometry, element::revert) act on the board in front.

With no board to act on, the answer says why. With no project open it is no project is open; with the Building tab in front — which is where autostruct::building leaves you — the command’s own reason is followed by the Building tab is in front - autostruct::level brings a level back.

27 Undo, redo and saving

27.1 Injected elements are ordinary undoable commands

An injected element is not a second path to the data. It is made by the same tool that draws that kind with the mouse, with the same context menu, and goes onto the same history. Undo and redo therefore work on it as on anything drawn by hand:

autostruct::element::count ortho   -> OK 18 
autostruct::element::create ortho 0 0 0.3 0.3 
autostruct::element::count ortho   -> OK 19 
undo                               ;# a shorthand for the line below 
autostruct::undo                   ;# the same stack the GUI’s undo acts on 
autostruct::element::count ortho   -> OK 18 
autostruct::redo 
autostruct::element::count ortho   -> OK 19

Removal is undoable in the same way, through the same command the element’s context menu pushes.

27.2 Undo during a round of editing

A round of editing in the properties panel is one entry on the history, so one Undo takes back everything typed in it. The history composes that as a macro, and reports nothing to undo while a macro is open — so the stack alone cannot say whether Undo should be offered.

It is offered anyway. The Edit actions ask the drawing board whether a round is open as well as asking the stack, and pressing Undo closes the round before undoing it. So Undo is live from the moment the first field is changed, and takes back the whole round.

27.3 Making many changes one step

autostruct::undo::begin {a grid}   -> OK 1    ;# groups now open 
   ... anything ... 
autostruct::undo::end              -> OK 0

Everything between the two becomes a single entry on the history, so one autostruct::undo — or one press of the Undo button — takes back the lot. Each answers with the number of groups still open, so a script can assert it closed what it opened.

A group does not span a level switch: switching gives the board a new history, and a group begun on the old one cannot be closed on it. So autostruct::undo::end and autostruct::undo::rollback refuse after one, saying the history was replaced; the group is lost, and what it held is undone one step at a time.

They nest, and they must balance. A group left open leaves the history unable to undo anything at all, because that is what an unclosed macro means to the history. The shorthand’s ::as::as_one_step exists to make that impossible to get wrong from a script:

::as::as_one_step "twelve orthos" { 
    for {set i 0} {$i < 12} {incr i} { 
        autostruct::element::create ortho [expr {$i * 5}] 0 0.5 0.5 
    } 
}

The body runs inside a group that is closed even if the body fails, which is the part worth having.

27.4 Trying something out and putting it back

autostruct::undo::begin {a trial}  -> OK 1 
   ... anything ... 
autostruct::undo::rollback         -> OK 0

autostruct::undo::rollback closes every group that is open, undoes the single entry they made, and then discards the redo branch. It is the way to ask would this work? of the drawing itself: the commands really run, on the real level, and are then taken back.

The last part is what separates it from autostruct::undo::end followed by autostruct::undo. That pair leaves the whole batch sitting on the redo branch, where the next press of the Redo button applies work that was only ever being tried out. A rollback leaves nothing to redo.

It leaves nothing else either: no element, no consumed mark — two rounds of create-and-roll-back both mint the same label — and the history the user made themselves is untouched, still undoable and still redoable.

Modifications and removals of elements that were already there come back too, so a trial is not limited to what it creates.

27.5 Save before switching levels

This is not optional. A level switch writes only into project/tmp, and that directory is removed when the application closes. autostruct::save is what copies the working files into the project proper. It answers when that copy has answered: saved, or an error beginning the save did not reach the project with the reason (a full disk, a directory that cannot be written), in which case some of the working files did not reach the project and the save should be repeated once the cause is put right.

autostruct::element::create ortho 1 1 0.4 0.4 
autostruct::save 
autostruct::level {A Orofos}

After a level switch the history is empty by design — the items it referred to were destroyed and rebuilt — so autostruct::undo then answers there is nothing to undo.

autostruct::quit answers no to the save-on-exit questions unless told autostruct::quit save, so an unattended run does not write to a project as a side effect of stopping. quit save is not a substitute for autostruct::save.

Once autostruct::quit has been asked for, every command after it is refused — the application is leaving — and does nothing: the leaving has begun closing the threads a command would reach. A batch that quits on a refusal should stop there, not carry on into its next line.

28 Labels

28.1 Beams and boundary lines: a word, whitespace, a number

The slab generator builds its map of sides by splitting every beam and boundary line label on whitespace and taking the second field, and for a boundary line it requires that field to be a whole number. A label that does not survive that parse brings the application down at load time — that is, after it has been saved, leaving the project unopenable.

Both are therefore refused at creation:

autostruct::element::create boundaryline 0 20 10 20 0.05 {BL2} 
  -> ERR BL2 is not a usable label here: the slab generator reads 
     element labels as a word, whitespace and a whole number, so a 
     custom label has to keep that shape - "L 12", not "BL2"

Columns and footings are not restricted; free-form labels work for them.

28.2 A label is a name, not a caption

The beam family appends the dimensions to the drawn label, so B 1 is drawn as B 1  0.25x0.5. list and remove both read the same name, so whatever list reports can be handed straight back to remove.

29 Appearance is project settings

Nothing in the script path sets a pen, brush or z-value. Every element takes its appearance from the project’s drawing settings in its own constructor, exactly as an element loaded from the level file does. The channel an element arrives by does not change how it is drawn.

Changing how a kind is drawn is a settings operation — it writes the project’s own settings/drawing.stngs — and is not done by painting individual elements.

drawing

autostruct::drawing                       ;# the kinds it knows 
autostruct::drawing slab                  ;# every property that kind has 
autostruct::drawing slab brushColour      ;# -> OK slab brushColour #c8ffffff 
autostruct::drawing slab brushColour white 
autostruct::drawing slab penStyle DotLine 
autostruct::drawing slab zValue -95.5

The kinds are ortho, beam, boundaryline, wall, slab, foot, strip, background and foreground, which are the nine element kinds; and tracking, zoomband, guide, guideselected, guiderect, guiderectselected, pointer, boardsurface, bar, highlight and plate, which are the board’s own furniture — the ghost drawn between the two clicks of a draw gesture, the zoom marquee, the guides and their selected selves, the cursor’s cross, the tint of the sheet, a reinforcement bar, how heavily a selected element is drawn over itself, and how pale its plate is.

plate is the one that is not a pen or a font. Its property lighten is a fraction of the way from the element’s own colour to towardColour, white unless set: nought draws a plate in the element’s colour, one draws it in the toward colour, and 0,55 is the default. It is a rule applied to whatever the settings hand over, which is why a plate has no fill of its own — two colours would have to be chosen and then kept in step by hand, and nothing would say when they had drifted. Under the Navy theme a white toward colour is drawn as the board’s navy, so a plate is darker than its element there and still reads as the ground beneath it:

autostruct::drawing plate towardColour -worn 
  -> OK plate towardColour #ff092231         ;# under Navy

A bar’s width and a selection’s are in DEVICE PIXELS, both those pens being cosmetic, where every other width here is in metres. A bar has to read with a whole level on screen and with one bar on it, which a width in drawing units cannot do. And a selection has no colour to set: it takes the application’s own highlight colour so that it follows the theme, and a literal that answered a light theme would answer a dark one wrong.

A kind carries only the properties it has, and that is the whole difference between the two groups. The nine elements have all eleven. A guide has a pen and no fill and no label. The cursor’s cross has a colour and nothing else — its width of nought and its cosmetic flag are not a taste but what makes it one device pixel at every zoom, and offering them would offer the chance to make the cursor unusable. The sheet has a fill and nothing else. Asking for a property a kind does not carry answers there is no setting, which is the schema speaking.

The properties are penColour, penWidth, penStyle, brushColour, brushStyle, zValue, fontFamily, fontPointSize, fontBold, fontItalic and textColour. A kind on its own reports all eleven and changes nothing. -brush and -pen are kept as older spellings of brushColour and penColour.

One property moves all four boards unless a board is named, because every element asks the drawing settings for its appearance in its own constructor — the design board’s items, the draft’s, the details’ and the 3d’s alike. It is the project’s palette rather than a board’s, so it answers from every interpreter.

One board’s departure — -board

autostruct::drawing slab brushColour -board draft 
  -> OK draft slab brushColour #c8ffffff     ;# the shared value, so far 
 
autostruct::drawing slab brushColour #c8ff0000 -board draft 
  -> OK draft slab brushColour #c8ff0000 saved shows on the next level switch 
 
autostruct::drawing slab brushColour 
  -> OK slab brushColour #c8ffffff           ;# the shared value, untouched 
 
autostruct::drawing slab brushColour shared -board draft 
  -> OK draft slab brushColour #c8ffffff back to shared ...

The boards are design, draft, details and view3d, and -board may be given anywhere in the line.

A board departs by gaining a key and rejoins by losing one. The shared palette is <kind>.<property> in the document and a departure is boards.<board>.<kind>.<property> — the same shape as a National Annex, holding only where it departs — so a project that has never used it has no boards section at all and the four boards draw alike. The last override removed takes its board with it, and the last board takes the section, so a document that departs nowhere looks exactly like one that never departed.

A board that has not departed reads the shared value, not nothing, because the shared value is what it will draw with. And there is no value meaning “the same as everywhere else” — a copy of the shared colour would stop following it the moment the shared one changed — so the way back is a removal, and shared is the word for it. It is a removal only under -board: with no board there is no layer above to fall back to, and shared is read as a colour and refused as one.

Only the nine element kinds may differ per board. The board’s own furniture is a single shared instance that every board asks, so there is nothing for a per-board tracking pen to be written into, and the command says so rather than leaving the model to answer about a path that is not in the schema.

It is the same model the Drawing tab uses, over <project>/settings/drawing.json and share/autostruct/drawing-schema.json. A value this command refuses is refused in the tab in the same words, and the reverse; there is one validator and not two.

The alpha is kept unless the colour carries one. A brush here is translucent, 200 of 255, which is what lets a reader see the beams under a plate. A name such as white, and a #rrggbb, carry no alpha, so the kind’s own is kept; give eight hex digits to set it deliberately.

It writes the file as it answers, like the grid and the site commands — there is no save and no undo, and the change survives closing the application.

And it shows at once, on the board in front. The reply ends with the number of items that took the change — 215 items redrawn. The board’s own furniture — the grid, the scale, the sheet — follows in the same instant, because it is painted from the palette on every repaint.

The CAD tab goes the same way, so a value typed into the tree widget lands on the drawing as it is typed.

What a board draws with — -worn

autostruct::drawing beam brushColour -worn -board draft 
  -> OK draft beam brushColour #ff154750   ;# under the Navy theme 
autostruct::drawing beam brushColour -board draft 
  -> OK draft beam brushColour #c8008080   ;# what the project says

The project’s colours are not always the ones drawn. Two things are laid over them as a board is drawn, and neither is written into the project:

-worn answers what the board draws with, after both. It reads a kind or one property, with or without -board, and sets nothing.

30 What the Design board and the Draft show

autostruct::visible                ;# -> OK ortho on beam on boundaryline on wall on slab on foot on strip on 
autostruct::visible off slab       ;# the slabs hidden, to read the beams’ diagrams 
autostruct::visible on slab 
autostruct::visible off wall foot strip 
autostruct::visible on all 
 
autostruct::labels                 ;# the labels’ state, the same shape 
autostruct::labels off beam ortho 
autostruct::labels on all

visible shows or hides every element of the kinds named on the board in front, the Design board or the Draft; labels does the same for their labels. The kinds are spelt as element spells them — ortho, beam, boundaryline, wall, slab, foot, strip — and all names the seven. With no words, each answers the state of every kind; with on or off and the kinds, it changes them and answers the state after. A kind it does not know is refused before anything changes.

A hidden element takes its labels with it. A label belongs to its element, so hiding the slabs hides the slabs’ labels too, whatever labels says; showing the slabs again brings their labels back unless labels off slab was asked as well.

It is a way of looking, not a change to the building. Nothing is written into the project and nothing is undone; a save writes hidden elements as it writes the rest, Create Model computes them, and the diagrams, the grid and the rulers are drawn as before. The choice holds for the session on every level — a level switched to, or one drawn again, shows what was chosen — and the Objects button of the View tab shows the same choice and changes it.

What is hidden is out of reach. A press does not take a hidden element, the snap does not catch on one, and the buttons that draw a hidden kind are off until it is shown again. Hiding the slabs leaves Create Model on: slabs are made by it alone. A slab is taken by its label, so with the slabs’ labels hidden a press does not take a slab.

The Draft has a choice of its own. With the Draft in front the two commands answer and change the Draft’s, as its Objects button does; hiding a kind on one board leaves the other as it was. On the Draft a kind takes with it what the drawing lays for it: a column its mark, its section and its bars’ lines, a slab the bars over its supports, a pad its outline and its notes. The labels of a kind are its writing there. The Draft holds none of the Design board’s buttons off. On the Details the two commands answer that there is no such command.

The 3d board and the Building tab have a choice of their own too. With either in front, visible answers and changes that view’s, in the same words and for the session: the 3d board’s level drawn again, or the Building tab read again when it comes to the front, shows what was chosen. On the Building tab, visible off wall takes the infill walls out of the picture and leaves the frame and the floors:

autostruct::building 
autostruct::visible off wall 
  -> OK ortho on beam on boundaryline on wall off slab on foot on strip on

The 3d board draws no walls, so there off wall changes nothing; the Building tab draws columns, beams, walls and slabs, and the other kinds change nothing there. Neither draws labels, and labels is refused on them. While the 3d board shows force diagrams its solids are put away; a kind hidden then stays hidden when the diagrams go.

31 A grid may be turned

autostruct::grid::angle        ;# -> OK 0 
autostruct::grid::angle 30     ;# thirty degrees anticlockwise 
autostruct::grid::angle 0      ;# and square again

Degrees anticlockwise, about the drawing’s own origin — a grid needs a centre to be turned about, and (0,0) is the one every drawing already agrees on. An axis at 5 then means five metres along the turned direction, which is what a person laying out a skewed wing means by it.

The snap and the drawing turn together. A grid drawn turned and snapped square would put every click where no line is, silently, and the reverse is the same fault wearing the other face. Both go through one pair of functions — the point into the grid’s frame, rounded against axes that are straight there, and the answer back out — so the two cannot come apart. Measured: on a grid with axes at 0, 10 and 20 turned by 45∘, a click at (9,49,6) lands on 7,07107, which is where the arithmetic says it must.

A quarter is the whole range. A grid turned by ninety degrees is the same grid with its two directions renamed, so every angle anybody can want is inside ± 90∘; offering more would let one grid be stated four ways.

Nought takes the key out of the document rather than writing a zero, so a grid that is not turned reads exactly as every grid did before angles existed, and one turned back cannot be told from one never turned.

Seeing it needs the grid layout on. The structural grid is drawn on the draft board only when settings/dimensioning.json lists grid among its layouts — dimensioning -grid. A project that lists only chains snaps to its grid and never draws it, which is a perfectly ordinary way to work and is worth knowing before concluding that a turn did nothing.

32 What the cursor is attracted to

autostruct::drawing snap               ;# every one of the twelve 
autostruct::drawing snap onWalls no    ;# walls stop attracting 
autostruct::drawing snap toCentres no  ;# and so do the centres of boxes 
autostruct::drawing snap reachPixels 20

Snapping to objects offers, on every element the board can describe, the ends and the middle of anything placed by two points, and the four corners and the centre of anything placed as a box. Which of those, and on which kinds of element, is now a setting.

Everything is on by default, which is what the aid did before any of it was settable — so a project that says nothing snaps exactly as it always has.

The one most worth turning off is onWalls. Walls cover a great deal of a plan, so on a dense drawing they catch the clicks meant for the columns and beams standing in them.

The reach is in device pixels, so the aid behaves the same at every zoom. Nothing near enough leaves the point where the hand put it: a snap that reaches across the drawing is worse than none.

These live in the CAD document rather than the engineering one, because they are a property of the board under the hand rather than of the building — the same reason the cursor’s cross and the tracking pen are there. They change no number in a design and reach no helper program.

33 A whole direction of the grid at once

autostruct::grid::positions x            ;# -> OK A -0.1 B 4.41 C 8 ... 
autostruct::grid::positions x 0 5 10 15  ;# replaces them, named A B C D 
autostruct::grid::positions y 0 6 12     ;# and these are named 1 2 3

grid::axis lays one axis and names it, which is right for correcting a single line and is twenty-one commands for a building. This lays or reads a whole direction.

x and vertical are the same thing and both are taken, as are y and horizontal: an axis that runs vertically stands at an x, and neither word is obviously the right one. grid::axis has always said vertical|horizontal, so that spelling stays and x|y joins it.

It renames in order — A B C across, 1 2 3 along — and that is deliberate. A grid is lettered and numbered in position order because that is how a drawing is read, so an axis put in between B and C should make the old C into a D. Keeping a name against a position would give a grid whose letters ran out of order, which is worse and harder to see. Correcting one line without renaming the rest is what grid::axis is for.

Positions given out of order are sorted. One bad position refuses the whole line, so a grid is never left half replaced. The new axes take their extent from the axes already there — of this direction, or of the other if this one is empty — the same way grid::axis does.

It replaces a direction, so a script that runs it against a project’s own grid throws away the names on it, and there is no undo: it is written to the project’s settings as it answers.

34 Taking the settings out and putting them back

autostruct::settings::export cad    /tmp/house.json   ;# -> OK ... 152 settings 
autostruct::settings::export design /tmp/eng.json     ;# -> OK ... 625 settings 
autostruct::settings::import cad    /tmp/house.json   ;# -> OK took 152 refused 0

The categories are design, the engineering settings in settings/model.json, and cad, the drawing settings in settings/drawing.json.

The settings are written as they change and a board save does not touch them. There is nothing to save, because every document is already saved — which is the opposite of every editing command, where nothing reaches disk until a save. What these two add is what a person does with a document once it is written: take a copy, and put one back. A house style arrived at on one project could not reach another except by copying a file by hand.

Export is a copy and import is not. Writing out is just the document. Reading one in goes leaf by leaf through the model, so every value is validated by the same schema the tree and the channel use: a colour the CAD tab would refuse is refused here, in the same words, naming the path. A file written by a newer version, or edited by hand, cannot put a value into a project that the project would not have accepted by hand. A design file written before the codes were roles, holding one code of practice and an EN 1998-1 switch, offers the roles they stand for, as a project of that age is read when it is opened.

So it reports what it took and what it refused rather than failing whole — took 150 refused 3 grid.stepX: grid stepX is between 0.01 and 1000, and 99999 is not. A document carrying one unknown path is mostly good, and the alternative is a person with no way to use any of it. A file that is not readable JSON at all is refused whole, because nothing in it can be trusted to be a setting.

And the boards follow at once, the way they do for any other change to the drawing settings.

Two baselines

autostruct::settings::mine  cad            ;# keep these as your own defaults 
autostruct::settings::reset cad mine       ;# back to your own 
autostruct::settings::reset cad shipped    ;# back to the program’s

The shipped baseline is what the program carries and cannot be lost. mine is a house style — a plain file in your own configuration, which is the point: establishing one is an export pointed at a known place and resetting to it is an import from the same, so nothing new had to be invented for it to exist and the file can be carried between machines. Asking for your own before you have any is answered as a missing baseline and not as a missing file, naming the command that would make one.

What has this project changed?

autostruct::settings::differs cad 
  -> OK 9 beam.penColour beam.textColour foot.textColour ...

The question a tree of six hundred values cannot answer by being looked at. The count comes first, because that is what is wanted most often, and a project that has departed nowhere answers 0 and nothing else.

A leaf the shipped prototype never carried counts as departed by existing — nothing shipped it, so somebody put it there.

The Only what differs checkbox at the foot of the tab reads the same list, so what a person sees filtered is what a script is told. It is a filter over a tree: a row is kept when it has departed or when something below it has, or a changed leaf would vanish with the group that holds it.

The Control Manager’s tabs

autostruct::manager            ;# -> OK Project Design *CAD 
autostruct::manager Design     ;# -> OK Design

tab moves between the four boards; this moves between the dock’s own tabs, so a script can bring the settings tree it is changing into view.

The same things are buttons at the foot of the Design and CAD tabs: Export..., Import..., Set as mine, Reset to mine and Reset to shipped. Not a dialog — the tab already knows which document it is, so there is no category to choose and no window to open. Reset to mine is greyed until there is one, and the two resets are deliberately not one button with a menu: a reset is not a thing to discover you have chosen the wrong flavour of. Every button calls the same model the commands do.

35 The palette is a settings document

How the boards draw lives in <project>/settings/drawing.json, shown in the Control Manager’s CAD tab beside the engineering settings and read by the same model. The two are kept apart deliberately — how a building is designed and how it is drawn have nothing to say to each other — and nothing in the drawing document reaches any helper program or changes a number in a design.

A project that predates the document has one written for it, from the palette it already had, the first time it is opened. Nothing an existing project draws changes on that day: the shipped defaults are what a new project starts from, not what an old one is reset to.

36 A worked example

# A closed perimeter on one level, then a column and a footing inside it. 
autostruct::open Test12 
 
autostruct::element::create boundaryline 0  0  10  0 0.05 -level Isogeio 
autostruct::element::create boundaryline 10 0  10 12 0.05 
autostruct::element::create boundaryline 10 12  0 12 0.05 
autostruct::element::create boundaryline 0  12  0  0 0.05 
 
autostruct::element::create ortho 2.0 2.0 0.4 0.4 
autostruct::element::create foot  1.8 1.8 0.8 0.8 
 
autostruct::element::create beam 0 0 10 0 0.25 
 
autostruct::save 
autostruct::element::list boundaryline 
autostruct::quit

37 The program’s own Python

AutoStruct carries a Python interpreter of its own, on a thread of its own. autostruct::python gives it work:

autostruct::python exec <code>      ;# run it and wait: what it printed 
autostruct::python run <code>       ;# start it: the job’s number 
autostruct::python file <path>      ;# start a file: the job’s number 
autostruct::python status <job>     ;# queued, running, done or failed 
autostruct::python output <job>     ;# what it printed 
autostruct::python wait <job>       ;# until it ends: what it printed 
autostruct::python kernel           ;# the notebook’s kernel: none, starting, running, ended 
autostruct::python kernel <file>    ;# start it, writing its connection file there

Every job runs in one namespace that lasts the session: a name one job sets, the next one reads. What a job writes to stdout and stderr is caught, in order, and is the answer. A job that raised answers exec and wait with an error: what it printed, then Python’s account of the exception. The thread survives it.

autostruct::python exec {kept = 6 * 7} 
  -> OK 
autostruct::python exec {print(kept)} 
  -> OK 42 
autostruct::python exec {raise ValueError(’no’)} 
  -> ERR ValueError: no ...

Two modules are compiled into the executable. autostruct is the command line, seen from Python: autostruct.tcl(script) runs a script in the interpreter of the board in front and answers its text, or raises autostruct.TclError with the command’s reason. Python is a client of these commands, not a way round them. autostructcodes is the codes of practice, the same module as the stand-alone extension, here using the program’s own; it has no __file__.

autostruct::python exec {import autostruct; print(autostruct.tcl(’autostruct::panel’))} 
  -> OK Commands of {Commands Python Notebook JavaScript Plugins Reports Blueprints Help}

And under Python names. The module also carries the program’s own commands as functions, each the command it names with its answer made a Python value. Nothing in it reads a document or computes; when the project store comes, it goes under these names.

autostruct.status()            # {’project’: ..., ’level’: ..., ’board’: ..., ’levels’: 3, ...} 
autostruct.project()           # the open project’s name, or None 
autostruct.project_dir()       # its folder: $AUTOSTRUCT_PROJECTS, else Documents/AutoStruct 
autostruct.levels()            # the levels, lowest first 
autostruct.level(name=None)    # the level in front (None on the Building tab), or bring one 
autostruct.board(name=None)    # the board in front, or bring one: Design, Draft, Details, 3d 
autostruct.building()          # the Building tab: what it drew 
autostruct.open(name)          # autostruct::open 
autostruct.save()              # autostruct::save 
autostruct.create_model(level) # autostruct::engine::div1 
autostruct.collect()           # autostruct::frame::collect 
autostruct.solve()             # autostruct::frame::solve 
autostruct.design(*levels)     # autostruct::levels::design 
autostruct.staging()           # every Create Model from the lowest level, collect, solve, design

The stages run on the Design board, so the functions that run them bring it forward first. staging() stops at the first refusal, which it raises. levels::design leaves the first level’s Draft board in front, as the button does; staging() then brings back the level and board (or the Building tab) that were in front when it was called, after a refusal too. The stages called one by one leave the board where the stage left it.

wait and exec hold the command line, and serve it. A batch is one long evaluation on the interpreters’ thread; a job it waits for that calls autostruct.tcl would be waiting for that same thread. So while it waits, wait answers the job’s own questions, and the job finishes. There is no deadline: in-process work is not bounded.

The element bindings are compiled in too: beamspy, draftbeamspy, detailsbeamspy and their siblings, nineteen modules, each once.

Three doors, one Python. The console’s Python tab takes a line at a time, as Python’s own prompt does: an expression shows its value. The Notebook tab starts, the first time it is shown, a notebook whose files are the open project’s own (its notebooks folder, given a starter notebook, AutoStruct.ipynb, the first time; another project opened moves the notebook there) and whose kernel is this same interpreter — the same namespace, the same modules, the same autostruct.tcl. And autostruct::python. A name one of them sets, the others read. They take turns: a cell, a line and a job run one at a time.

The kernel can be reached from outside. autostruct::python kernel <file> starts it and writes a connection file there; any notebook or editor that speaks to a kernel through a connection file can then attach to the program’s Python. It is the program’s: an interrupt stops the cell, and a shutdown or restart from the notebook is answered and changes nothing. There is one kernel per program; kernel answers running once its file is written.

Its Python environment is $AUTOSTRUCT_PYTHON_ENVIRONMENT, else ~/.autostruct/python, a Python environment made with the same version of Python as the program’s own. What is installed there — numpy, a person’s own modules — is importable from all three doors.

autostruct::python is answered on every board’s interpreter.