single door lisp

single door lisp

tpl_arch
Contributor Contributor
1,139 Views
10 Replies
Message 1 of 11

single door lisp

tpl_arch
Contributor
Contributor

Can someone please tell me why this lisp works in R14 and not in 2008?

The routine starts fine but ends half way through,when it asks "which side" for the door swing.

It's the only one of about 15 cusom routines that won't work properly in 2008.

What do I need to change to make it work?

 

0 Likes
Accepted solutions (1)
1,140 Views
10 Replies
Replies (10)
Message 2 of 11

hmsilva
Mentor
Mentor

Hello  tpl.arch and welcome to the Autodesk Community!

 

In order to be able to assist, could you please post the sub-functions used in this code?

 

Henrique

EESignature

0 Likes
Message 3 of 11

tpl_arch
Contributor
Contributor

I'm sory Henrique, but I don't know what you mean by "sub functions".

I don't write these lisps, I just use them....if you tell me where to look, I'll send you whatever you need.

thanks,

Tim

0 Likes
Message 4 of 11

hmsilva
Mentor
Mentor

@tpl_arch wrote:

I'm sory Henrique, but I don't know what you mean by "sub functions".

I don't write these lisps, I just use them....if you tell me where to look, I'll send you whatever you need.


 

Tim,

the code you've posted, have some sub-functions, store, width and brkwall, and some global variables, size >90.

 

The problem is to find where those functions and global variables are loaded, may be from acad.lsp, acaddoc.lsp, another file loaded at startup, from a menu, etc

 

Try to find those functions in one of those files...

 

Henrique

EESignature

0 Likes
Message 5 of 11

Kent1Cooper
Consultant
Consultant

@tpl_arch wrote:

I'm sory Henrique, but I don't know what you mean by "sub functions".

....


To be a little more specific, you want to look for a file, hopefully with the .lsp filetype ending, that contains somewhere in it

 

(defun store 

 

which will probably contain within it something like

 

(setq >90  and likely also  (setq thick  and  (setq ang2

 

and a file or files that contain(s)

 

(defun brkwall  and  (defun side  and  (defun width

 

Those (defun things and the code that follows them define the sub-functions or sub-routines that your posted routine uses, but that are not native AutoLisp functions.  The (setq ones are setting variables that it uses, though they may not all be there, given that it sets some of them itself it they're not set already.

 

They could all be in one file, or in separate ones, or some in one and some in another.  If they're available to you in any drawing without your loading them yourself, then they are most likely defined either in an acaddoc.lsp file directly, or in files that it loads with  (load  functions.  Look for that file, and within it for either those sub-function definitions or files that are loaded which probably contain those definitions.  Look at the latter, if any, for the sub-function definitions.  Post the contents of those if they're .lsp files, and not proprietary or something.

 

However, they could be defined in some kind of compiled file(s) with a filetype ending such .vlx or .fas, in which case you won't be able to get at the definitions -- you would need to ask whoever compiled them for the source code.

Kent Cooper, AIA
0 Likes
Message 6 of 11

tpl_arch
Contributor
Contributor

could what you're looking for be in one of these lisps?

I'm still not understanding why a similar lisp works but not the one I orignially sent.

Check out the ddr.lsp here and see if you can find out the difference.

 

 

p.s. the lisp I'm trying to sent is being rejected by this posing method:

  • The attachment's V_MAIN.LSP content type (application/octet-stream) does not match its file extension and has been removed.

Can I email it to you?

 

Thanks guys!

0 Likes
Message 7 of 11

hmsilva
Mentor
Mentor

@tpl_arch wrote:

p.s. the lisp I'm trying to sent is being rejected by this posing method:

  • The attachment's V_MAIN.LSP content type (application/octet-stream) does not match its file extension and has been removed.

 

EDIT:

if you open the file in notepad.exe, can you read the file?

If so, zipp the file and attach the .zip file, if not, the file, most likely is not a .lsp file, or is encrypted, or someone changed the file extension...

 

Henrique

EESignature

0 Likes
Message 8 of 11

tpl_arch
Contributor
Contributor

see if this works...

0 Likes
Message 9 of 11

hmsilva
Mentor
Mentor
Accepted solution

@tpl_arch wrote:

see if this works...


Hi tpl.arch,

the functions required to run the V_DR.lsp are in V_MAIN.lsp, you´ll have to load the V_MAIN.lsp before run the V_DR.lsp, and It should work as expected.

 

Hope this helps,
Henrique

EESignature

Message 10 of 11

tpl_arch
Contributor
Contributor

WOW!!!!!

You did it!!!!

Thanks so much...I never had any idea that it mattered which order they went into load apps.

I like my trusty old (very old) lisp...but it's the way we'v been drawing it for years and it looks good on our drawings.

 

Tim

 

0 Likes
Message 11 of 11

hmsilva
Mentor
Mentor

tpl.arch wrote:

Thanks so much...I never had any idea that it mattered which order they went into load apps.

I like my trusty old (very old) lisp...but it's the way we'v been drawing it for years and it looks good on our drawings.


You're welcome, Tim!


One way to ensure that the Main code is loaded in every drawing, is creating or editing if already exists the acaddoc.lsp file, and add a

(load "V_MAIN.lsp" nil)

if the .lsp file is in one of the Support File Search Path directory, or

(load "c:\\the\\full\\path\\V_MAIN.lsp" nil)

if not.

Henrique

EESignature

0 Likes