This is a "Not Ready for Prime-time" routine I've been working on over the years.
Just thought I would share what I have so far to get feed back.
Started the routine in 2001 when my skills were poor. I purchased a routine (arx)
to do the work so I quit my own LISP but the purchased routine quit working when I
moved to ACAD2006 and a new computer recently. So I returned to this old lisp to try & add
some functionality to it.
It has a help button but most of the functions are obvious (to me).
;;; -=< D i a l o g O p t i o n s >=-
;;; Text Styles - Select a new style to use
;;; Previous Settings - Select previously used settings to update the dialog box
;;; Text Insert Angle - Angle text is inserted at
;;; [Pick Angle] - exist dialog to pick, enter or select object for new angle
;;; [ ] Pick Angle when adding - User must pick angle after picking the insert point
;;; [ ] Keep text upright - Will only change the angle from the [Pick Angle] button Object option
;;; Style Size - Display of current Text Style Size
;;; Text Size - User size choice : Only if style is zero can user change it
;;; [Pick Size] - exist dialog to pick, enter or select object for new text size
;;; Layer to use - Pick list of layers to use
;;; [ ] Use Current layer - When checked ignores pick list for layer
;;; [Pick Layer] - exit dialog box for user to select object for new layer
;;; Text Type to Insert - Chose Plain Text, Mtext or Mtext when more than one row is entered
;;; [Add text to Drawing] - exist dialog to add text
;;; [Update Text] - exit dialog box to Change existing text to match present settings
;;; [Combine Text] - exit dialog box to combine selected text to Mtext
;;; [Underline Text] - exit dialog to Underline selected existing text
;;; [Match Text Properties] - exit dialog box to select text to match properties
;;; [Help] - See this screen
The nice thing about the TextAdd function is that you do not need the dialog if you want to create
your own short cut buttons. Here are some examples:
;; *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
;; T e x t A d d C o m m a n d L i n e C a l l s
;; *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
(defun c:TextAddPickAngle ()
(TextAdd (list (list "Layer" (GetLay2Use))'("Pick" t)))
)
(defun c:TextAddFixedAngle ()
(TextAdd (list (list "Layer" (GetLay2Use)) '("Pick" nil)))
)
;; allow user to pick text to match properties & the add text to DWG [No DCL]
(defun c:txtMatchAdd()
(if (ttMatchProperty)
(TextAdd nil)
)
)
;| --==< TextAdd optional arguments >==--
Options is nil or a list of optional settings, example [Case Sensitive]
'(("Layer" "0") ("Size" 5.5))
"Layer" must be a valid layer name
"Style" must be a valid style name
"Size" real or integer
"Type" integer flag
0 = leave as plain text
1 = change to mtext is > 1 line of text
2 = change to mtext no matter what
"Pick" User to pick angle flag t or nil or "O" = Object Pick
"Angle" Forced Text angle in degrees and can be a string
|;
;; *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
====================================================================
I also have a Leader Routine and intend to marry the two when both are more bug resistant.
So you may see some code I dropped in that is for future use, and there are a lot of
global variables floating around that will get localized soon.
;;; DESCRIPTION:
;;; This is a typical Leader creation tool to allow the user to pick leader points and adjust
;;; the arrow head type and size as overrides. The leader routine is a lisp that is called
;;; with arguments that control the leader type, arrowhead and points allowed. This is similar
;;; to Qleader but with the added option to change the arrow head type & size.
;;; Initial settings are hard coded in the LISP & saved to the current drawing unless the current
;;; drawing has the values. If they exist they are loaded and defaults are ignored.
;;; In a future release I will add the text engine to complete the tool.
;;; ADD LEADER will allow user to place a leader using dialog settings.
;;; During the leader add process after the first point:
;;; + increment the arrow size by one
;;; - deincrement the arrow size by one
;;; TAB key for arrowhead DCL
;;; 6 key to change increment arrowhead type
;;; 4 key to change deincrement arrowhead type
;;; F8 key to toggle Ortho override
;;; F10 key to toggle Polar override
;;; S key to run Dialog for Settings
;;; SAVE will store dialog settings in current session in the current drawing.
;;; CANCEL will exit without saving any changes in settings.
;;; MATCH will allow user to select a leader & updates dialog settings.
;;; UPDATE will allow user to select a leader & updates the leader settings.
;;; [Leader Type] pick list overrides the Dim Style Leader
;;; [Arrow Head] pick list overrides the Dim Style Arrow
;;; [ ] Use Current Dim Style - when unchecked will use the Dim Style in the pick list.
;;; [ ] Use Dim Style Size - uses DimASZ times DimScale, Actual size is displayed.
;;; User Arrow Size Override - Enter actual size desired.
;;; [ ] Use Current Layer - when unchecked will use the Layer in the pick list.
;;; [ ] Layer Filter will filter the layer selection available to the user.