Jump to content

translate please


guitarguy1685

Recommended Posts

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

Link to comment
Share on other sites

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,

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