dcl question

I get the following error on loading this in Autocad 2000i, does anyone know why? ;AutoCAD menu utilities loaded. ;Command: appload
;EXAMPLE.LSP successfully loaded. ;Command: example ; error: quit / exit abort ;Command: example ; error: quit / exit abort
;--- EXAMPLE.lsp - Text Find (defun saveVars() ;;;--- Save the input from the dialog box (setq textVal (get_tile "textval")) ) (defun C:EXAMPLE() ;;;--- Load the dcl file (setq dcl_id (load_dialog "EXAMPLE.dcl"))
;;;--- Load the dialog definition if it is not already loaded (if (not (new_dialog "EXAMPLE" dcl_id) ) (exit))
;;;--- If an action event occurs, do this function (action_tile "cancel" "(setq ddiag 1)(done_dialog)") (action_tile "accept" "(setq ddiag 2)(saveVars)(done_dialog)")
;;;--- Display the dialog box (start_dialog)
;;;--- If the cancel button was pressed - display message (if (= ddiag 1) (princ "\n \n ...EXAMPLE Cancelled. \n ") )
;;;--- If the "Okay" button was pressed (if (= ddiag 2) (princ "\n \n ...Example Complete!") )
;;;--- Suppress the last echo for a clean exit (princ)
) ===ÜL FILE NAMED EXAMPLE.DCL=====EXAMPLE : dialog { label = "EXAMPLE.lsp"; \\ Puts a label on the dialog box initial_focus = "textval"; \\ Sets the initial focus : column { : row { : boxed_column { : edit_box { \\ The edit_box control - Something new! key = "textval"; label = "Text Value to Find"; edit_width = 30; value = ""; } } } : row { : boxed_row { : button { key = "accept"; label = " Okay "; is_default = true; } : button { key = "cancel"; label = " Cancel "; is_default = false; is_cancel = true; } } } } }
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Why do you assume it's a DCL problem and not related to the LSP?
--


MichaelB
www.michaelbulatovich.ca
  Click to see the full signature.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Doesn't Autocad first check the "current" directory and then the directory of the Cad file loading the routine even before it checks all the path stuff? I have the dcl file in the directory that lsp file is in and I'm "apploading" the lsp file so maybe I need to move them to drawing directory, I will try that. I think maybe the reason my lsp only files were running ok is because I apploaded them from their current location so it had the path from the appload. But maybe the dcl file doesn't share the appload lookup.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Have you tried to debug the file checking variable values as you go? From the error message, it seems to abort on load, so it might just be a parenthesis problem, I dunno.
Try running a simpler version of the lisp that doesn't need a dcl.
--


MichaelB
www.michaelbulatovich.ca
  Click to see the full signature.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I didn't do an in depth analysis my friend but you'll definitely have a problem with those slashes your using to add comments. They're facing the wrong way. :)
Dale

Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

=====Ok, I will try reversing them, I got this example from the following link, it runs for other people that have tried it. I'm really puzzled as to why I cannot get "any" dcl to run so far?
http://www.jefferypsanders.com/autolisp_DCL_OverView.html

Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Well I finally got some dcl files to run. I had to put the actual folder they were sitting in on the "Options>Path". Now I'm wondering if I have to do this manually on every machine I install a routine on, or is there a way to add a path from a lsp file? Or is there a way to determine the Support file Path of cad from an install application and just install it there. I've written a crude install app in C for windows that does work on all the machines in our office.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I've always put the DCLs where the LSPs go, and that folder is in the 'path' so the issue never came up.
--


MichaelB
www.michaelbulatovich.ca
  Click to see the full signature.
Add pictures here
✖
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.