Jump to content

how to manage multiple condition from updated list


Recommended Posts

Posted

Hi everyone

I went to Lee Mac web site and i found a bialog_box evry interesting

which is "LIST BOX SYNCHRONISATION".

A year ago I have created several Lisp codes to draw some french section

as 3Dsolid.

Ex: IPE HEA HEB UPN UPE. Five programmes.

With the dialog_box from lee mac i decided to modify it to suite ma need.

The idea is to create un dialog_box where i can select only one value in the list_box 1:

IPE HEA HEB UPN UPE

that update the second list_box2 with the height of the section seleted in list_box1

i want to draw: "80" "100" "120" "140" "160" "180" "200" etc........

and when i click on "OK" the code draw whatever section an size i want.

My problem is to create a first sub-fonction to watch 3 entities in the first list_box as:

IPE HEA HEB. They use the same process to define all points, draw le shape with "_.Pline"

and "_.extrud" it with the value from the edit_box "lgd".

 

Example of the process :

 

(if ddiag1    ;<-- right syntax
 (progn
(setq bpt (getpoint "\nGet base point of section 3D : "))
(setq S1 (polar bpt Pi (/ b 2)))
(setq S2 (polar S1 (/ Pi 2) tf))
(setq S3 (polar S2 0 (- (/ (- b tw) 2) r)))
(Setq PP1 (polar S3 0 r))
(setq S4 (polar PP1 (/ Pi 2) r))
(Setq S5 (polar S4 (/ Pi 2) (- h (* (+ tf r) 2))))
(setq S6 (polar S3 (/ Pi 2) (- h (* tf 2))))
(Setq S7 (list (car S1) (cadr S6)))
(Setq S8 (list (car S1) (+ (cadr S1) h)))
(setq S9 (polar S8 0 b))
(Setq S10 (list (car S9) (cadr S7)))
(Setq S11 (list (+ (car S6) (+ (* r 2) tw)) (cadr S10)))
(Setq S12 (polar S5 0 tw))
(Setq S13 (polar S4 0 tw))
(Setq S14 (list (+ (car S3) (+ (* r 2) tw)) (cadr S2)))
(Setq S15 (list (car S10) (cadr S14)))
(setq S16 (list (car S15) (cadr S1)))
;;;Get HEA Shape
(Command "_.pline"     S1     S2     S3        "ARC"  S4      "LI"     S5
    "ARC"    S6     "LI"   S7     S8        S9       S10      S11     "ARC"
    S12    "LI"   S13    "ARC"  S14    "LI"   S15      S16     S1
    ""
   )

;;;Creation of a solid_3d

(Command "_.extrude" "D" "" lgd)
)
(princ "\n\nNo Action Taken \n")
 )

However, the technical datas are not the same for all three of them.

read second attach file

At the top of that, it is quiet the same thing for the UPN and UPE.

The shape and data of the UPN, UPE are not the same.

So, the Lisp are differents (read second attach file)

Finaly i don't realy know how to write down le code for "action_tile "accept"

Could you help me to understand how to manage this.

 

Thks

 

I have added several docs to show you what i have done.

1) The dialog_box i expect to use (nota: the Lisp code have a command "Line" that just

an example to see if the dialog_box appear proprely.)

2) The precess used to create all points, shape and 3DSolid ofr IPE, HEA and HEB

Some sub-fonctions that is use to seach each section technical data

3) An example of Lisp code i created to draw a 3DSolid ex: (HEA)

lisp used to draw hea.txt

dialog_box to suit my need.txt

SUB-FONCTION TO REACH TECHNICAL DATAS.txt

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...