Speed suggestions?

Discussion in 'AutoCAD' started by C Witt, Jul 16, 2004.

  1. C Witt

    Tom Smith Guest

    I had the same feeling as others -- the doubled apostrophe smells like a
    kludge. But at least it's legal. You'll note that they're also using a dash
    instead of an equals sign, for the same reason.

    Like Jason, my approach has simply been to name the dimstyle per the
    dimscale. It's not as warm and fuzzy as the names they're trying to achieve,
    but IMHO users who regularly work with multiple scale ought to be familiar
    with dimscale factors anyway.
     
    Tom Smith, Jul 16, 2004
    #21
  2. Because not everyone dimensions through
    a floating viewport.

    or

    When Dimassoc = 2, I create a Dim_1 style
    which of course works for any scale.
     
    Jason Piercey, Jul 16, 2004
    #22
  3. C Witt

    David Bethel Guest

    ;|
    There should some way to break the names into stable prefixs

    DTYPE IS NOT USED - IS IT NEEDED
    CAN UPTONEW BE CALLED REGARDLESS OF THE STATUS

    |;
    (defun switch (/ e i en el curdim dtype)
    ;(princ "\nStarting switch")
    (and
    (setq E (ssget "X" (list (cons 0 "DIMENSION,LEADER"))))
    (setq i (sslength E))
    (while (not (minusp setq i (1- i)))
    (setq en (ssname ss i)
    EL (entget EN)
    CURDIM (cdr (assoc 3 EL))
    DTYPE (cdr (assoc 0 EL)))
    (cond
    ((= (substr CURDIM 1 4) "AT&T")
    (setq NEWDIM (strcat CURDIM 5) "'")
    (UPTONEW))
    ((= (substr CURDIM 1 6) "TRKIMP")
    (setq NEWDIM (strcat (substr CURDIM 7) "'"))
    (UPTONEW))
    ((= (substr CURDIM 1 8) "TRKMET1-")
    (setq NEWDIM (substr CURDIM 7))
    (UPTONEW))
    )))
    ;(princ "\nDone switch")
    (princ)
    )
     
    David Bethel, Jul 16, 2004
    #23
  4. C Witt

    C Witt Guest

    "IMHO users who regularly work with multiple scale ought to be familiar
    with dimscale factors anyway"

    you would think so wouldn't you ;>

    sadly most of the users here, don't. we spoiled them with lisp commands.
     
    C Witt, Jul 16, 2004
    #24
  5. C Witt

    Tom Smith Guest

    One way to cure that is to kick the crutches out from under them. After a
    month of dealing with Jason's DIM_96 etc. they will have memorized the
    common ones and learned to decypher the rest.

    It's not like it's rocket science. Most people usually work in the same
    limited number of scales most of the time. Once you know that 1/4" scale is
    dimscale 48, and 1/8" is 96, and 1/30 is 360, it just isn't that difficult
    to extrapolate to another scale that you don't use as often. For those who
    are severely dimscale-challenged, get one of thos ubiquitous cheat sheets
    like the CADCard.

    I believe in making things user friendly, don't get me wrong, but I'm never
    comfortable with having to program around the preconception that users
    "can't" learn -- and I'm even less comfortable with the notion that their
    disability was caused or worsened by the programmer's efforts. It's too much
    of a circular argument.for me. We had to give them crutches because they
    were a little unsteady, but they're losing the use of their legs because of
    depending on the crutches, so now we need to make them better crutches.

    Knowing the dimscales at which you nearly always work just isn't that hard.
     
    Tom Smith, Jul 16, 2004
    #25
  6. C Witt

    C Witt Guest

    that would only work up to a point..

    as soon as it finds (= CURDIM "AT&T1-300FT") you need to do so many
    alterations to make "1'' - 300FT".. that time-wise it's not worth it..

    correct?
     
    C Witt, Jul 16, 2004
    #26
  7. C Witt

    C Witt Guest

    you nailed it. i'm always looking for better crutches... (often the
    ones made aren't even used, even when they are "required" for office
    standards).
     
    C Witt, Jul 16, 2004
    #27
  8. In our shop we have only one DimStyle, and we set an override for the
    DimScale. That way we don't have those dozens of styles floating around.

    --
    R. Robert Bell


    "Jason Piercey" <JasonATatrengDOTcom> wrote in message
    Because not everyone dimensions through
    a floating viewport.

    or

    When Dimassoc = 2, I create a Dim_1 style
    which of course works for any scale.
     
    R. Robert Bell, Jul 17, 2004
    #28
  9. C Witt

    Doug Barr Guest

    Can you give me a brief example of code that will establish an override for
    primary units?

    That's about the only reason I use dimstyles... D2 = setvar dimstyle
    "2-place-decimal", etc. Of course a single Insert brings in the definitions for
    all those dimstyles (I usually use 4-6 in any given drawing) at the appropriate
    dimscale.
    -doug
     
    Doug Barr, Jul 17, 2004
    #29
  10. I've thought about this technique for non-associative
    dimensions before, just never messed with it enough
    to get a good feel for how well it would work for us.
     
    Jason Piercey, Jul 17, 2004
    #30
  11. C Witt

    Jürg Menzi Guest

    Hi C Witt

    My suggestion:

    (defun switch ( / CurEnt CurDim CurSet DTYPE EntLst NewDim)
    ;(princ "\nStarting switch")
    (setq CurSet (ssget "X" '((0 . "DIMENSION,LEADER"))))
    (while (setq CurEnt (ssname CurSet 0))
    (setq EntLst (entget CurEnt)
    CurDim (cdr (assoc 3 EntLst))
    DTYPE (cdr (assoc 0 EntLst))
    )
    (cond
    ((wcmatch CurDim "TRKMET*")
    (setq NewDim (substr CurDim 7))
    (UPTONEW)
    )
    ((wcmatch CurDim "TRKIMP*")
    (setq NewDim (ConvertScale (substr CurDim 7)))
    (UPTONEW)
    )
    ((wcmatch CurDim "TRK*")
    (setq NewDim (ConvertScale (substr CurDim 4)))
    (UPTONEW)
    )
    ((wcmatch CurDim "AT&T*")
    (setq NewDim (ConvertScale (substr CurDim 5)))
    (UPTONEW)
    )
    )
    (ssdel CurEnt CurSet)
    )
    ;(princ "\nDone switch")
    (princ)
    )

    (defun ConvertScale (Val)
    (cond
    ((wcmatch Val "1-16") "1-16'' - 1FT")
    ((wcmatch Val "3-32") "3-32'' - 1FT")
    ((wcmatch Val "1-8") "1-8'' - 1FT")
    ((wcmatch Val "3-16") "3-16'' - 1FT")
    ((wcmatch Val "1-4") "1-4'' - 1FT")
    ((wcmatch Val "3-8") "3-8'' - 1FT")
    ((wcmatch Val "1-2") "1-2'' - 1FT")
    ((wcmatch Val "3-4") "3-4'' - 1FT")
    ((wcmatch Val "1,1FT") "1'' - 1FT")
    ((wcmatch Val "1-1-2,1-1-2FT") "1 1-2'' - 1FT")
    ((wcmatch Val "2,2FT") "2'' - 1FT")
    ((wcmatch Val "3,3FT") "3'' - 1FT")
    ((wcmatch Val "1-1,1-1FT") "1'' - 1''")
    ((wcmatch Val "1-10,1-10FT") "1'' - 10FT")
    ((wcmatch Val "1-20,1-20FT") "1'' - 20FT")
    ((wcmatch Val "1-30,1-30FT") "1'' - 30FT")
    ((wcmatch Val "1-40,1-40FT") "1'' - 40FT")
    ((wcmatch Val "1-50,1-50FT") "1'' - 50FT")
    ((wcmatch Val "1-70,1-70FT") "1'' - 70FT")
    ((wcmatch Val "1-75,1-75FT") "1'' - 75FT")
    ((wcmatch Val "1-80,1-80FT") "1'' - 80FT")
    ((wcmatch Val "1-100,1-100FT") "1'' - 100FT")
    ((wcmatch Val "1-120,1-120FT") "1'' - 120FT")
    ((wcmatch Val "1-150,1-150FT") "1'' - 150FT")
    ((wcmatch Val "1-200,1-200FT") "1'' - 200FT")
    ((wcmatch Val "1-300,1-300FT") "1'' - 300FT")
    ((wcmatch Val "1-400,1-400FT") "1'' - 400FT")
    ((wcmatch Val "1-500,1-500FT") "1'' - 500FT")
    ((wcmatch Val "1-1000,1-1000FT") "1'' - 1000FT")
    )
    )

    Cheers
     
    Jürg Menzi, Jul 18, 2004
    #31
  12. C Witt

    jclaidler Guest

    interesting, don't understand why, but still interesting.
     
    jclaidler, Jul 19, 2004
    #32
  13. I prefer to keep my annotations out of modelspace.
     
    Jason Piercey, Jul 19, 2004
    #33
  14. C Witt

    jclaidler Guest

    Here we have one dimstyle, and with dimensioning thru viewports for with dimassoc set to 2, we never have to change any settings.
     
    jclaidler, Jul 19, 2004
    #34
  15. C Witt

    jclaidler Guest

    That's what we like to push as our standard. The only items in model space should be just the geometry of the drawing. All notes and dims should be in paper space. But if dimensions have to be in model space, they are placed thru a open viewport.
     
    jclaidler, Jul 19, 2004
    #35
  16. (setvar "DimScale" 96.0)

    --
    R. Robert Bell


    Can you give me a brief example of code that will establish an override for
    primary units?

    That's about the only reason I use dimstyles... D2 = setvar dimstyle
    "2-place-decimal", etc. Of course a single Insert brings in the definitions
    for
    all those dimstyles (I usually use 4-6 in any given drawing) at the
    appropriate
    dimscale.
    -doug
     
    R. Robert Bell, Jul 19, 2004
    #36
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.