[FIX] Attribute der ILS Blöcke für 2d und 3d vereinheitlicht
This commit is contained in:
+6
-11
@@ -3,11 +3,9 @@
|
|||||||
;; Synchronisiert ATTDEF-Attribute in den ILS-Block-DWGs mit den
|
;; Synchronisiert ATTDEF-Attribute in den ILS-Block-DWGs mit den
|
||||||
;; Werten aus allocations.json.
|
;; Werten aus allocations.json.
|
||||||
;;
|
;;
|
||||||
;; Es wird zwischen data/ils/2D und data/ils/3D unterschieden: nach
|
;; Es wird die allocations.json aus data/ils gelesen
|
||||||
;; Auswahl des Verzeichnisses wird die dortige allocations.json
|
;; (data/ils/allocations.json) und anschliessend werden
|
||||||
;; gelesen (data/ils/<2D|3D>/allocations.json) und anschliessend
|
;; ausschliesslich die DWGs in genau diesem Verzeichnis bearbeitet.
|
||||||
;; werden ausschliesslich die DWGs in genau diesem Verzeichnis
|
|
||||||
;; bearbeitet.
|
|
||||||
;;
|
;;
|
||||||
;; Ablauf je JSON-Eintrag "Blockname": {"TAG": "Wert", ...}:
|
;; Ablauf je JSON-Eintrag "Blockname": {"TAG": "Wert", ...}:
|
||||||
;; - <Blockname>.dwg im selben Verzeichnis wie die JSON oeffnen
|
;; - <Blockname>.dwg im selben Verzeichnis wie die JSON oeffnen
|
||||||
@@ -28,7 +26,7 @@
|
|||||||
;; Voraussetzung: DXFM_DATA ist gesetzt (siehe bin/setenv.bat).
|
;; Voraussetzung: DXFM_DATA ist gesetzt (siehe bin/setenv.bat).
|
||||||
;;
|
;;
|
||||||
;; Aufruf in BricsCAD:
|
;; Aufruf in BricsCAD:
|
||||||
;; (load "C:/.../data/ils/2D/addattribute.lisp")
|
;; (load "C:/.../Lisp/addattribute.lsp")
|
||||||
;; ILS_ATTR_SYNC
|
;; ILS_ATTR_SYNC
|
||||||
;; ============================================================
|
;; ============================================================
|
||||||
|
|
||||||
@@ -157,7 +155,7 @@
|
|||||||
;; ------------------------------------------------------------
|
;; ------------------------------------------------------------
|
||||||
;; Hauptbefehl
|
;; Hauptbefehl
|
||||||
;; ------------------------------------------------------------
|
;; ------------------------------------------------------------
|
||||||
(defun c:ILS_ATTR_SYNC ( / data-dir json-pfad dwg-dir dwg-unterverz daten orig-doc anzahl-aktualisiert
|
(defun c:ILS_ATTR_SYNC ( / data-dir json-pfad dwg-dir daten orig-doc anzahl-aktualisiert
|
||||||
anzahl-unveraendert anzahl-fehler anzahl-fehlt eintrag blockname attribs
|
anzahl-unveraendert anzahl-fehler anzahl-fehlt eintrag blockname attribs
|
||||||
dwg-pfad bereits-offen fehler fehlende-liste name)
|
dwg-pfad bereits-offen fehler fehlende-liste name)
|
||||||
(setq data-dir (getenv "DXFM_DATA"))
|
(setq data-dir (getenv "DXFM_DATA"))
|
||||||
@@ -169,10 +167,7 @@
|
|||||||
)
|
)
|
||||||
(setq data-dir (vl-string-translate "\\" "/" data-dir))
|
(setq data-dir (vl-string-translate "\\" "/" data-dir))
|
||||||
|
|
||||||
(initget "2D 3D")
|
(setq dwg-dir (strcat data-dir "/ils")
|
||||||
(setq dwg-unterverz (getkword "\nDWG-Verzeichnis waehlen [2D/3D] <2D>: "))
|
|
||||||
(if (not dwg-unterverz) (setq dwg-unterverz "2D"))
|
|
||||||
(setq dwg-dir (strcat data-dir "/ils/" dwg-unterverz)
|
|
||||||
json-pfad (strcat dwg-dir "/allocations.json")
|
json-pfad (strcat dwg-dir "/allocations.json")
|
||||||
)
|
)
|
||||||
(if (not (findfile json-pfad))
|
(if (not (findfile json-pfad))
|
||||||
|
|||||||
@@ -6,9 +6,8 @@
|
|||||||
;; allocations.json (siehe addattribute.lsp):
|
;; allocations.json (siehe addattribute.lsp):
|
||||||
;; {"Blockname": {"TAG1": "Wert1", "TAG2": "Wert2", ...}, ...}
|
;; {"Blockname": {"TAG1": "Wert1", "TAG2": "Wert2", ...}, ...}
|
||||||
;;
|
;;
|
||||||
;; Wird zunaechst fuer data/ils/2D und data/ils/3D ausgefuehrt -
|
;; Wird fuer data/ils ausgefuehrt - es entsteht eine
|
||||||
;; je Verzeichnis entsteht eine eigene allocations_collected.json,
|
;; allocations_collected.json direkt in diesem Verzeichnis.
|
||||||
;; direkt im jeweiligen Verzeichnis abgelegt.
|
|
||||||
;;
|
;;
|
||||||
;; Voraussetzung: DXFM_DATA ist gesetzt (siehe bin/setenv.bat).
|
;; Voraussetzung: DXFM_DATA ist gesetzt (siehe bin/setenv.bat).
|
||||||
;;
|
;;
|
||||||
@@ -215,9 +214,9 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
;; ------------------------------------------------------------
|
;; ------------------------------------------------------------
|
||||||
;; Hauptbefehl - verarbeitet DXFM_DATA/ils/2D und DXFM_DATA/ils/3D
|
;; Hauptbefehl - verarbeitet DXFM_DATA/ils
|
||||||
;; ------------------------------------------------------------
|
;; ------------------------------------------------------------
|
||||||
(defun c:ILS_ATTR_COLLECT ( / data-dir basis-dir subverz dwg-dir json-pfad)
|
(defun c:ILS_ATTR_COLLECT ( / data-dir dwg-dir json-pfad)
|
||||||
(setq data-dir (getenv "DXFM_DATA"))
|
(setq data-dir (getenv "DXFM_DATA"))
|
||||||
(if (not data-dir)
|
(if (not data-dir)
|
||||||
(progn
|
(progn
|
||||||
@@ -226,16 +225,10 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(setq data-dir (vl-string-translate "\\" "/" data-dir)
|
(setq data-dir (vl-string-translate "\\" "/" data-dir)
|
||||||
basis-dir (strcat data-dir "/ils")
|
dwg-dir (strcat data-dir "/ils")
|
||||||
)
|
json-pfad (strcat dwg-dir "/allocations_collected.json")
|
||||||
|
|
||||||
(foreach subverz '("2D" "3D")
|
|
||||||
(setq dwg-dir (strcat basis-dir "/" subverz)
|
|
||||||
json-pfad (strcat dwg-dir "/allocations_collected.json")
|
|
||||||
)
|
|
||||||
(princ (strcat "\n[ATTR-COLLECT] === " subverz " ==="))
|
|
||||||
(cac-collect-directory dwg-dir json-pfad)
|
|
||||||
)
|
)
|
||||||
|
(cac-collect-directory dwg-dir json-pfad)
|
||||||
(princ)
|
(princ)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user