;;========================================================================
;| #lib.
kdub:getString (<Promptmsg><Default><InitBit><AllowSpaces>)
kwb 20021103
Revised Library : kwb 20051031
20051101 kwb : ESC test added.
Build 2.0 :
(SETQ tmpVal (kdub:getString "Lot Description" nil (+ 1 ) T))
(SETQ tmpVal (kdub:getString "Name" "Me" (+ 1 ) Nil))
(SETQ tmpVal (kdub:getString nil nil nil Nil))
|;
default ; Value to return if response is <blockinsertter>
initbit ; Initget bit
allowspaces ; spaces Flag < T or nil )
;
/ returnvalue
)
;;------------------------------
;;------------------------------
("Specify String Value")
)
)
)
;;------------------------------
(if (and default
(= (type default
) 'str
) (/= default
"")) promptmsg
(strcat "\n" promptmsg
" << " default
" >>: ") )
(list allowspaces promptmsg
) )
)
)
;; ESC was pressed.
default nil
)
)
(setq returnvalue
(if (= returnvalue
"") default
returnvalue
)
)
)
;; Else no default, so don't accept blockinsertTER or SPACEBAR
;;
(list allowspaces promptmsg
) )
)
)
)
;;
(list allowspaces promptmsg
) )
)
)
;; ESC was pressed.
)
)
)
;;------------------------------
returnvalue
)
;;========================================================================
;;;------------------------------------------------------------------
;;;------------------------------------------------------------------
;;;
(defun getattributes
(objselection
) (if (= (type objselection
) 'ename
) )
)
)
)
)
)
;;;------------------------------------------------------------------
;;;------------------------------------------------------------------
;;;
;| KDUB:GetAttributeList
< BlockRef > [VLA-OBJECT]
Description: Read all attribute values from a block.
Return [Typ]:
==> [Dot-list ] '(("tagstring1" . "textstring1")...) [LIST]
or ==>nil
Remarks:
N/a
Dependencies:
N/a
revised kdub 2003 for ac2004|;
| ;
(defun kdub:getattributelist
(blockref
/ catchit returnval
) (if (= (type blockref
) 'ename
) )
(list blockref 'getattributes
) )
)
)
;; else
)
)
catchit
)
)
)
returnval
)
;;;------------------------------------------------------------------
;;;------------------------------------------------------------------
;;;
;| KDUB:KDUB:SetAttributes
< BlockRef > [VLA-OBJECT]
< DotList > [Dot-list ] '(("tagstring1" . "textstring1")...)
Description: Set attribute values to a block.
Return [Typ]:
==>nil
Remarks:
N/a
Dependencies:
N/a
revised kdub 2003 for ac2004|;
| ;
;;;------------------------------------------------------------------
;;;------------------------------------------------------------------
;;;
(defun kdub:setattributes
(blockref dotlist
/ catchit attval
) (if (= (type blockref
) 'ename
) )
(list blockref 'getattributes
) )
)
)
;; else
dotlist
)
)
)
)
)
catchit
)
)
)
)
;;;------------------------------------------------------------------
;;;------------------------------------------------------------------