Jump to content

Load lsp files automaticaly at startup, weird problem?


firavolla

Recommended Posts

Ok guys..I have 4-5 lsp routines in different files, let's say 1.lsp, 2.lsp ..., 5.lsp.

Now let's say 'var1' is the name representing a variable not only in 1.lsp, but also in 2.lsp. The difference is that in 1.lsp var1 represents let's say the content inside a dcl edit box (after the user clicks ok on the dialogue) and in 2.lsp it represents the simple result of a sum of two other variables (var1=a+b).

The way I loaded my lsp files at startup in Acad is creating the file Acad.lsp inside the main install folder of Acad itself and entering 5 lines (one for each of the lsp files) like (load "1.lsp") and so on.

The problem is, when i run Acad and try to run let's say 1.lsp, when the interpreter gets to var1 it breaks. Using !var1 I can see it's nil, although inside the lsp file it is defined something like (setq var1 (atof eb1)) where eb1 is the text in the edit box from the dialogue. If before running 1.lsp i run 2.lsp, 2.lsp is ok, and 1.lsp then does not give me anymore problems.

Any ideas? Why is this happening and how can I overcome this problem?

Thank you.

Link to comment
Share on other sites

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...