need help with LISP routine...stuck in block editor

Anonymous

need help with LISP routine...stuck in block editor

Anonymous
Not applicable

I'm trying to piece together a custom LISP for coloring lines in a block.  I've been borrowing segments from several other LISPS, but my Frankenstein creation is not cooperating fully....it freezes with the block editor open.

 

I've established rules for objects, and the way its supposed to work, everything gets assigned to a layer, and then what ever is leftover should automatically go to another specific layer.  The code for that is: (t (addprop b "HILMOT-ROLLERS"))

 

Unfortunately when I put that one line of code in the LISP, it freezes with the block editor open.  I just don't understand it, I've checked all the code in the VLIDE editor, parens line up, close correctly, etc...

 

I've  attached the LISP routine and a dwg that shows what needs to happen.  Can someone resolve this for me?  Thanks in advance!

 

 

 

 

0 Likes
Reply
Accepted solutions (1)
791 Views
2 Replies
Replies (2)

Ranjit_Singh2
Advisor
Advisor

Hi neeboy042274, as always I will stress again that you need to understand how if works vs cond statement. I have not checked your entire code but making the below change executes the LISP.

 

(if t (addprop b "HILMOT-ROLLERS"))

The questionable block of code was probably pieced over from a cond statement. The block would be more ideal as a cond and not if. See if you can make that change. For now it works.

 

0 Likes

Ranjit_Singh2
Advisor
Advisor
Accepted solution

Here is the block changed to a cond block