Button to start lisp

Started by Atwist, May 16, 2011, 12:15:30 PM

Previous topic - Next topic

Atwist

Hello all

I have a make a textbutton

Code (autolisp) Select
(defun c:start_Start_Tekstlayer25_OnClicked (/)
  (dcl_MessageBox "To Do: code must be added to event handler\r\nc:start_Start_Tekstlayer25_OnClicked" "To do")
)

But where put I the code to start the lisp.
I'm do not find in the samples of opendcl.

Atwist
Atwist

I'm sorry because English is not my native language


Thanks for your help

Fred Tomke

Hello and welcome, it depends on what do you want to do. The "dcl_messagebox" line of your code sample is the line where do you have to put your code in.

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Atwist

Thanks (Danke) Fred,

Looks like this??
Code (autolisp) Select
01.(defun c:start_Start_Tekstlayer25_OnClicked (/) 
02.  (load"cl";cl;) 
03.)


Atwist
Atwist

I'm sorry because English is not my native language


Thanks for your help

Fred Tomke

Hi,

looks like a type mismatch?
I'm sure you meant

Code (autolisp) Select

(defun c:start_Start_Tekstlayer25_OnClicked (/)   
  (load "mylisp.lsp")
); c:start_Start_Tekstlayer25_OnClicked


Make sure that you don't make changes in the drawing within an event handler of a modal form using entmake or entmod. It could be that these changes will be suppressed.

Regards,
Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Atwist

Thanks Fred,

I'ts works

Thanks
Atwist

I'm sorry because English is not my native language


Thanks for your help