Skip to content

v3.1.5

Choose a tag to compare

@ArthurkaX ArthurkaX released this 12 Sep 13:33
· 443 commits to main since this release

cts visu bind splits "draw" from "wire signals":

  • New offline subcommand: cts visu bind --svg <sketch> --elem N [--var|--text-var|--tap|--toggle|--color|--action NAME] [--clear] patches only the binding data-* attributes on one already-drawn SVG element — geometry, fill, stroke and gradients are structurally untouched, and passing a flag the element type doesn't support (e.g. --tap on a lamp) is refused.
  • cts visu --help is now a two-phase workflow: PHASE 1 draws (small steps: add an element, preview, lint, repeat, then from-svg --create-screen), PHASE 2 wires signals (bind, then from-svg --replace --gvl to recompile in place). The top-level cts --help nudges the same split.
  • cts visu lint findings for unbound buttons/textfields/lamps and static-looking text now name cts visu bind directly instead of only describing the problem.

Gradient fills and light/dark colour schemes for from-svg:

  • <linearGradient>/<radialGradient> in <defs>, referenced via fill="url(#id)" on rect/circle/ellipse, compile to CODESYS's native gradient fill (two colour stops, angle from the SVG vector, stop-opacity as the alpha byte). Round-trips through to-svg as well.
  • --scheme light|dark (also data-cds-scheme recorded by cts visu new) resolves the stylesheet's CSS-variable palette against either scheme for preview/lint/from-svg.

.visu/ becomes the default sketch folder:

  • cts visu new with no --out now writes into .visu/ (auto-created) instead of the current directory, so sketch .svg/.preview.svg/.preview.png scratch files stop cluttering the project root; preview/lint/from-svg follow the sketch's own location automatically.
  • .visu/ was added to the CODESYS-host options dialog's recommended .gitignore entries.

Clearer guidance for cts import's modal dialog and daemon timeouts:

  • cts import --help and the top-level cts --help now spell out that creating/replacing a native object (a screen, a POU, ...) commonly pops a CODESYS confirmation dialog, that the daemon is single-threaded so a stuck dialog stalls every other command including cts ping, and that killing the CLI does not cancel the operation — check cts status/cts compare instead of blind-retrying.
  • cts visu-lint --help (the compiled-XML validator) now distinguishes itself from cts visu lint (the SVG-sketch validator) by name.

cts docs produces compact documentation instead of a source dump:

  • The generator no longer walks the whole CODESYS installation tree and no longer emits raw source text. It now documents the project's own POUs and only the libraries the project actually references, each as symbol + description + interface table.
  • Referenced libraries are read from the exported Library Manager objects (project-view/**/Library Manager.xml). Every manager is read and merged — a project typically has more than one (application plus visualization), and reading only one silently loses libraries.
  • Library descriptions and interfaces come from the installed LibDoc trees under C:\ProgramData\CODESYS\LibDoc. The Scope column there is emitted with rowspan over a group of rows, so the parser carries the last seen scope forward; without that, parameters quietly land in the wrong scope.
  • Unresolved references are reported, not worked around: a referenced library with no LibDoc on the machine is listed under Missing LibDoc rather than resolved to some other version. Installed-but-unreferenced libraries are listed by name only, with an explicit note that adding one is a user action in the IDE.
  • Breaking: bundle.md is gone (a stale copy is deleted on the next run) and symbols.jsonl changed from one record per file to one record per symbol: {source, library, version, kind, name, path, line, description, interface}. manifest.json is now format: "cts-docs/v2" with symbol-level counts and libraries_missing.
  • The daemon endpoint generate_docs was a full IronPython 2.7 mirror of the old generator, kept format-compatible by hand. It is now a sync-folder resolver only; generation always runs locally in CPython.
  • Fixed two rendering nuances: triple-slash (///) doc comments no longer leave a leading / in the rendered description, and project FUNCTION/METHOD/PROPERTY declarations now get a leading Return row in the interface table, matching how library functions are documented.

Sync-folder setup is now agent-controllable:

  • cts set-sync-folder [PATH] [--save] writes the active project's cds-sync-folder property through the daemon. Omitting PATH automatically selects the saved project directory (.); relative paths (sync, ./sync, ../sync) use that directory, while fully qualified absolute paths are accepted directly.
  • The response reports both stored and resolved paths and calls out unsaved project state. --save persists the setting, with the same warning as import that saving also commits other pending IDE edits.

Consistent project-relative sync directories (GH #65):

  • ../sync and ./../sync now select the same absolute directory in daemon operations, legacy menus, external UI, project discovery and snapshooter settings/logs. Previously some consumers used the process working directory, potentially missing the intended Text-first settings.
  • All consumers share the saved-project path lookup, including FullName/filename fallbacks and Unicode paths. Relative folders require an absolute saved project path; fully qualified drive and UNC paths work without a saved project.
  • Ambiguous Windows paths (D:sync, D:, \sync) are rejected explicitly, independent of Python's version-dependent isabs behavior. Menu and CLI validation happens before updating project properties.