Visual LISP, AutoLISP and General Customization
cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 

newbie question

24 REPLIES 24
Reply
Message 1 of 25
qkakkel
818 Views, 24 Replies

newbie question

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.

 

24 REPLIES 24
Message 2 of 25
paullimapa
in reply to: qkakkel

explorer the tutorial on this website:

https://www.afralisp.net/dialog-control-language/


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 3 of 25
qkakkel
in reply to: paullimapa

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.

Message 4 of 25
paullimapa
in reply to: qkakkel

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. 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 5 of 25
qkakkel
in reply to: paullimapa

I already did it several times and some are working and some are not working , and when this happens I give up hope.

 

Message 6 of 25
paullimapa
in reply to: qkakkel

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. 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 7 of 25
Sea-Haven
in reply to: qkakkel

 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.

SeaHaven_0-1700619442267.png

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

 

 

 

 

 

Message 8 of 25
qkakkel
in reply to: paullimapa

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 .

Message 9 of 25
paullimapa
in reply to: qkakkel

the afralisp site is the way to go


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 10 of 25
qkakkel
in reply to: paullimapa

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.

Message 11 of 25
paullimapa
in reply to: qkakkel

best for you to post the entire lisp & dcl code for community to help you troubleshoot. Otherwise we're just guessing what is needed.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 12 of 25
qkakkel
in reply to: paullimapa

The code that I have so far is in Dutch.

Message 13 of 25
paullimapa
in reply to: qkakkel

that's fine. I'm sure there are those who can read dutch in this forum that can help..just post it.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 14 of 25
qkakkel
in reply to: paullimapa

I rather don't want to post it on internet .
Because I want to make a program that not consist here in the Netherlands.
Message 15 of 25
paullimapa
in reply to: qkakkel

then unfortunately, no one can help you


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 16 of 25
qkakkel
in reply to: paullimapa

I want to make a program to calculate everything to build a coldstore , here in the Netherlands is not something like that.
That is why I try to make it.

Message 17 of 25
Sea-Haven
in reply to: qkakkel

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.

SeaHaven_0-1700784733096.png

 

 

 

Message 18 of 25
qkakkel
in reply to: Sea-Haven

Thanks for your reply , but it is not working on my pc or I am doing something wrong !
Message 19 of 25
john.uhden
in reply to: Sea-Haven

That looks more like a window sash than a window frame.

<A non-architectural civil>

John F. Uhden

Message 20 of 25
john.uhden
in reply to: Sea-Haven

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.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report