DCL

DCL

sanju.p
Enthusiast Enthusiast
1,025 Views
6 Replies
Message 1 of 7

DCL

sanju.p
Enthusiast
Enthusiast

Hello everyone,

Kindly find the below image, which one is dcl coding and other is lisp coding.

My intention is to get the dialog box on AutoCAD drawing screen.

When I load and run the lisp file its empty. Please help me to find where I am doing wrong.

 

Thanks in advance

Basic learner.

 

 

IMG_20171211_224519.jpgIMG_20171211_224504.jpg

0 Likes
1,026 Views
6 Replies
Replies (6)
Message 2 of 7

rkmcswain
Mentor
Mentor
Are the .lsp and the .dcl file in a folder that is included in the support file search path?
R.K. McSwain     | CADpanacea | on twitter
0 Likes
Message 3 of 7

sanju.p
Enthusiast
Enthusiast
Support file search path...?

Sir , I have those two files in a same folder.
0 Likes
Message 4 of 7

rkmcswain
Mentor
Mentor
Is AutoCAD can't find the .DCL file, it can't load it.

Just because the .DCL file is in the same folder as the .LSP, does not make AutoCAD find it.

Support File Search Path:

https://knowledge.autodesk.com/support/autocad/getting-started/caas/CloudHelp/cloudhelp/2016/ENU/Aut...


R.K. McSwain     | CADpanacea | on twitter
0 Likes
Message 5 of 7

sanju.p
Enthusiast
Enthusiast
Thank you so much for your reply sir.
0 Likes
Message 6 of 7

scot-65
Advisor
Advisor
DCL file, Line 4 is missing the ending semi-colon ";".

An alert type box would have informed you had the
DCL file was actually trying to load.

For testing purposes, create a "working" folder that contains
your LSP, DCL and a "blank" DWG file.
Open that DWG file and load the LSP.
Trusted location dialog warning may pop up. Select the "Load" button.

Also, please take care of the Gremlins.
(defun c:WELCOME ( / dcl_id) ...

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

Message 7 of 7

smaher12
Advocate
Advocate
welcome : dialog {
   label = "AutoLISP";

    : text {
      label = "Welcome to the world of AutoLISP sir";
    }
    
    : text {
      label = "Have a good time";
    }

    ok_cancel;
} // end welcome

 

(defun c:welcome ()

    (setq dcl_id (load_dialog "welcome.dcl"))
      (if (not (new_dialog "welcome" dcl_id))
        (exit)
      )

   (action_tile "accept" "(done_dialog)")
   (action_tile "cancel" "(exit)")
    (start_dialog)
     (unload_dialog dcl_id)
      (princ)
 );end activate
0 Likes