Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Acaddoc.lsp problem

29 REPLIES 29
SOLVED
Reply
Message 1 of 30
leothebuilder
966 Views, 29 Replies

Acaddoc.lsp problem

I have a problem with our custom acaddoc lisp not loading all routines.

There are four listed to load at startup, three of these load fine, the fourth doesn't. (FrontageIncrease.lsp does not load)

Reordering the list does not have any impact.

Any suggestions? Thx

29 REPLIES 29
Message 2 of 30
hmsilva
in reply to: leothebuilder

Loading with 'load' insted of 'autoload' the FrontageIncrease, Restore and PurgeStuff.lsp, loads without error?

 

Henrique

EESignature

Message 3 of 30
leothebuilder
in reply to: hmsilva

Three load and work fine.

 

It's the Frontage Increase.lsp that refuses to load via archicondoc.lsp

 

Loading Frontage Increase.lsp via Appload works fine.

Message 4 of 30
Kent1Cooper
in reply to: leothebuilder


@leothebuilder wrote:

Three load and work fine.

 

It's the Frontage Increase.lsp that refuses to load via archicondoc.lsp

 

Loading Frontage Increase.lsp via Appload works fine.


Assuming that when you load it with Appload, you navigate to it and pick it from the list of files in the folder, you can't get the file name wrong.  Is the file name in the (autoload) function correct?  You spell it above with a space between Frontage and Increase, and two of the other files names have a space in them in their (autoload) functions, but that one does not.  Should it?

Kent Cooper, AIA
Message 5 of 30
leothebuilder
in reply to: Kent1Cooper

Yes....I checked the spelling to make sure.

 

I even tried deleting the other three in the doc.lsp and have the frontage.lsp by itself and still won't load.

Maybe there is some code within that rejects the autoload?

Strange

Message 6 of 30
BeKirra
in reply to: leothebuilder

Is that lsp in the search support file path?

How do you setup the system variable "Trustedpaths"?

Please mark "Accept as Solution" and "Like" if my reply resolves the issue and it will help when others need helps.
= ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ =
A circle is the locus of a cursor, starting and ending at the same point on a plane in model space or in layout such that its distance from a given coordinates (X,Y) is always constant.
X² + Y² = C²
Message 7 of 30
mracad
in reply to: BeKirra

You might try (findfile "acaddoc.lsp") to make sure the correct file is being loaded.
Message 8 of 30
leothebuilder
in reply to: BeKirra

Yes.....files are in the support path.

Trustedpaths variable is for 2014 products?  (ACA 2012 here)

Message 9 of 30
leothebuilder
in reply to: mracad

Yes, entering the findfile locates the file in it's proper directory and folder on the shared S-drive.

As mentioned, three lisp routines load and work, the fourth doesn't

Message 10 of 30
mracad
in reply to: leothebuilder

Have you tried Load/Check text in Editor while in VLIDE?
I'm thinking there might be a missing parenthesis or a bad line in the file.
Message 11 of 30
leothebuilder
in reply to: mracad

Just checked and VLisp Editor does not report any problems.

Message 12 of 30
dicra
in reply to: leothebuilder

Is there any error reported on startup, or info that your .lsp file is loaded correctly.

Maybe you are loading lsp two times, and second lsp is having some errors.

 

Try to add

(princ "YOUR FILE IS LOADED")

(princ)

at first line of your lsp, to see if there is any mark that file was loaded

 

 

Message 13 of 30
leothebuilder
in reply to: dicra

I added that line, but still no result on autoload with doc.lsp

Loading via appload gives me the proper alert at the command line.

I you would be kind enough to check the lisp file, maybe you can detect something that make the autoload go awry

Message 14 of 30
dicra
in reply to: leothebuilder

It works just find on my acad2012

 

In your Archicondoc.lsp name of lisp is "FrontageIncrease",

and lsp which you aploaded is just Frontage, is that maybe a problem?

 

 

Message 15 of 30
leothebuilder
in reply to: dicra

I have both the lisp and the doc.lsp both as "frontage"

I renamed them both to make sure the word spacing was not causing a problem.

 

I have both ACA and plain 2012 autocad and the problem is with both....weird.

If it works on your system with 2012, there must be something on mys system that is causing this.

I will try and see if this works or not on another user's system.

Thanks for checking.

Message 16 of 30
hmsilva
in reply to: leothebuilder

Hello leothebuilder,

 

in my previous post my advise was to 'load' the FrontageIncrease, Restore and PurgeStuff.lsp instead of using the 'autoload' function, because the 'autoload' function requires a 'cmdlist' associated with the lisp file, in order to 'load' the file when one of the commands defined in 'cmdlist' is entered by the user, this is the only possible way to load any file with the 'autoload' function.
If your Restore and PurgeStuff.lsp are loaded, likely are loaded by another way, via another lisp file, a menu or startup suite.

To 'autoload' your 'FrontageIncrease/Frontage.lsp' you'll need to have an 'autoload' call like this

 

(autoload "S:/Autocad Template/Lisp/FrontageIncrease.lsp" '("frt"))

 

to load the 'FrontageIncrease.lsp' when an user enter 'frt' at the commandline.

The 'Restore and PurgeStuff.lsp' you'll have to see which commands are defined in each lisp file, and create a 'cmdlist' in the 'autoload' call.

 

 

I hope this helps
Henrique

EESignature

Message 17 of 30
leothebuilder
in reply to: hmsilva

Thank you Henrique,

 

I tried that but again that did not work.

Message 18 of 30
hmsilva
in reply to: leothebuilder


leothebuilder wrote:

I tried that but again that did not work.


Hi leothebuilder,

I have tried with the file you've post, and the file was loaded on demand without problem.

Only with the purpose of testing, create a acaddoc.lsp only with the

(autoload "S:/Autocad Template/Lisp/FrontageIncrease.lsp" '("frt"))

 and restart AutoCAD.

Did work?

 

Henrique

 

EESignature

Message 19 of 30
leothebuilder
in reply to: hmsilva

Henrique,

 

I copied your line in a new testdoc.lsp, placed this in the search path folder, restarted autocad, and it did not work.

Weird to say the least.

 

As a further test I copied the frontage.lsp into my IBC.lsp (which works fine) and that way the frontage.lsp routine loads and works fine.

Message 20 of 30
hmsilva
in reply to: leothebuilder


leothebuilder wrote:

I copied your line in a new testdoc.lsp, placed this in the search path folder, restarted autocad, and it did not work.

 


leothebuilder,

how is the testdoc.lsp being loaded?

 

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost