|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
#1
|
|||
|
|||
Modifying relation parameter with LISP Macro
Hello,
My name is Oscar and I'm kinda new in LISP trying to learn some on myself, but we are currently working on the project that needs to be done fast and I have no time enough to complete my LISP "research". We're using parametric model with one dimension that is changeable and the others depend on the first one via applied expressions. The task is to create a startup dialog that would ask for the first parameter and then modify the parametric relation for that first dimension with the entered value. I was able to create a dialog box asking for the diameter value, but I'm kinda stuck how to pass that new value to the function of modifying the parametric relation and change it. Below is my code, any help is highly appreciated! Oscar (use-package li) (sd-defdialog 'dia-test :dialog-title "Enter Diameter" :variables '((newdiameter :value-type :number :title "New diameter"))) :local-functions '( (doit() k-action '(doit (sd-call-cmds (modify_parametric_relation "dia1" (newdiameter))) :cleanup-action '(doit (sd-call-cmds (AM_CURRENT_SHEET (sd-am-inq-curr-sheet-name))) ) ) ) |
#2
|
||||
|
||||
Re: Modifying relation parameter with LISP Macro
the cleanup action you don't need... the one u used is for annotation. but relations are 3D world.. so why manipulate Annotation when staying in 3D.
for this tiny thing a local function looks a little bit like overkill to me. typed, not tested: Code:
(in-package :my-stuff) (use-package :oli) (sd-defdialog 'dia-test :dialog-title "Enter Diameter" :variables '( (newdiameter :value-type :length :title "New diameter") ) ;; end variables :ok-action '(sd-call-cmds (modify_parametric_relation "dia1" newdiameter)) ) ;; end dialog Please use the forum tag [ code ] when posting code! Thanks.
__________________
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|