OpenSite/Reference/Commands/Create an example document

From BathAfrica Documentation
Revision as of 13:59, 29 October 2026 by BathAfrica (talk | contribs) (Reorganize OpenSite help: learning paths, examples and chapter navigation)
Jump to navigation Jump to search
OpenSite 0.0.1 · DevelopmentSource scope and availability


Create a 0.30 m by 0.60 m rectangular section and save it.

Stable identifier
cli.document.example

Implementation milestone

Document-engine example, available in this development snapshot.

Units

Width and height are stored in metres. Area is square metres. Second moments are metres to the fourth.

Terminal example

opensite-cli document example --output section.osdoc

Python access

The CLI verb has no separate function. opensite.execute('document.create_section', ...) is Document commands.

Output

Stdout lists the object and properties, including area si=0.18 and unit=m2. The saved opensite-document writer format is version 4; the loader accepts versions 1, 2 and 3 through its migration paths.

Errors

Exit 1 when the file cannot be saved, with the status message on stderr. Exit 2 when the arguments do not match the usage.

Limitations

The section is a document calculation. It is not a design-code check and not the section-design plugin. Local axes: x along the width, y along the height, z along the member.

Verification evidence

Repository evidence references (not rerun for this publication): CTest cli.document and document.section_reference.


Try this workflow

First document — a worked lesson with expected results.

Documentation basis

Source-reviewed against development commit 77c3fee13944bcc4b5d487c77eb1f82fbe4c6ea7, branch feature/phase-13c-properties-python-expressions. This review inspected the implementation and repository evidence; it did not run the Windows application or repeat CTest.

  • src/cli/main.cpp
  • src/cli/document_commands.cpp
  • src/cli/preference_commands.cpp
  • src/application/builtins.cpp

OpenSite overview · Reference · Guides