lisp routine for splines

Discussion in 'AutoCAD' started by shaw.n, Oct 21, 2004.

  1. shaw.n

    shaw.n Guest

    hi, can anyone help me? i need a routine that will select all splines and a drawing, and then use splinedit to refine the spline and elevate order to 26. it must really be able to select ALL splines at once and carry uot this sequence. much appreciated if anyone can help me.

    regards,

    N.S.
     
    shaw.n, Oct 21, 2004
    #1
  2. shaw.n

    Jürg Menzi Guest

    Hi N.S.

    Try this one:
    Code:
    (defun C:RefineSplines ( / CurEnt CurSet OldCmd)
    (setq OldCmd (getvar "CMDECHO"))
    (setvar "CMDECHO" 0)
    (command "_.UNDO" "_GROUP")
    (if (setq CurSet (ssget "X" '((0 . "SPLINE"))))
    (while (setq CurEnt (ssname CurSet 0))
    (command "_.SPLINEDIT" CurEnt "_REF" "_ELE" 26 "" "")
    (ssdel CurEnt CurSet)
    )
    )
    (command "_.UNDO" "_END")
    (setvar "CMDECHO" OldCmd)
    (princ)
    )
    
    Cheers
     
    Jürg Menzi, Oct 21, 2004
    #2
  3. shaw.n

    shaw.n Guest

    you know what, that is JUST what i have been looking for.
    Thank you very much.

    N.S.
     
    shaw.n, Oct 21, 2004
    #3
  4. shaw.n

    Jürg Menzi Guest

    Glad to help you...¦-)

    Cheers
     
    Jürg Menzi, Oct 21, 2004
    #4
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.