Help with Routine please

Discussion in 'AutoCAD' started by cadman_meg, Aug 19, 2003.

  1. cadman_meg

    cadman_meg Guest

    This does not seem to work. Can someone please look at his and give me a hand? Thanks.



    ;SETUP TO LOCAL STYLE - CURRENTLY ... SW - DRESSLER
    ;WRITTED SPECIALLY BY A.Nielsen
    (command ".UNDO""group")
    (setq EPT (getvar"EXPERT"))
    (setq SCALE(getvar"DIMSCALE"))
    (setvar"EXPERT"5)
    (command".STYLE""ISO""ISO3098B""0""1""""""""")
    (progn (setvar"DIMALT"0) ; alternative dim unit
           (setvar"DIMALTD"4) ; alternative dim unit decimal places
           (setvar"DIMALTF"25.4) ; alt unit factor (=inches)
           (setvar"DIMASO"1) ; associative dimns
           (setvar"DIMASZ"3) ; arrow size
           (setvar"DIMCEN"3) ; centremark size 3
           (setvar"DIMCLRD"256) ; dim line color 256=BYLAYER
           (setvar"DIMCLRE"256) ; ext line color 256=BYLAYER
           (setvar"DIMCLRT"2) ; text color
           (setvar"DIMDEC"2) ; text decimal places !! R13 only !!
           (setvar"DIMDLE"0) ; dim line extension
           (setvar"DIMDLI"10) ; baseline/cont spacing
           (setvar"DIMEXE"1) ; extension line extension
           (setvar"DIMEXO"2) ; extension line offset
           (setvar"DIMGAP"1) ; text gap 1mm
           (setvar"DIMLFAC"1.000) ; linear factor
           (setvar"DIMFIT"1) ; text location FORCE INSIDE !!R13 only !!
           (setvar"DIMLIM"0) ; limits
           (setvar"DIMPOST""") ; post comment
           (setvar"DIMRND"0.05) ; roundoff
           (setvar"DIMSAH"0) ; no used defined arrow blocks
           (setvar"DIMSE1"0) ; 1st ext line present
           (setvar"DIMSE2"0) ; 2nd ext line present
           (setvar"DIMSHO"1) ; dim updates while dragging
           (setvar"DIMSOXD"0) ; allow dim lines outside ext lines
           (setvar"DIMTAD"1) ; Text above dim line 1mm
           (setvar"DIMTFAC"0.670) ; tol text height to dim text
           (setvar"DIMTIH"0) ; align to dim line
           (setvar"DIMTIX"0) ; text inside extension lines
           (setvar"DIMTM"0) ; minus tol. value
           (setvar"DIMTOFL"1) ; text outside force line inside
           (setvar"DIMTOH"0) ; text outside horizontal
           (setvar"DIMTOL"0) ; no tolerance
           (setvar"DIMTP"0) ; plus tol. value
           (setvar"DIMTSZ"0) ; use arrows
           (setvar"DIMTVP"0.000) ; text vert. position
           (setvar"DIMTXT"2.5) ; text height 2.5mm
           (setvar"DIMTXSTY""ISO");Dim Text Style !! R13 only !!
           (setvar"DIMUPT"1); user position text !! R13 ONLY !!
           (setvar"DIMZIN"8) ; zero supression
           (command".COLOR""BYLAYER")
           (command".LINETYPE""S""BYLAYER""")
           (command".DIM1""SAVE""STANDARD")
           (setvar"DRAGMODE"2)
           (setvar"ELEVATION"0)
           (setvar"THICKNESS"0)
    )
    (terpri)
    (terpri)
    (terpri)
    (initget"Y N")
    (setq ANS"N")
    (setq ANS(strcase(getkword"\nDo you want to update ALL the Dimensions in this drawing? y/n <N> ")))
    (if (or(= ANS "N")(= ANS nil))
           (prompt"\n\n OK .. No changes made to Dimensions... ")
           (command".DIM1""UPDATE"(ssget "X"(list(cons 0 "DIMENSION")))"")
    )
    (terpri)
    (prompt"\n\n OK .. Now you may go out and play. ")
    (setvar"EXPERT"EPT)
    (command ".UNDO""end")
    (princ)
     
    cadman_meg, Aug 19, 2003
    #1
  2. cadman_meg

    Jeff Mishler Guest

    Specifically how doesn't it work?
    What do you expect it to do?
     
    Jeff Mishler, Aug 19, 2003
    #2
  3. cadman_meg

    cadman_meg Guest

    I thought it creates new dimension styles and sets
    them current? i.e. When button '20' clicked, the routine creates dimstyle 20 with all the
    relevant dimfit etc.
     
    cadman_meg, Aug 19, 2003
    #3
  4. cadman_meg

    Paul Turvill Guest

    There's nothing in what you posted that would create a new dimstyle. All it
    does is to set a bunch of overrides and give the user the option of updating
    all (or none) of the existing dimensions in a drawing. There are a number of
    other errors, as well. Where did you get this routine? It doesn't appear to
    be complete, since it will attempt to execute on loading, and then results
    in a number of syntax errors.
    ___
     
    Paul Turvill, Aug 19, 2003
    #4
  5. cadman_meg

    Mark Godfrey Guest

    Got this from a cad user group that is email based. Called SPAUG. Most
    things on their are pretty good, but sometimes you get those bug I guess. Do
    you have anything better? Or does someone else here? Thanks.
     
    Mark Godfrey, Aug 20, 2003
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.