OpenSite/Reference/Commands/Unit commands: Difference between revisions

From BathAfrica Documentation
Jump to navigation Jump to search
Use BathAfrica sidebar contents without duplicate inline contents box
Link adjacent OpenSite reference pages in reading order
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{OpenSite scope}}
{{BathAfrica Command
{{BathAfrica Command
|review=Development documentation for OpenSite 0.0.1, source snapshot 77c3fee (Phase 13C). Reviewed against implementation on 29 October 2026. Tests and the Windows desktop were not rerun for this publication; this is not a released-product support claim.
|id=cli.units
|id=cli.units
|summary=Select a unit profile and show that the canonical section value stays put.
|summary=Select a unit profile and show that the canonical section value stays put.
Line 16: Line 16:
<code>opensite-cli units profile engineering_metric --file preferences.json</code> prints <code>profile=engineering_metric</code> and stores <code>units.profile</code> in the settings file.
<code>opensite-cli units profile engineering_metric --file preferences.json</code> prints <code>profile=engineering_metric</code> and stores <code>units.profile</code> in the settings file.


== Try this workflow ==
[[OpenSite/Guides/Quantities and profiles|Quantities and profiles]] — a worked lesson with expected results.


== Documentation basis ==
== Documentation basis ==
Line 27: Line 30:
[[OpenSite|OpenSite overview]] · [[OpenSite/Reference|Reference]] · [[OpenSite/Guides|Guides]]
[[OpenSite|OpenSite overview]] · [[OpenSite/Reference|Reference]] · [[OpenSite/Guides|Guides]]
[[Category:OpenSite documentation]]
[[Category:OpenSite documentation]]
<div class="os-page-nav">{{Docnav|OpenSite/Reference/Commands/Settings commands|OpenSite/Reference/Commands|OpenSite/Guides|All guides}}</div>

Latest revision as of 14:14, 29 October 2026

OpenSite 0.0.1 · DevelopmentSource scope and availability


Select a unit profile and show that the canonical section value stays put.

Stable identifier
cli.units

Implementation milestone

Roadmap phase 3.

Units

Displayed length follows the profile. canonical_si and area_si are SI numbers. Area is square metres.

Terminal example

opensite-cli units demo

Python access

opensite.execute('units.set_profile', {'profile': 'engineering_metric'})

Output

The length display changes from 0.300000 m to 300.000000 mm. Both canonical_si lines are 0.300000. Both area_si lines are 0.180000. Both content_revision lines are 1.

Errors

Exit 0 on success. Exit 2 for an unknown profile name or an extra argument.

Limitations

This CLI demonstration does not write the engineering document or check a design code. Desktop unit preferences and document/property presentation overrides are separate workflows; changing presentation does not change canonical SI values.

Verification evidence

Repository evidence references (not rerun for this publication): CTest cli.preferences and foundation.unit_preferences.


opensite-cli units profile engineering_metric --file preferences.json prints profile=engineering_metric and stores units.profile in the settings file.


Try this workflow

Quantities and profiles — 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