Jump to content

Recommended Posts

Posted (edited)

hi

I'm running a lisp that set a fixed color to a block member (without the need to open the block). for completely unknown reason I get an error;

error: Automation Error. Key not found

when I select a block to be colored.

 

I've tried to run the lisp on different systems with different AutoCAD versions but I got the same error.

 

the lisp developer experience no error. the only difference in our systems is our windows local language.

Please help

 

Autocad 2017

Autocad Architecture 2018

win 7 & 10

 

Thanksdvl-19-001_V4.LSP

Edited by samifox
Posted
23 minutes ago, rlx said:

do you have layer "San" in your drawing?

 

Yeah, I think that's it.

 

So, on line 64 it says

 

(vla-put-layer y lay)

 

Replace that by

 


      (if (tblsearch "LAYER" lay)
        (vla-put-layer y lay)
      )

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...