Extension line property.

Discussion in 'AutoCAD' started by T.Willey, Jun 18, 2004.

  1. T.Willey

    T.Willey Guest

    Is it possible to get the extension line properties for one that is suppressed? If so how? I have searched the ng and fround nothing for this.

    Thanks,
    Tim
     
    T.Willey, Jun 18, 2004
    #1
  2. T.Willey

    zeha Guest

    Did you mean extension lines from dimension?

    You can get the code with tblobjname dimstyle
    Example ExtLineProp

    (defun c:ExtLineprop ()
    (if (and (setq ent (entsel))(setq elist(entget(car ent)))(= (cdr(assoc 0 elist)) "DIMENSION"))
    (progn
    (setq elist (entget(tblobjname "DIMSTYLE"(cdr (assoc 3 elist))))
    clre (if (setq clre (cdr (assoc 177 elist))) clre 0)
    clre (cond ((<= clre 7)(nth clre '("BYBLOCK""Red""Yellow""Green""Cyan""Blue""Magenta""White")))
    ((= clre 256)"BYLAYER")(T (itoa clre)))
    lwe (if (setq lwe (cdr (assoc 372 elist))) lwe 0)
    lwe (cond ((= lwe 0)"BYBLOCK")((= lwe 256)"BYLAYER")(T (strcat "0."(itoa lwe))))
    )
    (alert (strcat "Color extline " clre "\nLineweigth extline " lwe))
    )(princ "\nNot a dimension.")))

    Good luck

    Harrie
     
    zeha, Jun 21, 2004
    #2
  3. T.Willey

    T.Willey Guest

    Thanks, but that is not what I was looking for. Say you have a dimension, and one extension line is suppressed. Is there a way to get the suppressed extension lines property (with respect to the information you get with nentsel)?

    Any help is appreciated.
    Tim
     
    T.Willey, Jun 21, 2004
    #3
  4. (defun IsSuppressed (obj)
    (vl-load-com)
    (cond ((= (type obj) 'ENAME) (setq obj (vlax-EName->vla-Object obj))))
    (list
    (= (vla-Get-ExtLine1Suppress obj) :vlax-True)
    (= (vla-Get-ExtLine2Suppress obj) :vlax-True)))


    Usage:
    Command: (IsSuppressed (car (entsel)))
    Select object: (T nil)


    Note that this subr does no error checking; you need to verify good objects
    before passing them to the function.

    --
    R. Robert Bell


    Thanks, but that is not what I was looking for. Say you have a dimension,
    and one extension line is suppressed. Is there a way to get the suppressed
    extension lines property (with respect to the information you get with
    nentsel)?

    Any help is appreciated.
    Tim
     
    R. Robert Bell, Jun 21, 2004
    #4
  5. T.Willey

    T.Willey Guest

    Command: (ENTGET (CAR (NENTSEL)))

    Select object: ((-1 . <Entity name: 40087dd8>)
    (0 . "LINE") (330 . <Entity name: 40087d70>) (5 . "3B") (100 . "AcDbEntity") (67 . 0) (8 . "0") (62 . 0)
    (370 . -2) (100 . "AcDbLine") (10 3.82689e-018 0.0625 0.0) (11 3.05149e-016 4.98363 0.0) (210 0.0 0.0 1.0))

    I am trying to get this information for an extension line that is suppressed.
     
    T.Willey, Jun 21, 2004
    #5
  6. That line entity won't exist if it is suppressed. You can verify this by
    creating a suppressed dimension and walking thru the objects contained in
    the block definition. The suppressed lines are *not* simply turned off; they
    are removed from the dimension's block object.

    --
    R. Robert Bell


    Command: (ENTGET (CAR (NENTSEL)))

    Select object: ((-1 . <Entity name: 40087dd8>)
    (0 . "LINE") (330 . <Entity name: 40087d70>) (5 . "3B") (100 .
    "AcDbEntity") (67 . 0) (8 . "0") (62 . 0)
    (370 . -2) (100 . "AcDbLine") (10 3.82689e-018 0.0625 0.0) (11 3.05149e-016
    4.98363 0.0) (210 0.0 0.0 1.0))

    I am trying to get this information for an extension line that is
    suppressed.
     
    R. Robert Bell, Jun 21, 2004
    #6
  7. T.Willey

    T.Willey Guest

    Dang, that is what I thought, but was hoping I was wrong. Thanks for clearing that up. Guess I will have to figure another way to do it.

    Tim
     
    T.Willey, Jun 21, 2004
    #7
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.