change ltscale

Discussion in 'AutoCAD' started by Kiwi Russ, May 17, 2004.

  1. Kiwi Russ

    Kiwi Russ Guest

    how can change the ltscale of just one line entity rather than a global
    value?
    thanks Russ
     
    Kiwi Russ, May 17, 2004
    #1
  2. Kiwi Russ

    nagesh nangi Guest

    dxfcode 48 gives ltscale of individual entity.
     
    nagesh nangi, May 17, 2004
    #2
  3. Kiwi Russ

    Walt Engle Guest

    Go to Modify>Properties>pick the line and change it.
     
    Walt Engle, May 17, 2004
    #3
  4. (I assume he was wanting to do it via Lisp or some such route, i.e. it was a
    customization, rather than a drafting, question. So the DXF or assoc-list
    route posted earlier should be helpful.)

    Kent Cooper, AIA


    ...
     
    Kent Cooper, AIA, May 17, 2004
    #4
  5. Kiwi Russ

    Walt Engle Guest

    Well....assumptions can lead to problems sometimes. His question definitely did
    not address a lsp routine - it appeared he was a "newbie" trying to learn.
     
    Walt Engle, May 17, 2004
    #5
  6. (But then what would have drawn him to a Customization newsgroup?)

    Kent Cooper


    ...
     
    Kent Cooper, AIA, May 17, 2004
    #6
  7. Kiwi Russ

    Kiwi Russ Guest

    Walt - I would have thought it was obvious that I wanted the answer
    expressed in lisp.
    as Kent said "why would I post the question in the customization group"? ;-)
     
    Kiwi Russ, May 18, 2004
    #7
  8. Kiwi Russ

    NParcon Guest

    Try this code and see if it works:
    Substitute or assign a value to kiwiscale.

    (setq e (car (entsel))
    ed (entget e)
    )
    (if (not (assoc 48 ed))
    (entmod (append ed (cons 48 kiwiscale)))
    (entmod (subst (cons 48 kiwiscale) (assoc 48 ed) ed))
    )
    (entupd e)

    Noah
     
    NParcon, May 18, 2004
    #8
  9. Kiwi Russ

    Kiwi Russ Guest

    Hi Noah
    and thanks!
    I've been looking through several books on how to do it. However I can't
    make your code work. It seems it doesn't like kiwiscale... "bad list"
    .....don't know why?
    also can I subsituite (setq e (car (entsel))
    for (setq e (entlast)) ?
    cheers Russ
     
    Kiwi Russ, May 18, 2004
    #9
  10. Kiwi Russ

    Joe Burke Guest

    Russ,

    As I recall, you are in the process of switching to vlisp ActiveX. Why go back to
    messing with DXF codes and entmod?

    (setq vobj (vlax-ename->vla-object (car (entsel "\nSelect object: "))))
    (vlax-put vobj 'LinetypeScale 0.25)

    The LinetypeScale property applies to all drawing objects.

    Joe Burke
     
    Joe Burke, May 18, 2004
    #10
  11. Kiwi Russ

    Walt Engle Guest

    Too late to know what your original post was, however my answer was a
    generalization of why fool around with a lsp routine when you can have your
    ltscale setup automatically with acad.lsp (although I didn't mention that
    directly).
     
    Walt Engle, May 18, 2004
    #11
  12. Kiwi Russ

    Kiwi Russ Guest

    Aloha Joe
    hey that works like magic. Yeah still trying to get my head
    around activeX even though there are less lines of code. I must study some
    more....
    many thanks
    Russ
     
    Kiwi Russ, May 19, 2004
    #12
  13. Kiwi Russ

    Joe Burke Guest

    Russ,

    You're welcome.

    You might find a little thing like this useful while learning the ActiveX stuff. I
    still use it.

    (defun c:dump ( / ename )
    (while (not (setq ename (car (entsel))))
    (princ "\nSelect object: ")
    )
    (vlax-dump-object (vlax-ename->vla-object ename))
    ) ;end

    Displays at the text screen the properties available for the object picked. Assuming
    the property isn't read only (RO), (vlax-put vla-object '<property>) should work.

    G'day
    Joe Burke
     
    Joe Burke, May 19, 2004
    #13
  14. Joe,

    You ought to change that code to dump the methods also:

    (vlax-dump-object (vlax-ename->vla-object ename) T)


    --
    R. Robert Bell


    Russ,

    You're welcome.

    You might find a little thing like this useful while learning the ActiveX
    stuff. I
    still use it.

    (defun c:dump ( / ename )
    (while (not (setq ename (car (entsel))))
    (princ "\nSelect object: ")
    )
    (vlax-dump-object (vlax-ename->vla-object ename))
    ) ;end

    Displays at the text screen the properties available for the object picked.
    Assuming
    the property isn't read only (RO), (vlax-put vla-object '<property>) should
    work.

    G'day
    Joe Burke
     
    R. Robert Bell, May 19, 2004
    #14
  15. Kiwi Russ

    Joe Burke Guest

    Thanks, Robert. I didn't know that.

    Joe Burke
     
    Joe Burke, May 20, 2004
    #15
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.