• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

lisp e dcl

  • Thread starter Thread starter mobile
  • Start date Start date

mobile

Guest
Hello everyone,
I would like to begin learning dcl, which from what I have understood are in practice dialogue windows that can be created, example lists, buttons, etc..., someone would know to indicate me of guides in Italian for programming in dcl and how to integrate it with lisp, which I found information only in English; and I would like to understand well the basis of the commands and how to integrate dcl with lisp, but with English me the cable to 50% and therefore many things do not understand:(
I hope someone can help me
thanks in advance and good afternoon
mobile mobile
 
Hello everyone,
I would like to begin learning dcl, which from what I have understood are in practice dialogue windows that can be created, example lists, buttons, etc..., someone would know to indicate me of guides in Italian for programming in dcl and how to integrate it with lisp, which I found information only in English; and I would like to understand well the basis of the commands and how to integrate dcl with lisp, but with English me the cable to 50% and therefore many things do not understand:(
I hope someone can help me
thanks in advance and good afternoon
mobile mobile
Hi.
I can't help you because I'm not experienced in dcl.
However I asked a similar question and, through the help of some users, I managed to make a simple dcl pane where there are 2 variables that are passed to lisp for processing. It is starting that by replicating the instructions you can add more variables. It is therefore a panel that can be used several times. I think it's a good start, simple, and then experience more complex programs.
I send you the simple program description brackets.lsp and inputbox.dcl
to execute it (load "description brackets").
Hi.
 

Attachments

Thank you very much for your availability!

in these days I was "" crazy looking for some solution, now with this example I got a little bit sloppy and ideas on how the system works

Starting from the two published files I came up with creating a lisp program like this:
Code:
(setq step (getdist "\nindicates the step of the iron, in meters: ")

(setq Passox (fix (* step 100)))

(setq diameter (getdist "\nindicates the diameter of the iron, im mm: ")

(setq pz1 (/ (getdist "indca from where the iron of this position should be laid") step))

(setq pastilla (strcat (rtos pz1 2 2) "%%c" (rtos diameter 2 2)"/"(rtos stepx 2 2))

(command "_text" breaks "0.125" pastel breaks)
...then problems begin to arise at this point... when I want to "transform" the esp... and join it to the dcl file:
Code:
(setq dcl_id (load_dialog "contaferri.dcl");
(if (not (new_dialog "contaferri" dcl_id)); these two functions I could not create from zero
(exit) ; I took them from the beton file, I am not sure to use so
;

(setq step 0.15) ;->0.15 should be a default vlaore, which is already inserted automatically in the dcl program, which can then change

(setq stepx (* step 100)); multiply the x100 step so as to have it in cm

(setq diameter 10) ; set the default value of the diameter in 10 mm

; now we pass to give the distance of where the iron is to be laid, then everything will be inserted in the form of text in autocad

(setq pz1 (/ (getdist "indca from where the iron of this position should be laid") step))

(setq pastilla (strcat (rtos pz1 2 2) "%%c" (rtos diameter 2 2)"/"(rtos stepx 2 2))

(command "_text" breaks "0.125" pastel breaks)

;
Code:
//inzio dcl

inputbox: dialog {
  label="contaferri";
   spacer_1;
   : edit_box {
    label = "inserisci il passo del ferro, in metri";
    height = 1;
    is_bold = true;
    key = "passo";
    edit_width =40;
    edit_limit = 256;
    allow_accept = true;
   }
   : edit_box {
    label = "inserisci il diametro del ferro, in millimetri";
    is_bold = true;
    key = "diametro";
    edit_width =40;
    edit_limit = 256;
    allow_accept = true;
   }


   spacer_1;
  ok_cancel;
}

//fine dcl
here a small scheme of operation:
Schema.webpI hope someone can help me on how to fix my dcl file, that when loading in autocad every time I jam

Sorry about the length of the message.. .

Meanwhile I wish a good evening to all, and congratulations for the wonderful forum!

mobile mobile
 
hi mobile
I, like you, am inexperienced with dcl, and recently I approached the world of lisp.
here are people and really fantastic and guru both of the lisp and of the dcl ti allego 2 addresses you can consult. . .I am in English...but in the programming world you will find almost everything in English...small tip uses online translators...at least to have a maximum idea of the concept.
http://web2.airmail.net/terrycad/tutorials/mydialogs.htmhttp://www.afralisp.net/dialog-control-language/:finger:: finger:
 
I, like you, am inexperienced with dcl, and recently I approached the world of lisp.
here are people and really fantastic and guru both of lisp and dcl
xanadu65 I agree to 200% what the said! !

(I had not thought about using the translator. . . )

I tried for almost three orettes to correct my lisp and dcl, but autocad always gives me the same mistake that gave me last night:
errore.webpI don't understand what it might be reported. and where you error...:confused:
Code:
(setq dcl_id (load_dialog "contaferri.dcl"))
(if (new_dialog "contaferri" dcl_id))
(exit)
)

(Sectq Step 0.15)

(Sectq Passox (* step 100)

(setq diameter 10)


(setq pz1 (/ (getdist "indca from where the iron of this position should be laid") step))

(setq pastilla (strcat (rtos pz1 2 2) "%%c" (rtos diameter 2 2)"/"(rtos stepx 2 2))

(command "_text" breaks "0.125" pastel breaks)

;


e il dcl:
Code:
//inzio dcl

inputbox: dialog {
  label="contaferri";
   spacer_1;
   : edit_box {
    label = "inserisci il passo del ferro, in metri";
    height = 1;
    is_bold = true;
    key = "passo";
    edit_width =40;
    edit_limit = 256;
    allow_accept = true;
   }
   : edit_box {
    label = "inserisci il diametro del ferro, in millimetri";
    is_bold = true;
    key = "diametro";
    edit_width =40;
    edit_limit = 256;
    allow_accept = true;
   }

   spacer_1;
  ok_cancel;
}

//fine dcl

qui i file:View attachment CONTAFERRI.lspView attachment CONTAFERRI.dclthanks in advance and greetings

mobile mobile
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top