DCL Help Please

DCL Help Please

Jonathan3891
Advisor Advisor
428 Views
3 Replies
Message 1 of 4

DCL Help Please

Jonathan3891
Advisor
Advisor

I'm trying to teach myself how to write a more indepth lisp.

 

I want to create a lisp with a dialog that will ask you to select a point, then display the N, E, Z in the dialog.

 

I've looked at AfraLisp and I know how to construct the a basic dialog. I do not know how to add feactures such as "Select a point" and have those features displayed.

 

 

How can I find a list of variables that are used in lisp? For instance, (defun c:test (/ p x y z ptcoord). Where or how do I find the information "(/p x y z..."??

 

I've poked around in the visual lisp editor in AutoCAD, but I wasn unable to what I'm looking for.

 

Whats the best program to write lisp in? Is there something that works like C++ that will outline errors, etc? Again I've poked around in the lisp editor in autocad, and typed random stuff and it didnt do anything special to alert me that the function was incorrect.

 

Thanks!

 


Jonathan Norton
Blog | Linkedin
0 Likes
429 Views
3 Replies
Replies (3)
Message 2 of 4

hmsilva
Mentor
Mentor

@Anonymous_dude wrote:

I want to create a lisp with a dialog that will ask you to select a point, then display the N, E, Z in the dialog.

I've looked at AfraLisp and I know how to construct the a basic dialog. I do not know how to add feactures such as "Select a point" and have those features displayed.

How can I find a list of variables that are used in lisp? For instance, (defun c:test (/ p x y z ptcoord). Where or how do I find the information "(/p x y z..."??


Hi DSM_dude,

 

this smaher12' post, may be helpful.

 


@Anonymous_dude wrote:

I've poked around in the visual lisp editor in AutoCAD, but I wasn unable to what I'm looking for. 

Whats the best program to write lisp in? Is there something that works like C++ that will outline errors, etc? Again I've poked around in the lisp editor in autocad, and typed random stuff and it didnt do anything special to alert me that the function was incorrect.


VLIDE, it's what I use to write Visual / AUTO LISP, I don't know any editor that works like C++.

To debug try this Lee Mac Tutorial Debugging Code with the Visual LISP IDE

 

Hope this helps,
Henrique

 

 

 

EESignature

0 Likes
Message 3 of 4

paullimapa
Mentor
Mentor

I suggest you learn AutoLISP first before you think about creating dialog boxes with DCL.

 

If Afralisp is not helping, try other sites like:

http://www.cad-notes.com/using-autolisp-variable-and-asking-user-input/

 

Area Object Link | Attribute Modifier | Dwg Setup | Feet-Inch Calculator
Layer Apps | List on Steroids | VP Zoom Scales |Exchange App Store


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 4 of 4

scot-65
Advisor
Advisor

DCL can be divided into two general categories:

Show and Execute.

Loop.

 

Learn the first method before attempting the second.

 

Attached files are the very beginnings of LSP structure for both methods of DCL.

I know they are a little vague, but organizing the program from the very beginning

is essential for successful program writing.

 

Lists are your friend here. If you do not know Lists (arrays), things can get hairy.

 

And one word of advise - The dialog is ONLY for gathering user input.

Action_tile should be limited to manipulating the DCL display, and to exit.

 

In the attachments there is local variable called "sd". This is the flag that is used

to enter the "main" program to execute. The list is used to record a "snapshot"

of the dialog when OK is selected. The list can be accessed once inside the main

program.

 

From the above paragraphs, can you see two distinctive areas of a program that uses

a dialog interface?

 

If you need DCL tips and tricks, I can advise as well.

 

Look for my previous postings of about two weeks ago. I supplied two quick and

easy dialog interfaces for another member of this community.

 

Hope this helps.

 


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

0 Likes