Code Red > AutoLISP (Vanilla / Visual)

arc dimension lisp question?

(1/5) > >>

ELOQUINTET:
hey guys i have this lisp for dimensioning an arc. the problem is that the units are decimal and i need them to be fractional. what variable do i change in here for this to happen? oh yeah if i don't want it to create and put this dim on dim layer do i just need to omit the part before:

thanks

dan



--- Code: --- ;; Save and get information from user
(defun dtr (x)
  (setq la (getvar "CLAYER")                           ;Save current layer
  );setq

 ;;Create the layer dim
  (command "_layer" "make" "dim" ""            ;Make the layer
                    "_layer" "s" "dim" ""                   ;Set layer
                    "_layer" "c" "magenta" "" "")      ;Set color to red
 
       (defun dtr (x)
        (* pi (/ x 180.00))
        )
       
        (defun rtd (y)
        (/ (* 180 y) pi)
        )
       
       (defun right ()
         (setq ang1 (angle ep cen)
              ang2 (angle ep1 cen)
              ang (- ang1 ang2)
              arclen (abs(* rad ang))
         )
        )
       
        (defun left ()
        (setq ang (- a1 a2))
        (setq arclen (abs(* rad ang)))
        )

;_______________________________________________________________________        

        (defun C:arcdim (/ ang1 ang2 ang arclen rad pick_pt pick_ang
        cen pick_pt extpt1 extpt2 extpt3 extpt4 ep a1 a2 ep1 e6 e7 ent4 temp_pt1
        temp_pt2 temp_pt3 temp_pt4 e1 e2 e3 e4 text_ang th txt1 txt e5 ep1a epa
        ep1a1 epa1 search type)
       
        (setvar "cmdecho" 0)
        (setq cn (entsel "\nSelect arc to dimension: "))
        (setq dn (car cn))
        (setq aw (entget dn))
        (setq type (cdr(assoc 0 aw)))
     (if (= type "ARC")
          (progn
        (setq a1 (cdr (assoc 50 aw)))
        (setq a2 (cdr (assoc 51 aw)))
        (setq cen (cdr (assoc 10 aw))
              rad (cdr (assoc 40 aw)))
        (setq ep (polar cen (cdr (assoc 50 aw)) rad)
              ep1 (polar cen (cdr (assoc 51 aw)) rad))
                  (if (< a1 a2) (left)
                      (right)
                   )
         (prompt "\nEnter dimension location: ")
         (command "dim" "angular" "" cen ep ep1 pause (rtos arclen) pause "exit")
 
            )
        (prompt "\nThe Selected entity was not an arc ")
    )
    (setvar "clayer" "0")
    (setvar "cmdecho" 1)
   
  ;;Reset the current layer
  (command "_.LAYER" "_S" la "")

                         (princ)
)
--- End code ---

t-bear:
Don't know how to "fix" yours but here's a routine that I use.  Written by Bill Farmer and dims to fractions by Trev....


--- Code: ---; ARCDIM.LSP Arc Length (c)2000, Created by Bill Farmer
;Thanks to "Trev" from the CADalog forum for the fractional conversions

;; startup function
(defun START ()
(UNDO_CHK)
(setq SYSVARS (mapcar '(lambda (A B) (setq VAR (getvar A)) (setvar A B) (list A VAR))
'("cmdecho" "osmode")
'(0 512)
) ;_ end of mapcar
) ;_ end of setq
;; save the existing error handler and substitute mine
(setq OLD_ERROR *ERROR*
*ERROR* MY_ERR
) ;_ end of setq
) ;_ end of defun

;;check undo function
(defun UNDO_CHK (/ CMDE)
(setq CMDE (getvar "cmdecho"))
(setvar "cmdecho" 0)
(if (< (setq UNDOVAR (getvar "undoctl")) 5)
(cond ((= UNDOVAR 0) (command "_.undo" "_A"))
((= UNDOVAR 4) (command "_.undo" "_C" "_A"))
) ;_ end of cond
) ;_ end of if
(command "_.undo" "_end")
(if (wcmatch (getvar "ACADVER") "13*")
(command "_.undo" "_BEGIN")
(command "_.undo" "_GROUP")
) ;_ end of if
(setvar "cmdecho" CMDE)
) ;_ end of defun

;;Error handling
(defun MY_ERR (S)
(if (not (member S '("Function cancelled" "console break")))
(princ (strcat "\nError: " S))
) ;_ end of if
(FINISH)
) ;_ end of defun
(defun ABORT (MSG)
(if MSG
(alert (strcat "Application error: [name of lsp that is running]\n\n" MSG " \n"))
) ;_ end of if
(FINISH)
(exit)
) ;_ end of defun
(defun FINISH ()
(command "_.undo" "_END")
(if (< UNDOVAR 5)
(cond ((= UNDOVAR 0) (command "_.undo" "_C" "_N"))
((= UNDOVAR 4) (command "_.undo" "_C" "_0"))
) ;_ end of cond
) ;_ end of if
(if SYSVARS
(foreach VAR SYSVARS (apply 'setvar VAR))
) ;_ end of if
(if OLD_ERROR
(setq *ERROR* OLD_ERROR
MY_ERR NIL
OLD_ERROR NIL
) ;_ end of setq
) ;_ end of if
(setq SYSVARS NIL
UNDOVAR NIL
) ;_ end of setq
(princ)
) ;_ end of defun

;; calculates arc length
(defun ARCL ()
(setq ENAME (entsel))
(setq ELIST (entget (car ENAME)))
(setq RAD (cdr (assoc '40 ELIST))) ;RADIUS
(cond ;;get arc info from a segment of a circle
((equal "CIRCLE" (cdr (assoc '0 ELIST)))
(princ "\nDimensioning an Arc from a segment of a Circle!")
(princ " Arc end points MUST BE PICKED in a COUNTERCLOCKWISE Direction!")
(setq CTR (cdr (assoc '10 ELIST))) ;Center Pt
(setq P1 (getpoint "\nPick 1st Arc End Point: ") ;1st point
P2 (getpoint "\nPick 2nd Arc End Point: ") ;2nd point
) ;_ end of SETQ
(setq 1STA (angle CTR P1)) ;Calculates 1st ANGLE
(setq 2NDA (angle CTR P2)) ;Calculates 2nd ANGLE
(if (< 1STA 2NDA)
(progn (setq RANG (- 2NDA 1STA)) ;ANGLE IN RADIANS
(setq ARL (* RAD RANG)) ;ARC LENGTH
(setq CARL (* RAD (+ (* 2 pi) (- 1STA 2NDA))))
;COMPLIMENTARY ARC LENGTH
) ;_ end of progn
(progn (setq RANG (+ (* 2 pi) (- 2NDA 1STA))) ;ANGLE IN RADIANS
(setq ARL (* RAD RANG)) ;ARC LENGTH
(setq CARL (* RAD (- 1STA 2NDA))) ;COMPLIMENTARY ARC LENGTH
) ;_ end of progn
) ;_ end of IF
)
;;get arc info from an entire arc
((equal "ARC" (cdr (assoc '0 ELIST)))
(initget "All Part")
(setq ASK (getkword "\nDimension All or Part of Arc? P/<A> "))
(cond ((or (= ASK "All") (= ASK NIL))
(setq 1STA (cdr (assoc '50 ELIST))) ;1st ANGLE
(setq 2NDA (cdr (assoc '51 ELIST))) ;2nd ANGLE
)
;; end all of arc
;;get arc info from segment of an arc
((= ASK "Part")
(setq CTR (cdr (assoc '10 ELIST))) ;Center Pt
(setq P1 (getpoint "\nPick 1st Arc End Point: ")) ;1st point
(setq P2 (getpoint "\nPick 2nd Arc End Point: ")) ;2nd point
(setq 1STA (angle CTR P1)) ;Calculates 1st ANGLE
(setq 2NDA (angle CTR P2)) ;Calculates 2nd ANGLE
)
;;end part of arc
) ;_ end of cond
(if (< 1STA 2NDA)
(setq RANG (- 2NDA 1STA)) ;ANGLE IN RADIANS
(setq RANG (+ (* 2 pi) (- 2NDA 1STA))) ;ANGLE IN RADIANS
) ;_ end of IF
(setq ARL (* RAD RANG)) ;ARC LENGTH
)
;;end arc info
) ;_ end of cond
;;end cond
) ;_ end of defun


(defun C:ARCDIMS ()
(START)
(setvar "lunits" 5) ;set to Fractional units
(setq DIMMODE (getvar "lunits")) ;UNITS
(setq DECPLS (getvar "dimdec")) ;DIMENSION DECIMAL PLACES
(ARCL)
(setq ARLT (rtos ARL DIMMODE DECPLS)) ;CONVERTS VALUE TO STRING
(if (/= CARL NIL)
(setq CARLT (rtos CARL DIMMODE DECPLS)) ;CONVERTS VALUE TO STRING
) ;_ end of if
(cond ((equal "CIRCLE" (cdr (assoc '0 ELIST)))
(initget "Yes No")
(setq YESNO (getkword "\nDimension Complimentary Angle y/<N>? "))
(if (or (= YESNO "No") (= YESNO NIL))
(command "_.dim" "_.ang" "" CTR P1 P2 "_T" ARLT PAUSE "" "_.e")
(progn ;text position for complimentary dim
(setq TXTPOS (getpoint "\nPick Text Position.. "))
;dim compimentary arc segment
(command "_.dim" "_.ang" "" CTR P1 P2 "_T" CARLT TXTPOS "" "_.e")
) ;_ end of progn
) ;_ end of if
)
;;end circle/arc dim
((equal "ARC" (cdr (assoc '0 ELIST)))
(if (= ASK "Part")
(command "_.dim" "_.ang" "" CTR P1 P2 "_T" ARLT PAUSE "" "_.e")
;dim arc segment
(command "_.dim" "_.ang" ENAME "_T" ARLT PAUSE "" "_.e") ;dim entire arc
) ;_ end of if
)
;;end arc dim
) ;_ end of cond
;; end cond
(if (equal "CIRCLE" (cdr (assoc '0 ELIST))) ;complimentary arc length display
(if (= YESNO "Yes")
(princ (strcat "\nComplimentary Arc Length = " (rtos ARL DIMMODE DECPLS)))
(princ (strcat "\nComplimentary Arc Length = " (rtos CARL DIMMODE DECPLS)))
) ;_ end of if
) ;_ end of if
(setvar "lunits" 2) ;set to Decimal units
(setq A NIL ;clear variables
B NIL
ARL NIL
CARL NIL
YESNO NIL
ENAME NIL
ELIST NIL
DECPLS NIL
DIMMODE NIL
RANG NIL
RAD NIL
1STA NIL
2NDA NIL
P1 NIL
P2 NIL
ARLT NIL
ASK NIL
CTR NIL
TXTPOS NIL
OL_OSMODE NIL
) ;_ end of setq
(FINISH)
(princ)
) ;_ end of defun


(princ "\nDimensions True Length of an arc. ArcDim Ver 2.5 by Bill Farmer - The CADL Co.")
(princ "\nType ArcDims")
(princ)
--- End code ---


You might be able to use parts of it to rework yours.  If so, I'd appreciate it if you'd post it here.....

daron:
Dan, this is beating a dead horse, but when posting code, it helps me (us) to read it easier if you encapsulate it in the [code] tag. This will also keep it formatted if you happen to have it formatted. All you have to do is hit the code button before pasting your code and hit it again when you're done. That or you could type [code](code here)[/code], just like that. You could also paste your code, highlight it and hit the code button one time. Any of these ways will make the code easier to read for the rest of us. I edited your code to have the code tag.

Mark:
One more thing, if you are using IE _and_ the subSilver style you can dbl click in the _code_ block and it copies it to the clipboard. Thanks to Se7en.

Keith™:
Ok, here is one I put together a while back. I am not sure if it is exactly what you are looking for, but I have created several new variables that are stored in the acad.cfg file. It requires the use of a DCL file in the support path.

Let me know how this works for you...

DIMARC.LSP file


--- Code: ---
(defun C:Dimarc( / gotobj sset1 sset2 beginpoint endpoint centerpoint wpnts1 wpnts2 beginangle endangle)
 (setq oce (getvar "cmdecho"))
 (setvar "cmdecho" 0)
 (setq dcl_id(load_dialog "Dimarc"))
 ;(setcfg "AppData/BCI/Dimarczin" "8") ;zero suppression
 (if (or (= "" (getcfg "AppData/BCI/Dimarclfac"))
         (= nil (getcfg "AppData/BCI/Dimarclfac"))
     )
   (setcfg "AppData/BCI/Dimarclfac" (rtos (getvar "dimlfac") 2 8)) ;linear scale factor
 )
 (setq Dimarclfac (getcfg "Appdata/BCI/Dimarclfac"))
 (if (or (= "" (getcfg "AppData/BCI/Dimarclunit"))
(= nil (getcfg "AppData/BCI/Dimarclunit"))
     )
  (setcfg "AppData/BCI/Dimarclunit" (rtos (getvar "lunits") 2 0)) ;units
 )
 (setq Dimarclunit (getcfg "Appdata/BCI/Dimarclunit"))
 (if (or (= "" (getcfg "AppData/BCI/Dimarcdec"))
(= nil (getcfg "AppData/BCI/Dimarcdec"))
     )
   (setcfg "AppData/BCI/Dimarcdec" (rtos (getvar "luprec") 2 0)) ;precision
 )
 (setq Dimarcdec (getcfg "Appdata/BCI/Dimarcdec"))
 (if (or (= "" (getcfg "AppData/BCI/Dimarcpost"))
(= nil (getcfg "AppData/BCI/Dimarcpost"))
     )
  (progn
   (setcfg "AppData/BCI/Dimarcpost" "<>") ;prefix<>suffix
   (setq prefix ""
suffix ""
   )
  )
  (parse_dimarcpost (getcfg "AppData/BCI/Dimarcpost"))
 );if
 (while (not gotobj)
   (initget "Settings Chord")
   (setq b (entsel "\nSelect arc or [Settings/Chord]: "))
   (cond
     ((= b "Settings")
       (progn
         (new_dialog "specs" dcl_id)
         (set_all_tiles)
         (action_tile "Dimarclunit" "(read_all_tiles)")
         (action_tile "Dimarcdec"   "(read_all_tiles)")
         (action_tile "Dimarclfac"  "(read_all_tiles)")
         (action_tile "Dimarcpre"   "(read_all_tiles)")
         (action_tile "Dimarcsuf"   "(read_all_tiles)")
         (if (= 1 (start_dialog))
          (save_dimarc_cfg)
         )
       )
     )
     ((= b "Chord")
       (progn
(while (not (and sset1 sset2))
  (setq BeginPoint (getpoint "\nSelect start point: "))
  (setq EndPoint (getpoint "\nEnd point: "))
  (setq WPnts1 (list (polar BeginPoint 0 0.2)(polar BeginPoint 1.5708 0.2)(polar BeginPoint pi 0.2)))
  (setq WPnts2 (list (polar EndPoint 0 0.2)(polar EndPoint 1.5708 0.2)(polar EndPoint pi 0.2)))
           (setq sset1 (ssget "CP" WPnts1 '((0 . "arc"))))
           (setq sset2 (ssget "CP" WPnts2 '((0 . "arc"))))
  (if (and sset1 sset2)
    (progn
      (if (not(equal (ssname sset1 0)(ssname sset2 0)))
(progn
  (princ "\nSelected points are not on the same arc!")
  (setq sset1 nil sset2 nil)
)
            (progn
          (setq a (entget (ssname sset1 0)))
                   (setq CenterPoint (cdr (assoc 10 a)))
  (if (and (< (cdr (assoc 51 a))(cdr (assoc 50 a)))
   (< pi (-(angle CenterPoint EndPoint)(angle CenterPoint BeginPoint)))
      )
    (setq EndAngle (min (angle CenterPoint EndPoint)(angle CenterPoint BeginPoint))
  BeginAngle (max (angle CenterPoint EndPoint)(angle CenterPoint BeginPoint))
            )
    (setq EndAngle (max (angle CenterPoint EndPoint)(angle CenterPoint BeginPoint))
  BeginAngle (min (angle CenterPoint EndPoint)(angle CenterPoint BeginPoint))
            )
  )  
                   (setq gotobj T)
        )  
               )
    )
             (princ "\nObject not selected!")
  )
)  
       )
     )
     (b
       (progn
         (setq a (entget (car b)))
         (if (/= (cdr (assoc 0 a)) "ARC")
           (princ "\nSelected entity is not an arc!")
  (progn
             (setq CenterPoint (cdr (assoc 10 a))
  BeginPoint (polar (cdr (assoc 10 a))(cdr (assoc 50 a))(cdr (assoc 40 a)))
  EndPoint (polar (cdr (assoc 10 a))(cdr (assoc 51 a))(cdr (assoc 40 a)))
    EndAngle (cdr (assoc 51 a))
  BeginAngle (cdr (assoc 50 a))
    )
      (setq gotobj T)
  )  
         )
       )
     )
   )  
 )
 (setq Aang (- EndAngle BeginAngle))
 (if (< Aang 0)
  (setq Aang (+ (* pi 2) Aang))
 )
 (setq ALen (* Aang (cdr (assoc 40 a))))
 (setq ALen (* ALen (distof (getcfg "AppData/BCI/Dimarclfac")2 )))
 (setq ALen (strcat prefix (rtos ALen (atoi (getcfg "AppData/BCI/Dimarclunit"))(atoi (getcfg "AppData/BCI/Dimarcdec"))) suffix))
 (princ "\nSpecify dimension arc line location: ")
 (setq osmode (getvar "osmode"))
 (setvar "osmode" 0)
 (command "_dimangular" "" CenterPoint BeginPoint EndPoint "T" ALen pause)
 (setvar "osmode" osmode)
 (princ (strcat "\nDimension text = " ALen))
 (setvar "cmdecho" oce)
 (princ)
)

(defun set_all_tiles()
  (setq Dimarclunit (getcfg "AppData/BCI/Dimarclunit"))
  (cond
    ((= Dimarclunit "1")(set_tile "Dimarclunit" "0"))
    ((= Dimarclunit "2")(set_tile "Dimarclunit" "1"))
    ((= Dimarclunit "3")(set_tile "Dimarclunit" "2"))
    ((= Dimarclunit "4")(set_tile "Dimarclunit" "3"))
    ((= Dimarclunit "5")(set_tile "Dimarclunit" "4"))
  )
  (set_tile "Dimarcdec" (getcfg "AppData/BCI/Dimarcdec"))
  (set_tile "Dimarclfac" (getcfg "AppData/BCI/Dimarclfac"))
  (set_tile "Dimarcpre" prefix)
  (set_tile "Dimarcsuf" suffix)
)

(defun read_all_tiles()
  (setq Dimarclunit (get_tile "Dimarclunit"))
  (setq Dimarcdec   (get_tile "Dimarcdec"))
  (setq Dimarclfac  (get_tile "Dimarclfac"))
  (setq Dimarcpre   (get_tile "Dimarcpre"))
  (setq Dimarcsuf   (get_tile "Dimarcsuf"))
  (setq prefix Dimarcpre suffix Dimarcsuf)
  (cond
    ((= Dimarclunit "0")(setq Dimarclunit "1"))
    ((= Dimarclunit "1")(setq Dimarclunit "2"))
    ((= Dimarclunit "2")(setq Dimarclunit "3"))
    ((= Dimarclunit "3")(setq Dimarclunit "4"))
    ((= Dimarclunit "4")(setq Dimarclunit "5"))
  )
  (set_tile "Dimarclfac" (setq Dimarclfac (rtos (convert_unit Dimarclfac) 2)))
)

(defun save_dimarc_cfg()
  (setcfg "AppData/BCI/Dimarclunit" dimarclunit)
  (setcfg "AppData/BCI/Dimarcdec" dimarcdec)
  (setcfg "AppData/BCI/Dimarclfac" dimarclfac)
  (setcfg "AppData/BCI/Dimarcpost" (strcat prefix "<>" suffix))
)

(defun convert_unit ( value )
  (setq tval (distof value 1))
  (if (= tval nil)
    (setq tval (distof value 2))
  )
  (if (= tval nil)
    (setq tval (distof value 3))
  )
  (if (= tval nil)
    (setq tval (distof value 4))
  )
  (if (= tval nil)
    (setq tval (distof value 5))
  )
  (if (= tval nil)
    (setq tval 1)
  )
  tval
)

(defun C:DIMARCLUNIT ()
 (if (not DIMARCLUNIT)
   (setq DIMARCLUNIT (rtos (getvar "Dimlunit") 2 0))
 )
 (setq ODIMARCLUNIT DIMARCLUNIT)
 (setq p (strcat "\nNew value for DIMARCLUNIT <"DIMARCLUNIT">:"))
 (setq DIMARCLUNIT(getstring p))
 (if (= DIMARCLUNIT "")(setq DIMARCLUNIT ODIMARCLUNIT))
 (setq tv (distof DIMARCLUNIT))
 (cond
   ((= nil tv)(dimarcluniterr))
   ((> 1 tv)(dimarcluniterr))
   ((< 5 tv)(dimarcluniterr))
   (T (setcfg "AppData/BCI/Dimarclunit" dimarclunit))
 )
 (princ)
)

(defun dimarcluniterr()
  (princ "\nRequires an integer between 1 and 5.")
  (setq DIMARCLUNIT ODIMARCLUNIT)
  (C:DIMARCLUNIT)
)

(defun C:DIMARCDEC ()
 (if (not DIMARCDEC)
   (setq DIMARCDEC (rtos (getvar "Dimdec") 2 0))
 )
 (setq ODIMARCDEC DIMARCDEC)
 (setq p (strcat "\nNew value for DIMARCDEC <"DIMARCDEC">:"))
 (setq DIMARCDEC(getstring p))
 (if (= DIMARCDEC "")(setq DIMARCDEC ODIMARCDEC))
 (setq tv (distof DIMARCDEC))
 (cond
   ((= nil tv)(DIMARCDECERR))
   ((> 0 tv)(DIMARCDECERR))
   ((< 8 tv)(DIMARCDECERR))
   (T (setcfg "AppData/BCI/DIMARCDEC" DIMARCDEC))
 )
 (princ)
)

(defun DIMARCDECERR()
  (princ "\nRequires an integer between 0 and 8.")
  (setq DIMARCDEC ODIMARCDEC)
  (C:DIMARCDEC)
)

(defun C:DIMARCLFAC ()
 (if (not DIMARCLFAC)
   (setq DIMARCLFAC (rtos (getvar "Dimlfac") 2))
 )
 (setq ODIMARCLFAC DIMARCLFAC)
 (setq p (strcat "\nNew value for DIMARCLFAC <"DIMARCLFAC">:"))
 (setq DIMARCLFAC (getstring p))
 (if (= DIMARCLFAC "")(setq DIMARCLFAC ODIMARCLFAC))
 (setq DIMARCLFAC (rtos (convert_unit DIMARCLFAC) 2))
 (setq tv (distof DIMARCLFAC))
 (cond
   ((= nil tv)(DIMARCLFACERR))
   ((> (distof "9.9999E-099" 1) tv)(DIMARCLFACERR))
   ((< (distof "9.9999E+099" 1) tv)(DIMARCLFACERR))
   (T (setcfg "AppData/BCI/DIMARCLFAC" DIMARCLFAC))
 )
 (princ)
)

(defun DIMARCLFACERR()
  (setq DIMARCLFAC ODIMARCLFAC)
  (C:DIMARCLFAC)
)

(defun C:DIMARCPOST ()
 (cond
   ((and (= "" prefix) suffix)(setq DIMARCPOST suffix))
   ((and prefix suffix)(setq DIMARCPOST (strcat prefix "<>" suffix)))
   (T (setq DIMARCPOST ""))
 )
 (setq ODIMARCPOST DIMARCPOST)
 (setq p (strcat "\nNew value for DIMARCPOST, or . for none <\""DIMARCPOST"\">:"))
 (setq DIMARCPOST(getstring p))
 (if (= DIMARCPOST "")(setq DIMARCPOST ODIMARCPOST))
 (if (= DIMARCPOST ".")(setq DIMARCPOST ""))
 (setq tv (distof DIMARCPOST))
 (setcfg "AppData/BCI/DIMARCPOST" DIMARCPOST)
 (parse_dimarcpost DIMARCPOST)
 (princ)
)

(defun parse_dimarcpost( pfxsfx )
   (if (<= (strlen pfxsfx) 2)
    (setq prefix "" suffix "")
    (progn
     (setq pointer 1
           prefix nil
  suffix nil
     )
     (while (not prefix)
      (setq testval (substr pfxsfx pointer 2))
      (if (= "<>" testval)
       (setq prefix (substr pfxsfx 1 (- pointer 1))
             suffix (substr pfxsfx (+ pointer 2)(strlen pfxsfx))
       );setq
      );if
      (setq pointer (1+ pointer))
      (if (> pointer (- (strlen pfxsfx)1))
(setq suffix pfxsfx
     prefix ""
)
      );if
     );while
    );progn
   );if
)
(princ "\nDimarc - Version 2.0  Copyright 2002 by BCI Computer Solutions\n")
(princ)

--- End code ---


DIMARC.DCL File


--- Code: ---
specs : dialog {
     label = "Modify Dimension Style : Arc Dimensions";
     :row {
     :column {
     : boxed_column {
         label       = "Arc Dimensions";
     : popup_list {
         label       = "&Unit Format:";
         mnemonic    = "U";
         key         = "Dimarclunit";
         edit_width  = 12;
         list        = "\nScientific\nDecimal\nEngineering\nArchitectural\nFractional";
         alignment   = "right";
         fixed_width = "true";
     }
     : popup_list {
         label       = "&Precision:";
         mnemonic    = "P";
         key         = "Dimarcdec";
         edit_width  = 12;
         list        = "\n0\n0.0\n0.00\n0.000\n0.0000\n0.00000\n0.000000\n0.0000000\n0.00000000";
         alignment   = "right";
         fixed_width = "true";
     }
     : edit_box {
         label       = "Prefi&x:";
         mnemonic    = "x";
         key         = "Dimarcpre";
         edit_width  = 24;
         alignment   = "right";
         fixed_width = "true";
     }
     : edit_box {
         label       = "&Suffix:";
         mnemonic    = "S";
         key         = "Dimarcsuf";
         edit_width  = 24;
         alignment   = "right";
         fixed_width = "true";
     }
     
     : boxed_column {
         label       = "Measurement Scale";
     : edit_box {
         label       = "Scal&e factor:";
         mnemonic    = "e";
         key         = "Dimarclfac";
         edit_width  = 12;
         alignment   = "right";
         fixed_width = "true";
     }
     }
     }
     }
     }
     spacer_1;
     spacer_1;
     spacer_1;
     ok_cancel;
}

--- End code ---


I don't know if this will suit your needs but I think when I put it together that it covered all aspects of an dimensioned arc along with units settings prefix, suffix, precision and scale factor.

Use it in good health

Navigation

[0] Message Index

[#] Next page

Go to full version