looking for an example database to learn.

looking for an example database to learn.

cclawsonD6QHU
Explorer Explorer
364 Views
12 Replies
Message 1 of 13

looking for an example database to learn.

cclawsonD6QHU
Explorer
Explorer

So I'm trying to learn LISP and I have a general understanding of it but apparently my google skills suck, and I can'T find examples of scripts/commands to figure out what I need to write the code I need. I'm talking a course but it's not touching on what I need. so if anyone knows where there is a database of sample code, or videos or whatever I would greatly appreciate that shared with me. 

 

for reference I'm trying to write a routine that would add weep holes to only the bottom side of selected panel blocks, and the idea I came up with for that is to limit the command to only execute on a specific y line ex 0 line then I put my panel block that need weeps on that line and write a command to add the weep geometry in the middle of each drill hole. Ideally, I would like to keep them in the blocks/layers they are in and use another LISP routine after I run the one that adds the drill holes that Moshe-A (Mentor) was so kind enough to write and help me understand a bit.

 

Attached are the LISP and a CAD file with the Blocks involved and Instructions on what I would like. I'm not necessarily asking someone to do it for me, (though that is an option and I could just dissect the code after the fact to figure it out.) just asking for direction on where I can find the resources to educate myself on how I would go about doing this.

 

Thanks for your time.

Accepted solutions (1)
365 Views
12 Replies
Replies (12)
Message 2 of 13

BlackBox_
Advisor
Advisor

This book was very helpful to me when starting to learn LISP (Amazon link): 

 

https://a.co/d/iLME0Ym

 

The author, David, is also an amazing person - I had the opportunity to speak with him directly back then. 

 

Also, just wanted to add that I love your initiative and hunger to learn, not just asking for freebies. 🍺

 

Cheers


"How we think determines what we do, and what we do determines what we get."

Sincpac C3D ~ Autodesk Exchange Apps

0 Likes
Message 3 of 13

Moshe-A
Mentor
Mentor

@cclawsonD6QHU hi,

 

You put for your self a very high challenge. the lisp program i gave you is a very high tech AutoLISP program making use of advance feature of the language. to learn AutoLISP you should challenge your self with much more simple programs like adding commands to AutoCAD, draw some simple objects like lines, circles, rectangles and insert blocks.

 

Moshe

 

 

 

 

 

 

0 Likes
Message 4 of 13

-didier-
Advisor
Advisor

Bonjour @cclawsonD6QHU 

 

You can go on my site (signature), of course it in French, but you will have a good beginning.

I am taking the liberty of telling you that as a beginner, you have to make beginner’s orders.
Never aim at something too complicated to avoid quickly becoming disgusted.
We learn to walk before knowing how to run.

 

In the file you give we find advanced expressions, examples of Lee MAC (almost the best) there are even reactors !!! .
To LEARN, that’s not at all what you should aim for.
If you learn to ride a bicycle, you don’t start with the Tour de France, do you?

 

Amicalement

 

Éternel débutant.. my site for learning : Programmer dans AutoCAD

DA

EESignature

Message 5 of 13

DGCSCAD
Collaborator
Collaborator

A very good resource for learning LISP, which is installed with AutoCAD: The Garden Path

AutoCad 2018 (full)
Win 11 Pro
0 Likes
Message 6 of 13

cclawsonD6QHU
Explorer
Explorer

thank you for that I will pick it up.

0 Likes
Message 7 of 13

-didier-
Advisor
Advisor

Bonjour @cclawsonD6QHU 

 

You can use the contact form, and we will have the opportunity to discuss with your examples and questions.

 

Amicalement

Éternel débutant.. my site for learning : Programmer dans AutoCAD

DA

EESignature

0 Likes
Message 8 of 13

Sea-Haven
Mentor
Mentor

Afralisp has some tutorials.

 

Kindle books has ecopy of learning lisp, dont worry if a couple of versions behind will still be very useful, I got 3 books by Togores, Reinaldo very cheap and nice thing is can cut and paste example code. There are other ebooks out there. just google.

 

"The Visual LISP Developers Bible.pdf" by David Stein a good book.

0 Likes
Message 9 of 13

cclawsonD6QHU
Explorer
Explorer

Thank you I will look into it.

0 Likes
Message 10 of 13

komondormrex
Mentor
Mentor
Accepted solution

@cclawsonD6QHU wrote:

just dissect the code after the fact to figure it out


first off, @Moshe-A did definitely a very interesting thing👍.

@cclawsonD6QHU, i added few lines to the original code to meet your needs. see what's added beside comments by kmdr.

as for an example, there is no need for one, just look at the modification of a block definition.

oops, just noticed that some weeps are added right where the cutouts are)

0 Likes
Message 11 of 13

cclawsonD6QHU
Explorer
Explorer

awesome thank you so much I will get it dissected and figured out.

0 Likes
Message 12 of 13

komondormrex
Mentor
Mentor

regarding oops, check this newer proper one that does not draw extra weeps in some blocks. dynamic block properties were used.

you have to consider the downsides of this approach:

1. if you apply the lisp to an unmodified dynamic block, the block definition will be changed for that particular block. so better to apply to modified dynamic block which becomes anonymous after modification, so you can change its definition as it is the one and unique.

2. such modified block instantly loses its link to a parent block. if you try to reset it, it will regain the parent block's definition.

0 Likes
Message 13 of 13

cclawsonD6QHU
Explorer
Explorer

I see that is helpful thank you.

0 Likes