Nate Holt's Blog

February 17, 2010

Spreadsheet –> PLC I/O Generator utility – tracing with Visual Lisp Debugger

Filed under: Electrical — nateholt @ 10:15 am

Quick steps on a simple way to use the Visual Lisp Debugger to trace program execution of the Spreadsheet–>PLC I/O AutoLISP utility in AutoCAD Electrical.

The last posting and the Autodesk webcast on the Spreadsheet –> PLC I/O utility in AutoCAD Electrical generated a lot of interest. One user wanted to take the plunge and consider customizing the source code for this utility (file “wdio.lsp”). But he wanted to get familiar with using the Visual Lisp debugger to trace this utility as it executes and builds the I/O drawings.

Here’s one simple way to launch the Spreadsheet –> PLC I/O utility from within the Visual Lisp environment.

  1. First, find the path to the wdio.lsp utility on your machine. One way to find this is to type this at the “Command:” prompt.

(findfile “wdio.lsp”) [Enter]

2. Now start the Visual Lisp editor. Type VLIDE [Enter] at AutoCAD “Command:” prompt. Select “Open File…” and browse to the wdio.lsp utility (path you’ve found above).


3. Select the “Load Text in Editor” option as shown here:

4. At this point you should be ready to go. Maybe set a breakpoint at a key spot in the program… let’s say where the utility first starts to insert the blank “ladders” into the active drawing. Search the wdio.lsp text file for the ladder API command substring “c:wd_in_ladder”. Pop in a breakpoint here as shown.

5. Now put your cursor back into the AutoCAD command window. Type wdio [Enter] at the Command: prompt. This should launch the program, now in the Visual Lisp debug environment, and it should stop and display at your first break point. Have at it!


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: