Author Topic: HELP WITH A LISP  (Read 8851 times)

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7527
Re: HELP WITH A LISP
« Reply #15 on: January 18, 2017, 10:25:31 AM »

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

pedroantonio

  • Guest
Re: HELP WITH A LISP
« Reply #16 on: January 18, 2017, 04:57:13 PM »
Hi ronjonp. Hi read all the examples of vl-sort bul all the examples have numbers or letters in parenthesis .In the lisp i use have a file with numbers. How to use it ?

ronjonp

  • Needs a day job
  • Posts: 7527
Re: HELP WITH A LISP
« Reply #17 on: January 18, 2017, 05:03:50 PM »
Hi ronjonp. Hi read all the examples of vl-sort bul all the examples have numbers or letters in parenthesis .In the lisp i use have a file with numbers. How to use it ?
You have to sort before it goes to the file ( when it's still a list ).

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

pedroantonio

  • Guest
Re: HELP WITH A LISP
« Reply #18 on: January 18, 2017, 05:07:27 PM »
I am not good in lisp .can you give an exaple from the PXYZ  and i try to fix the others?

ChrisCarlson

  • Guest
Re: HELP WITH A LISP
« Reply #19 on: January 19, 2017, 07:44:39 AM »
If you are not willing to learn, I suggest you hire a 3rd party firm to generate the routines for you.

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Re: HELP WITH A LISP
« Reply #20 on: January 19, 2017, 08:23:26 AM »

Wow, I read through all then replies and I agree that the provided links and information should steer him to the answer but I was surprised at the tone of how it was delivered. I've been a member here since 2003 and I have been blessed by the fantastic help over the years by many many experienced people here (too many to list here). I have learned more from this site than I ever would elsewhere. I thought this WAS a place to come and learn and share, collaborate, debate etc... It is very clear that this person does not know lisp and I know that everyone here have separate lives and sometimes not enough time to dig into his issue(s) with his code or provide a snippet of code to get him/her started in the right direction but to me it just seemed excessive. I am only saying this cause I was in his/her shoes many years ago myself and back then I did not get this kind of response. I got assistance and very helpful HELP. Please don't take this the wrong way guys. I'm just giving my honest Opinion.
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

pedroantonio

  • Guest
Re: HELP WITH A LISP
« Reply #21 on: January 19, 2017, 09:03:55 AM »
Stop shooting me OK !! I ask for an example . i didin;t say anything about not trying to learn lisp. I have learn a lot of things all this years. If V-Man or any one don't want to help .. .don't post. I know this link http://www.theswamp.org/~john/avlisp/ and i have allready read it before begin this topic. If don't want to help don't help.

Thanks for nothing

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Re: HELP WITH A LISP
« Reply #22 on: January 19, 2017, 09:16:42 AM »

Don't shoot the messenger (Me). I was actually sticking up for you.
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

pedroantonio

  • Guest
Re: HELP WITH A LISP
« Reply #23 on: January 19, 2017, 09:21:51 AM »
I have seen a lot of people like you in this site.If you  know something about this post don't write something only to write it. You don't help in this way. You comfiused evereone and then all the other gays will came and wtite about your post and at the end .... no one can help..... Are you satisfied know ... What you earn about it ...

ChrisCarlson

  • Guest
Re: HELP WITH A LISP
« Reply #24 on: January 19, 2017, 09:23:43 AM »
I'm just saying you'll get more responsive help if you attempt something, even if it doesn't work.

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Re: HELP WITH A LISP
« Reply #25 on: January 19, 2017, 09:26:37 AM »

Bump!!!

Quote
I have seen a lot of people like you in this site.If you  know something about this post don't write something only to write it. You don't help in this way. You comfiused evereone and then all the other gays will came and wtite about your post and at the end .... no one can help..... Are you satisfied know ... What you earn about it ...

If you are going to post please use spell check. Too many misspelled words in your last post and proper grammar.
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

pedroantonio

  • Guest
Re: HELP WITH A LISP
« Reply #26 on: January 19, 2017, 09:33:48 AM »
Sorry for my spell but i thing you understand......


When i come from first time to this forum i didn't know anything about lisp.Then i meet here people like LeeMac, ronjonp , marko_ribar, pbe ,Tharwat etc and help me with thre codes and learn a lot of thing about lisp. I am trying to learn but some thing is still difficult to me.

ChrisCarlson

  • Guest
Re: HELP WITH A LISP
« Reply #27 on: January 19, 2017, 09:47:59 AM »
Hi ronjonp. Hi read all the examples of vl-sort bul all the examples have numbers or letters in parenthesis .In the lisp i use have a file with numbers. How to use it ?

I'll give you the benefit of the doubt in that you are trying to learn.

Code - Auto/Visual Lisp: [Select]
  1.                     (setq lst
  2.                         (append
  3.                             (mapcar '(lambda ( a b ) (cons a (rtos b)))
  4.                                '(point-x point-y point-z)
  5.                                 (trans (cdr (assoc 10 (entget ent))) ent 0)
  6.                             )
  7.                             (mapcar '(lambda ( x ) (cons (strcase (vla-get-tagstring x)) (vla-get-textstring x)))
  8.                                 (append
  9.                                     (vlax-invoke obj 'getattributes)
  10.                                     (vlax-invoke obj 'getconstantattributes)
  11.                                 )
  12.                             )
  13.                         )
  14.                     )
  15.                     (if (setq lst (vl-remove 'nil (mapcar '(lambda ( x ) (cdr (assoc x lst))) ord)))
  16.                         (write-line (LM:lst->str lst del) des)
  17.                     )
  18.  

In this section, the routine is creating a list (variable lst), passing the list to the subfunction LM:lst->str to convert the list to a string and simultaneously writing the string to a file. This is then repeated for each entity in the selection set. From a non-LISP standpoint where would you perform the sort function? At a certain point, it is too early to sort and at a certain point, it's too late.

ronjonp

  • Needs a day job
  • Posts: 7527
Re: HELP WITH A LISP
« Reply #28 on: January 19, 2017, 10:17:46 AM »
Wow, I read through all then replies and I agree that the provided links and information should steer him to the answer but I was surprised at the tone of how it was delivered. I've been a member here since 2003 and I have been blessed by the fantastic help over the years by many many experienced people here (too many to list here). I have learned more from this site than I ever would elsewhere. I thought this WAS a place to come and learn and share, collaborate, debate etc... It is very clear that this person does not know lisp and I know that everyone here have separate lives and sometimes not enough time to dig into his issue(s) with his code or provide a snippet of code to get him/her started in the right direction but to me it just seemed excessive. I am only saying this cause I was in his/her shoes many years ago myself and back then I did not get this kind of response. I got assistance and very helpful HELP. Please don't take this the wrong way guys. I'm just giving my honest Opinion.
Sorry you feel that way V-Man .. the OP has continually asked for handouts and IMO put forth very little effort to learn on his/her own. I personally have extended an olive branch to the OP many times in the past but until I actually see effort, I'm out.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Grrr1337

  • Swamp Rat
  • Posts: 812
Re: HELP WITH A LISP
« Reply #29 on: January 19, 2017, 11:04:18 AM »
Man I hate that kind of general thread titles:
"HELP WITH A LISP" "LISP HELP" "FIX THIS LISP" "Need Fresh Eyes".

And with this sentence from the OP shows that he doesn't understand anything and expects something on the plate:
Quote
I don't know if it possoble to be done with lisp.
(Pointing out the obvious)
Again, read about vl-sort and ask how it works  :straight:
(apply ''((a b c)(a b c))
  '(
    (( f L ) (apply 'strcat (f L)))
    (( L ) (if L (cons (chr (car L)) (f (cdr L)))))
    (72 101 108 108 111 32 87 111 114 108 100)
  )
)
vevo.bg