Add Connections to SSG_LIB, reusing the TRO mechanisms

A connection is a CONNECTION_ARROW block sitting at the midpoint of an arrow
between two TRO markers. It stores the relationship as attributes rather than by
position:

    TRO11  ---------->  TRO14
    UID 0062            UID 0065

Same architecture as the TRO feature, nothing new introduced:

  Blockname CONNECTION_*  ->  c:CONNECTION_EDIT (Lisp/Connection_Edit.lsp)
                          ->  dcl/connection_edit.dcl

The double-click and EATTEDIT hooks already route every INSERT through
SSG_BLOCKEDIT, so this is one more branch in that dispatcher - placed before the
TRO branch since both come from the same annotation run and the patterns must not
overlap. DCL path from DXFM_DCL, ssg-start/ssg-end, ssg-attrib-read and
ssg-attrib-set-on, all text via ssg-text/ssg-textf with 16 new keys in both
language files. Loading is lazy: not preloaded in the MNL, pulled by the menu
macros and the dispatcher with (ssg-ensure "Connection_Edit"), with a fallback to
native EATTEDIT if the module is missing.

CONNECTION_INSERT picks two TRO markers and draws the connection; the new
internal number comes from ssg-id-max/ssg-id-format, so it stays inside the
SSG_LIB number space. It refuses when the block definition is absent - the shape
comes from tro_annotate.py, this command does not invent one.

Menu: SSG_LIB > Connections with Verbindung einfuegen, Verbindung bearbeiten and
Bearbeiten (Auto), plus an entry in the POP501 edit context menu.

On the internal id: the markers keep their visible ID (TRO11) untouched - the
existing TRO_INSERT/tro-naechste-id read it and the request was explicit about
not changing it. The permanent unique number therefore lives in a separate
attribute UID, in the same four-digit space as ssg_id and the CSV TeileId.
Putting it into ID was tried and reverted: IDSCHECK treats ID as numeric and
would have overwritten TRO11 with a number while correcting duplicates.
Connections reference the UIDs, so the relationship survives a renamed or moved
marker.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-19 15:09:10 +02:00
parent dc2b0b8900
commit e91608d7cc
8 changed files with 1713 additions and 1343 deletions
+5 -3
View File
@@ -245,7 +245,7 @@
;; C:TRO_EDIT - Dialog fuer einen TRO-Marker
;; ------------------------------------------------------------
(defun c:TRO_EDIT ( / ss ent ed bname attribs
alt-id alt-type alt-fb
alt-id alt-type alt-fb int-id
neu-id neu-type
liste idx dcl-pfad dat ergebnis)
@@ -284,7 +284,8 @@
(setq attribs (ssg-attrib-read ent)
alt-id (cdr (assoc "ID" attribs))
alt-type (cdr (assoc "TYPE" attribs))
alt-fb (cdr (assoc "FB_BLOCK" attribs)))
alt-fb (cdr (assoc "FB_BLOCK" attribs))
int-id (cdr (assoc "UID" attribs)))
(if (null alt-id)
(progn
@@ -310,7 +311,8 @@
idx (tro-index alt-type liste))
(set_tile "blockname" (ssg-textf "tro-edit-block" (list bname)))
(set_tile "fb" (ssg-textf "tro-edit-fb" (list (if alt-fb alt-fb "-"))))
(set_tile "fb" (ssg-textf "tro-edit-fb"
(list (if alt-fb alt-fb "-") (if int-id int-id "-"))))
(set_tile "hinweis" (ssg-text "tro-edit-hinweis"))
(set_tile "id" alt-id)
(start_list "type")