Lisp works but only after closing and opening the drawing again

sander.van.pelt
Advocate
Advocate

Lisp works but only after closing and opening the drawing again

sander.van.pelt
Advocate
Advocate

Hello all,

I use a lisp to create multiple layer filters. Xref Filters with layers sorted by property (locked/ frozen etc.), and Non-xref filters sorted by property and sorted by layers by NL-SfB coding (mechanical installations).

But when I use this lisp, these filters don't show up. I also regularly, so not always, see that the command of this lisp (FTR) is an unknown command.
If I now save the drawing, close it and open it again, the filters are visible.

Why don't they appear immediately or do I occasionally get the message that it is an unknown command? The command must be known because the lisp is loaded every time you open/create a drawing (loaded into Startup Suite).

Previously, when using AutoCAD 2022 or lower, I had no problems with this. The problem persists since I use the lisp in AutoCAD 2023.

0 Likes
Reply
532 Views
7 Replies
Replies (7)

Jonathan3891
Advisor
Advisor

The lisp seems to be working for me with the "FTR" command.


Jonathan Norton
Blog | Linkedin
0 Likes

Kent1Cooper
Consultant
Consultant

@sander.van.pelt wrote:

.... the lisp is loaded every time you open/create a drawing (loaded into Startup Suite). ....


From Help about APPLOAD:  "The Startup Suite option loads the specified applications each time the product starts."  That's not the same as with every drawing started or opened.  Does it work as you expect if instead you have it loaded via acaddoc.lsp, which definitely runs upon starting or opening every drawing?

Kent Cooper, AIA

dmfrazier
Advisor
Advisor

Could this be a Trusted Locations issue?

 

dmfrazier_0-1679689309944.png

 

0 Likes

john.uhden
Mentor
Mentor

@sander.van.pelt ,

Are you a relative of Lucy and Linus?

John F. Uhden

0 Likes

sander.van.pelt
Advocate
Advocate
Path to/ location with my lisps is added to the trusted locations
0 Likes

sander.van.pelt
Advocate
Advocate
Maybe very distant relatives but I don't know them
0 Likes

sander.van.pelt
Advocate
Advocate

Hello @Kent1Cooper,

Because we also work with another application within AutoCAD for drawing mechanical installations, another acaddoc.lsp is already loaded. We are not authorized to modify it.
So adding any lisp is not possible.

But first, when using 2022 or lower, I didn't have this problem with this lisp. There he was loaded the same as I have now. It's in both my appload and startup.

But my filter lisp is the only lisp that doesn't work as it should. When I open AutoCad (via the AutoCad shortcut and not by opening an existing drawing) and use this lisp in drawing 1, I see "...All layer filters have been created." in my command bar. But the filters are not created/visible in my Layer Properties Manager. They are visible when saving and reopening drawing 1 again.


So the lisp is in my Startup Suite and should be loaded as soon as AutoCad starts. But it doesn't work in the very first drawing either.

My other lisp files/commands work fine. These are also loaded with my loaded applications and startup suite. Why do they work and do they continue to work if I open several drawings in 1 AutoCad window, so these shouldn't actually be loaded?

"The Startup Suite option loads the specified applications each time the product starts." That's not the same as with every drawing started or opened"
Although I've been using AutoCad since AutoCad 2007, I've always thought that all the lisps you want loaded with every drawing you create/open should be in the startup suite.


But;
- If I now remove all lips from my startup suite
- I restart AutoCad
- Enter a command from a lisp of mine
- I read the message that it is an unknown command
- Then upload the lisp in Startup Suite (not the filter lisp)
- Open a new drawing (without closing AutoCad)
- Enter the lisp command
- The lisp/ command works

But I uploaded the lisp in Startup Suite. But I didn't restart AutoCad, I just made a new drawing. It should therefore not actually be loaded with the new drawing.

Or do I understand that wrong? I read "each time the products starts" as "once AutoCad opens it starts all applications for all files until AutoCad exits again".




 

0 Likes