Assistance Needed with Lisp Routine in AutoCAD2025

Assistance Needed with Lisp Routine in AutoCAD2025

mruPRQUJ
Advocate Advocate
715 Views
9 Replies
Message 1 of 10

Assistance Needed with Lisp Routine in AutoCAD2025

mruPRQUJ
Advocate
Advocate

Hi there,

A Lisp routine that previously worked is no longer functioning. I’m using the same version of AutoCAD, and even when I use the original Lisp file, it still fails to run.

The error message I receive is:

error: AutoCAD.Application: Key not found

 

Please see the attached Lisp for your reference.

Could you please advise on how to resolve this issue?

Thank you very much in advance for your help!

 

Best regards,

0 Likes
Accepted solutions (1)
716 Views
9 Replies
Replies (9)
Message 2 of 10

paullimapa
Mentor
Mentor

When I load & run your lisp function I immediately get this:

paullimapa_0-1747436078871.png

Can you provide these linetype definitions & a sample dwg to run this function on?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 10

mruPRQUJ
Advocate
Advocate

Please see attached line type file and a sample dwg, thank you very much for your immediate response!

0 Likes
Message 4 of 10

mruPRQUJ
Advocate
Advocate

sorry,  linetype definition is not correct, please see attached linetype definition, many thanks.

0 Likes
Message 5 of 10

paullimapa
Mentor
Mentor

missing xref:

paullimapa_0-1747437181450.png

I enter LINETYPE command and attempted to Load your acad.lin file & I receive the following linetype definition errors:

paullimapa_1-1747437216409.pngpaullimapa_2-1747437225945.pngpaullimapa_3-1747437229655.png

Then I successfully loaded the linetypes that are good into the dwg:

paullimapa_5-1747437360247.png

Then I run your lisp function and receive no errors:

paullimapa_4-1747437280977.png

 

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 6 of 10

mruPRQUJ
Advocate
Advocate
Accepted solution

I followed your instructions, it works now. It could miss some linetypes in the drawings. Thank you very much for your great support!

Have a great weekend! 🙂

0 Likes
Message 7 of 10

paullimapa
Mentor
Mentor

you are welcome...cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 8 of 10

mruPRQUJ
Advocate
Advocate

Cheers!!! Thanks again!

0 Likes
Message 9 of 10

Sea-Haven
Mentor
Mentor

Make a DWT and load your linetypes into that, a DWT is just that a template dwg that has everything you would normally use in it, its easy to do a purge and remove stuff compared to getting errors like you experienced. a last comment you can set your DWT as the default to be used when you open cad or point to a directory where you have multiple dwt's and pick correct one to use when you type "new". Our DWt had 220+ layers, similar number of blocks and acad & custom linetypes. Look under "OPTIONS"

Message 10 of 10

mruPRQUJ
Advocate
Advocate

thanks a lot!

0 Likes