Change properties

Discussion in 'AutoCAD' started by N.A.W., Jul 14, 2003.

  1. N.A.W.

    N.A.W. Guest

    I have asked this before. But I am at a new company and I grabbed the wrong
    lisp when leaving:

    I have a drawing that I save out of Inventor and the taps come up with the
    outer diameter coming in on same layer as inner but LT is different. What I
    did in the lisp before was. Grab everything on Linetype: "ACAD_ISO02W100"
    and the change everything selected to the hidden layer. But I can not
    remember what that code was. Could someone help me out?
     
    N.A.W., Jul 14, 2003
    #1
  2. N.A.W.

    rewilson Guest

    Try this one by Mark Propst, I think. It works well for me.





    (defun ltlay (/ ss obj layers)
      (setq ss
    (ssget
    "x"
    '((6
    .
    "ACAD_ISO02W100"
    )

    )
      )
      ;;get all entities of ltype "ACAD_ISO02W100"
      (if ss
        (progn
          (setq *acad* (vlax-get-acad-object))
          (setq *doc* (vla-get-activedocument *acad*))
          (setq layers (vla-get-layers *doc*))
          (setq obj (vla-add layers "hidden"))
          ;;will make a layer if it doesn't exist
          (command ".chprop" ss "" "la" "hidden" "")
          (command ".chprop" ss "" "c" "bylayer" "")
          (command ".chprop" ss "" "lt" "bylayer" "")
     
    rewilson, Jul 14, 2003
    #2
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.