|
发表于 2022-7-5 23:54:11
|
显示全部楼层
Hi Artek.
I had the same kind of thoughts few months back. I rolled up my sleeves and dug in because I really wanted to learn lisp. At the beginning, Lee drop into one of my threads and gave me equivalences of some things I made in AutoLisp and commands. He made the same things in VLisp and ActiveX. "Here's some food for thoughts" he said. At first I freaked out a little and discarded most of it saying that I wasn't at this level yet, and wanted to do it only by lisp because at that time I had no knowledge of VLisp and ActiveX. Later on, I started to try to get a hand onto VLisp and ActiveX, and wasn't able to achieve what I wanted. I googled what I needed and.. the first result was in that "food for thoughts" that I discarded on my very own thread. I don't know how someone can laugh and feel bad at the same time, but I manage to do it.
I must say that Lee is one of the best and most active member that I had the chance to stumble upon not only here, but in many other forums (autodesks, augi...) and I'm pretty sure he has over 50 000 posts all added together (over 16 000 here). And beside "you are welcome" at the end of threads, most of them are simply gold mines. He has a way to simplify code and achieve things without unnecessay detours. That comes with experience. To be perfectly honest with you, I would not be comfortable modifying one of Lee Mac's code (to mold it to suit your needs). It would be the same as asking any painter to do touch ups to The Mona Lisa because even if its not the way da Vinci made it, you'd like to see it with a red background to fit with your couch. I hope you'll understand.
It would take you ages to produce such code? Maybe it would take you some time, but it is not impossible. Few things that I can tell you: put only 100 hours in Lisp, you'll be amazed of what you will be able to achieve. When I make Lisps, I always add princ/prompts to monitor variables, and alerts to "freeze" the execution. As long as I don't hit the "ok" button, the lisp is paused. Depending on the popup alert displayed, I know exactly where the execution paused (searching for the popup ed alert into my code), and looking at the lines printed on my cad session, I monitor my variables. When I understand whats going on, I hit "ok" to resume to the next alert. I could have erased them, the lisp would be much shorter, but I didn't; I commented them (by adding ";" in front of them). My code might look longer for that, but it has a higher educative purpose; suppress all the ";" and you'll be able to follow the execution of the code line by line. I'm not as fluent as Lee to make lisp routines, that one took me in between 12 to 14 hours to make. I'm glad I did it though.
I know that my code isn't as efficient as Lee's, but I "dare" you to uncomment every one of my princ/alerts, and spend only half the time that I took to make the lisp to really try to understand it. If you don't know a function, google and study it as needed then go back to the execution. You WILL get most of it. Give yourself a chance! You might have to spend some hours but every time you'll make new connections and learn new things, you will potentially save a lot more making lisp to automatically do redundant tasks. See that as an investment.
You went from Please give me an idea on how to to I want to replace this to the code Lee generously gave you to I actually meant as two prompts like: "From number:" and "To number:"... sometimes the modification is simple, but sometimes different goal also quite often mean different path. On the last request my feeling (as a few months old lisper) is that it would take quite some tweeking to achieve your goal.
Sorry for the length of my post, I write too much, and add too much details (I know), but I'd be curious to have your estimation on these:
-How much time do you think I took to write the code, the detailed explanation and that message?
-How much time do you think Lee took to write his original routine, read this thread and tweak it at your request?
-How much time did you spend to try to study our routines to learn new stuff?
Give it a try!
The way I see things; If you want to get some advices on how to proceed, you need help to understand some functions, or want feedback on your routines, this place is the best around. If you want the best lispers to give you custom tools for free, you misinterpreted the goal of this forum...
That being said, I wish you good luck on achieving your goals.
Cheers,
Jef!
The views and opinions expressed in this post are mine alone and are not necessarily representative of the views and opinions of any other members nor cadtutor.net... just saying =) |
|