Skip to content
Archee Docs

Example programs

Copy-ready execute programs for calculations, citations, drawings and deliverables.

Each program is one execute call. Ask your agent for the outcome and it writes programs like these. You can also send them yourself.

A cited calculation

import archee

belt = archee.calc.run(
    "vbelt",
    P1_kW=8.152,
    n1_rpm=1455.0,
    u=2.252,
    section="B",
    d1_mm=180.0,
    eps_slip=0.01,
    load_class="light",
    motor_group="I",
    shifts=2,
)
belt

:::tip Not sure of the inputs? archee.calc.describe("vbelt") lists them with units. :::

Find the source

import archee

hits = archee.kb.search("bảng chọn tiết diện đai thang", limit=3)
[{"source": h.source, "page": h.printed_page, "text": h.text[:200]} for h in hits]

Pick parts for a shaft

import archee

d = 40
{
    "key": archee.standards.lookup("key", d=d),
    "bearings": archee.standards.lookup("bearing", d=d, type="deep_groove", all=1),
}

Check a drawing and share it

Upload the drawing in the web app first, or with archee.files.upload.

import archee

report = archee.verify.check("sheets/detail-a3.dxf", standard="TCVN")
link = archee.files.link("sheets/detail-a3.dxf")
{
    "passed": report.passed,
    "findings": [f.message for f in report.findings],
    "download": link.url,
}

Render a drawing

import archee

archee.draft.render("sheets/assembly-a0.dxf", "renders/assembly.png", dpi=150)
archee.files.link("renders/assembly.png").url

Change a design value safely

import archee

doc = archee.project.design("shafts.slow.d_mm")
archee.project.design_set("shafts.slow.d_mm", 45, expected_revision=doc.revision)

If someone changed the design since you read it, the write is refused instead of overwriting their change. Read it again and retry.

Hand off long work

import archee

run = archee.agent.run("Redraw the A3 detail of the slow shaft with the new diameter.")
run.run_id

Then, in a later call:

import archee
archee.runs.get("RUN_ID")