Code Red => AutoLISP (Vanilla / Visual) => Topic started by: curmudgeon on September 15, 2022, 01:52:57 PM
Title: list processing
Post by: curmudgeon on September 15, 2022, 01:52:57 PM
it's beta. I create a list of points to draw a "section" of a house gable. I entmake the left side, perfect. I add a "special" line, different colour. it all works.
I process the list to mirror it for the right side:
but using the same variables, the line is drawn again on the left side. ???
somebody, tell me where I went wrong, please. the variable that fails is raft. I have changed the variable name (to raft), and I have "patched" the code by setq before attempting to draw the line. no joy.
Title: Re: list processing
Post by: VovKa on September 15, 2022, 03:45:34 PM
The cyan line repeated because there are two functions in the program ( repeated one ).
The way you are coding entmake with polyline and line is really very odd to me at least, so why don't you create a defun to create each entity instead of repeating the entmake as many as you are using them into your programs ?
Title: Re: list processing
Post by: curmudgeon on September 16, 2022, 10:55:51 PM
"why don't you create a defun to create each entity" because I am a complete amature, and I haven't written any lisp at all for a few years. thank you. I will go define a function now. :whistling: