Author Topic: "sort" of a request  (Read 6723 times)

0 Members and 1 Guest are viewing this topic.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: "sort" of a request
« Reply #15 on: January 12, 2009, 04:36:08 PM »
I bet yah she did'nt say that yet.

She did, but she said it to Tony first.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

HelpLispinSeattle

  • Guest
Re: "sort" of a request
« Reply #16 on: January 12, 2009, 04:42:28 PM »
MP,

I dont know who Tony is but I'm smiling here...One last adjustment.
I reverse the list but it did not come out the way I liked it. Could you
please make work like this. (The newest date on top.)

01-12-09   Bla bla bla
12-22-08   Bla bla bla
12-10-08   Bla bla bla
06-10-08   Bla bla bla
06-09-08   Bla bla bla
11-17-07   ...
10-10-07   ...

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: "sort" of a request
« Reply #17 on: January 12, 2009, 05:04:35 PM »
If I understood your correctly ...

Code: [Select]
(defun foo ( lst )
    (   (lambda (f) (vl-sort lst '(lambda (a b) (< (f b) (f a)))))
        (lambda (x) (strcat (substr x 7 2) (substr x 1 2)(substr x 4 2)))
    )
)

Tony is a reference to Tony Tanzillo, who has contributed to the body of knowledge the AutoCAD programming community enjoys to such a degree that any attempt to acknowledge same would fall pathetically short. Regardless, you and I are in his debt.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

HelpLispinSeattle

  • Guest
Re: "sort" of a request
« Reply #18 on: January 12, 2009, 05:58:52 PM »
Perfect!...Thank you MP...Thank you Tony!