I am still a newbie in lisp code so here is my question.
I have a DCL file and I need the lisp code to get it to work, (I don't know how to write the lisp code).
In the DCL file there is a width , height , and length .
I only attach a part of the DCL file.
I want the lisp code that draws the lines in a autocad drawing.
If somebody can write the code for me .
Forgive me if I mispell some words I not live in a Englisch speaking country.
explorer the tutorial on this website:
I already explored the site afralisp and also the site of Jeffrey Sanders and I read the book of Roy Harkow and the book of Lee Ambrosius.
Making DCL file is easy I have no problems with it only lisp is giving me a hard time.
I would say go back and go through each lesson very carefully executing all the examples exactly as you see them. Because even your dcl code is incomplete regardless of the lisp code.
I already did it several times and some are working and some are not working , and when this happens I give up hope.
upload one of the lisp code and dcl files here from those examples that is not working for you. What is the error message. Do a screen capture if needed to describe what you’re seeing. That would be a great start to learn from.
Ok to take the pain away, I wrote this plus more, as library routines to do what your trying to do, it only takes a couple of lines of code to work.
(if (not AH:getvalsm)(load "Multi Getvals.lsp"))
(setq ans (AH:getvalsm (list "Enter values " "Lengte " 5 4 "100" "Breedte " 5 4 "100" "Hoogte" 5 4 "100")))
(setq lengte (atof (nth 0 ans)) Breedte (atof (nth 1 ans)) Hoogte (atof (nth 2 ans)))
You just need to save Multi getvals.lsp ina support path or change the (load "D:\\fullpath name\\Multi getvals") to include full path use "\\" for directories.
A lot of us don't write a separate dcl but rather have the make a dcl as part of the lisp, using a write temp file look at attached.
Back to yours redid the dcl
widhtlen : dialog {
label = "Please enter values" ;
: column {
width = 25 ;
: edit_box { //define edit box
key = "Len" ; //give it a label
label = "Lengte :" ; //give it a lenght
mnemonic = "";
edit_width = 20 ; //30 characters
} //end edit box
//end edit box
: edit_box { //define edit box
key = "bred" ; //give it a label
label = "Breedte :" ; //give it a width
mnemonic = "";
edit_width = 20 ; //30 characters
} //end edit box
//end edit box
: edit_box {
key = "hogt" ;
label = "Hoogte :" ;
mnemonic = "";
edit_width = 20 ;
}
}
spacer_1 ;
ok_cancel ; }
(defun c:lenwidht ( / )
(setq dcl_id (load_dialog "d:\\acadtemp\\temp.dcl"))
(if (not (new_dialog "widhtlen" dcl_id))
(exit)
)
(mode_tile "Len" 2)
(action_tile "len" "(setq Lengte (atof $value))")
(action_tile "bred" "(setq Breedte(atof $value))")
(action_tile "hogt" "(setq Hoogte (atof $value))")
(action_tile "accept" "(done_dialog)")
(action_tile "cancel" "(done_dialog)")
(start_dialog)
(unload_dialog dcl_id)
(princ)
)
A few months ago we had contact ,about the site of Jeffrey Sanders the were some lines off code ,you send me the right ones .
the afralisp site is the way to go
Yesterday I forget to mention that I only need the 3 lines off code to get it work .
The rest of the code I already have .
And the DCL file I know that it is not complete but I did not copy it all.
best for you to post the entire lisp & dcl code for community to help you troubleshoot. Otherwise we're just guessing what is needed.
that's fine. I'm sure there are those who can read dutch in this forum that can help..just post it.
then unfortunately, no one can help you
The multi getvals.lsp worked in Japanese version so Dutch should not be a problem. Did you look at the updated DCL I provided used your Dutch variable naming. Making custom DCL's takes practice. Like this.
That looks more like a window sash than a window frame.
<A non-architectural civil>
John F. Uhden
That looks more like a window sash than a window frame.
[A non-architectural civil]
John F. Uhden
Can't find what you're looking for? Ask the community or share your knowledge.