pete
/
psc
1
0
Fork 0

CHANGE KEY NAMES AT GUARD XDATA TO ACCOMODATE FAB DRAWINGS

- the following keys have been changed:
  guard_str -> number
  guard_lvl -> level
  guard_seq -> sequence
  guard_fin -> finish
  guard_ass -> assembly
master
Dennis Dreischmeyer 3 months ago
parent 54949aa34b
commit c6597ab013

@ -8,7 +8,7 @@
(setq
3d-p T
def (calc-guard-rail dat)
blk (p-blk (xd-value "guard_ass" dat))
blk (p-blk (xd-value "assembly" dat))
) ;_ setq
(add-calcd-objs blk T def)
(setq blk (insert-block modelSpace ins blk))

@ -629,7 +629,7 @@
'(lambda (def / loc side 3d-p)
(setq loc (xd-value "location" def) side (substr loc 1 1) 3d-p T)
(3dr-add
(xd-value "guard_ass" def)
(xd-value "assembly" def)
(list
(calc-stair-guard-ins '3d def)
(calc-guard-rail def)

@ -191,7 +191,7 @@ Sets box value to ERR if left blank"
(if (setq value (edit-box-val key))
(set_tile key (to-string value))
;; allow comment and sequence to be nil
(if (member key '("comment" "sequence" "guard_seq" "guard_com"))
(if (member key '("comment" "sequence"))
(set_tile key "")
(set_tile key "ERR")))
value)

@ -2,7 +2,7 @@
;;; keys not present in the dialog, but calcuated and added to the block
(setq guard-derived-keys
'( "version"
"guard_ass"
"assembly"
) ;_ quoted-list
) ;_ setq
@ -15,8 +15,8 @@
(add-to-list 'ret (list key val))
) ;_ defun add
(add "version" guard-version)
(add "guard_ass"
(strcat "GR" guard_str "-" guard_lvl (to-string guard_seq))
(add "assembly"
(strcat "GR" number "-" level (to-string sequence))
) ;_ add
(append! 'data (vl-sort ret sort-data-by-key))
) ;_ defun inner

@ -175,9 +175,9 @@
(if (null guard-dat-val)
(setq guard-dat-val
(list
'("guard_str" "1")
'("guard_lvl" "1")
'("guard_seq" "A")
'("number" "1")
'("level" "1")
'("sequence" "A")
'("guard_lng" "36.0")
'("guard_hgt" "42.75")
@ -186,7 +186,7 @@
'("guard_sty" "210 (6-Line)")
'("guard_hand" "0")
'("guard_kick" "1")
'("guard_fin" "Rodda Barrier III Red Oxide")
'("finish" "Rodda Barrier III Red Oxide")
'("guard_com" "")
'("lpost_con" "041 KB-TZ ANCH.")
@ -240,7 +240,7 @@
) ;_ list
tog-lst
(list
'("tog_str" "guard_str") '("tog_lvl" "guard_lvl") '("tog_seq" "guard_seq") '("tog_fin" "guard_fin")
'("tog_str" "number") '("tog_lvl" "level") '("tog_seq" "sequence") '("tog_fin" "finish")
'("tog_lng" "guard_lng") '("tog_hgt" "guard_hgt") '("tog_qty" "guard_qty") '("tog_com" "guard_com")
'("tog_hrlc" "hrl_con") '("tog_hrlg" "hrl_gap") '("tog_hrlo" "hrl_off") '("tog_hrla" "hrl_ang")
'("tog_hrrc" "hrr_con") '("tog_hrrg" "hrr_gap") '("tog_hrro" "hrr_off") '("tog_hrra" "hrr_ang")
@ -250,7 +250,7 @@
'("tog_rcon" "rpost_con") '("tog_rtab" "rpost_tab") '("tog_rext" "rpost_txt" "rpost_ext")
) ;_ list
;;; edit boxes (get_tile)
plain-string-keys (list "guard_str" "guard_lvl" "guard_seq" "guard_com")
plain-string-keys (list "number" "level" "sequence" "guard_com")
;;; edit boxes (safe-atoi)
int-keys (list "guard_qty")
;;; edit boxes (distof)
@ -280,7 +280,7 @@
popup-keys
(list
(cons "guard_sty" sty-lst)
(cons "guard_fin" finishes)
(cons "finish" finishes)
(cons "lpost_con" dtl-lst)
(cons "mpost_con" dtl-lst)
(cons "rpost_con" dtl-lst)
@ -296,7 +296,7 @@
(con-lst '(hr-ret-formatting "hrl_con" "hrr_con"))
(con-lst '(post-auto-fill "lpost_ext" "lpost_tab"))
(con-lst '(post-handling "mpost_con" "rpost_con"))
(con-lst '(force-uppercase "guard_str" "guard_lvl" "guard_seq"))
(con-lst '(force-uppercase "number" "level" "sequence"))
(con-lst (cons 'multi-tog-handling (cddr toggle-keys)))
) ;_ append
) ;_ setq

@ -66,7 +66,7 @@
(add-rail-tag
(list x-off y-off)
'MiddleCenter
(strcat "GR" guard_str "-" guard_lvl (to-string guard_seq))
(strcat "GR" number "-" level (to-string sequence))
) ;_ add-rail-tag
) ;_ add-to-list
(mapcar
@ -76,7 +76,7 @@
) ;_ defun g-text
(setq lay (getvar "clayer"))
(with-data dat
'( (setq blk (p-blk guard_ass))
'( (setq blk (p-blk assembly))
(g-post 'dcl guard_lng)
(g-text)
(if (= "1" guard_hand) (g-hand))
@ -893,15 +893,15 @@
(#!
'(
("app_id" "Guard")
("guard_fin" #finish)
("finish" #finish)
("guard_hand" "0")
("guard_hgt" #hgt)
("guard_kick" "0")
("guard_lng" #lng)
("guard_lvl" #level)
("level" #level)
("guard_qty" 1)
("guard_seq" #(strcat #sequence #num))
("guard_str" #number)
("sequence" #(strcat #sequence #num))
("number" #number)
("guard_sty" #rail_style)
("hrl_con" "X17 None")
("hrl_off" -0.3125)

@ -1,16 +1,16 @@
DD_GUARD
: dialog { // DD_GUARD
label = "Guardrail Design / Edit"; // initial_focus = "guard_str";
label = "Guardrail Design / Edit"; // initial_focus = "number";
: row { // Name, Options, Finish, HR Left, HR Right
: column {
: row {
: boxed_column { // Name Column
key = "Name"; label = "&Name";
width = 25; fixed_width = true;
: column { // guard_str guard_lvl guard_seq
: edit_box {label = "Stair"; key = "guard_str"; edit_width = 6;}
: edit_box {label = "Level"; key = "guard_lvl"; edit_width = 6;}
: edit_box {label = "Sequence"; key = "guard_seq"; edit_width = 6;}
: column { // number level sequence
: edit_box {label = "Stair"; key = "number"; edit_width = 6;}
: edit_box {label = "Level"; key = "level"; edit_width = 6;}
: edit_box {label = "Sequence"; key = "sequence"; edit_width = 6;}
}
}
: boxed_column { // Options Column
@ -31,7 +31,7 @@
}
: row { // Finish Dropdown
: text {label = " &Finish";}
: popup_list {key = "guard_fin"; width = 45;}
: popup_list {key = "finish"; width = 45;}
}
}
: boxed_column { // Left HRet
@ -133,11 +133,11 @@
: toggle {key = "tog_lvl";}
: toggle {key = "tog_seq";}
}
: column { // guard_str guard_lvl guard_seq
: column { // number level sequence
width = 21; fixed_width = true;
: edit_box {label = "Stair"; key = "guard_str"; edit_width = 6;}
: edit_box {label = "Level"; key = "guard_lvl"; edit_width = 6;}
: edit_box {label = "Sequence"; key = "guard_seq"; edit_width = 6;}
: edit_box {label = "Stair"; key = "number"; edit_width = 6;}
: edit_box {label = "Level"; key = "level"; edit_width = 6;}
: edit_box {label = "Sequence"; key = "sequence"; edit_width = 6;}
}
}
}
@ -169,7 +169,7 @@
spacer_1;
: toggle {key = "tog_fin";}
: text {label = "&Finish";}
: popup_list {key = "guard_fin"; width = 42;}
: popup_list {key = "finish"; width = 42;}
}
}
: boxed_column { // Left HRet

@ -1,6 +1,6 @@
;;; Functions to update the guard XDATA specification over time
(setq guard-version 2)
(setq guard-version 3)
;;; derived-key only migrations: NONE
@ -26,3 +26,16 @@
(add-to-list 'data (list "guard_com" ""))
data
) ;_ defun guard-migration-2
(defun guard-migration-3 (data)
(map-apply
'(lambda (old new)
(subst! (list new (xd-value old data)) (assoc old data) 'data)
) ;_ lambda
'( ("guard_str" "number") ("guard_lvl" "level")
("guard_seq" "sequence") ("guard_fin" "finish")
("guard_ass" "assembly")
) ;_ list
) ;_ map-apply
data
) ;_ guard-migration-3

Loading…
Cancel
Save