guitarguy1685 Posted December 4, 2009 Share Posted December 4, 2009 Hello, i'm trying to understand some of this Lisp stuff here. Please explain the stuff in red if you would ;;;;AUTOLISP CODING STARTS HERE (prompt "\nType WSIPart to run.....") (defun C:InsP () ;;;--- Load the WSI Part DCL file (setq dcl_id (load_dialog "InsP.dcl")) [b][color=Red];;;I'm assuming this sets dcl_id to InsP dialog box.[/color][/b] ;;;---Load the dialog Definition if it is not already loaded (if (not (new_dialog "InsP" dcl_id)) [b][color=Red];;; I dont' understand this at all. [/color][/b] (exit ) );;;close if statment, i think I get the rest (start_list "lvl1" 3) (mapcar 'add_list lvl1) (end_list) (action_tile "insert" "(done_dialog)" );;; close action_tile (start_dialog) (unload_dialog dcl_id) (princ) );;;; close defun (princ) ;;;;AUTOLISP CODING ENDS HERE Quote Link to comment Share on other sites More sharing options...
MSasu Posted December 4, 2009 Share Posted December 4, 2009 The load_dialog statement load the dialog boxes defined in a DCL file (located in AutoCAD’s search path in this case) and return an integer that serves as a handle to later access in code those definitions. To prepare the dialog box for display will use the new_dialog statement – by specifying the above retained handle will be able to indicate the “source” of dialog. By testing the existence of that definition (if) will be able to decide if continue or end processing if not available. After can fill lists or images, load default data and define the actions associated with tile. Below in code will encounter the start_dialog statement which will display the interface on screen. In your example is about a DCL file named "InsP.dcl" that store a dialog definition named "InsP". Hope that this helped you. Regards, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.