Repository navigation
v3.1.5
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 bindingdata-*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.--tapon a lamp) is refused. cts visu --helpis now a two-phase workflow: PHASE 1 draws (small steps: add an element,preview,lint, repeat, thenfrom-svg --create-screen), PHASE 2 wires signals (bind, thenfrom-svg --replace --gvlto recompile in place). The top-levelcts --helpnudges the same split.cts visu lintfindings for unbound buttons/textfields/lamps and static-looking text now namects visu binddirectly instead of only describing the problem.
Gradient fills and light/dark colour schemes for from-svg:
<linearGradient>/<radialGradient>in<defs>, referenced viafill="url(#id)"onrect/circle/ellipse, compile to CODESYS's native gradient fill (two colour stops, angle from the SVG vector,stop-opacityas the alpha byte). Round-trips throughto-svgas well.--scheme light|dark(alsodata-cds-schemerecorded bycts 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 newwith no--outnow writes into.visu/(auto-created) instead of the current directory, so sketch.svg/.preview.svg/.preview.pngscratch files stop cluttering the project root;preview/lint/from-svgfollow the sketch's own location automatically..visu/was added to the CODESYS-host options dialog's recommended.gitignoreentries.
Clearer guidance for cts import's modal dialog and daemon timeouts:
cts import --helpand the top-levelcts --helpnow 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 includingcts ping, and that killing the CLI does not cancel the operation — checkcts status/cts compareinstead of blind-retrying.cts visu-lint --help(the compiled-XML validator) now distinguishes itself fromcts 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. TheScopecolumn there is emitted withrowspanover 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.mdis gone (a stale copy is deleted on the next run) andsymbols.jsonlchanged from one record per file to one record per symbol:{source, library, version, kind, name, path, line, description, interface}.manifest.jsonis nowformat: "cts-docs/v2"with symbol-level counts andlibraries_missing. - The daemon endpoint
generate_docswas 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 projectFUNCTION/METHOD/PROPERTYdeclarations now get a leadingReturnrow 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'scds-sync-folderproperty through the daemon. OmittingPATHautomatically 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.
--savepersists the setting, with the same warning as import that saving also commits other pending IDE edits.
Consistent project-relative sync directories (GH #65):
../syncand./../syncnow 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/filenamefallbacks 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-dependentisabsbehavior. Menu and CLI validation happens before updating project properties.