TRIM AND ERASE

Discussion in 'AutoCAD' started by taylor2k3, Jun 4, 2004.

  1. taylor2k3

    taylor2k3 Guest

    Is there a lisp or code that can erase lines etc when in the trim command?
    sort of like what autodesk inventor does. Sometimes there are lines that you
    want to delete when trimming, it would be useful.

    thanks
     
    taylor2k3, Jun 4, 2004
    #1
  2. taylor2k3

    mmo Guest

    I don't know Autodesk inventor, so your question is not at all clear to me. Do you mean you want selected cutting edges to be erased after the trim has been preformed?

    I often able to avoid temporarily lines by using the command 'Lengthen' instead of 'Trim'.

    With friendly greetings, M. Moolhuysen.
     
    mmo, Jun 4, 2004
    #2
  3. taylor2k3

    mmo Guest

    Assuming you asked for selected cutting edges to be erased after the trim has been preformed:

    (defun C:TRIMERASE (/ ss1)
    (prompt "\nSelect cutting edges, these will be erased after trim ...")
    (if (setq ss1 (ssget))
    (progn
    (setvar "CMDECHO" 0)
    (command "_UNDO" "_BE" "_TRIM")
    (setvar "CMDECHO" 1)
    (command ss1 "")
    (while (= 1 (logand 1 (getvar "CMDACTIVE")))
    (command pause)
    )
    (setvar "CMDECHO" 0)
    (command "_ERASE" ss1 "" "_UNDO" "_E")
    (setvar "CMDECHO" 1)
    )
    (prompt "\nNothing selected.")
    )
    (princ)
    )

    Somehow I can't include a *.lsp file as atttachment a at this moment, it's says the file extension isn't allowed. Strange, isn't it?

    With friendly greetings, M. Moolhuysen.
     
    mmo, Jun 4, 2004
    #3
  4. A very pretty thing guys!
     
    Alexander V. Koshman, Jun 5, 2004
    #4
  5. taylor2k3

    devitg Guest

    if you change the extension to TXT , you can upload
     
    devitg, Jun 5, 2004
    #5
  6. taylor2k3

    devitg Guest

    or you can add the not.zip an then erase not.zip
     
    devitg, Jun 5, 2004
    #6
  7. taylor2k3

    taylor2k3 Guest

    Not quite what I meant but a useful tool. What autodesk inventor can do in
    sketch mode is the abilty to trim lines to a cutting edge or line the same
    as you would with autocad, but then using the same tool you can delete other
    lines that need deleting in the vicinity of the trimed line using the trim
    tool. It maybe a bit too intelligent for autocad to do this. I suppose I can
    always come out of the trim command and erase with the erase tool, im just
    been lazy. thanks anyway.
     
    taylor2k3, Jun 7, 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.