rlx Posted April 12, 2019 Posted April 12, 2019 in this code (defun chk_ok () (if (vl-every '(lambda (x)(> x 0)) (list i-eslot i-doorn i-aansluit i-kabeldoorv))(mode_tile "accept" 0)(mode_tile "accept" 1))) every index pointer to the popuplists is checked whether their value is greater than 0. When you select an item from a popuplist a number is returned, starting from 0. So when you select the first item from such a list the number 0 is returned (nth 0 your-list). The chk_function just performs a simple test to see if every selected item is 1 or higher , meaning you have selected something. If you you don't care about all the other popups , the only one you'd have to check would be the first one , in this case i-eslot , so (defun chk_ok ()(if (> i-eslot 0)(mode_tile "accept" 0)(mode_tile "accept" 1)) other thing : (setq blkn (strcase blkn)) if you missed or didn't pick anything this will error so I would advise (if blkn (setq blkn (strcase blkn))) even better would be (if (or (not blkn) (not (member (strcase blkn) '("U00016" "ESLOT" "DEURMODEL 01".... etc etc etc))))) (progn (prompt "verkeerd symbool geselecteerd") (c:GetBlkName))) you might even consider make a variable for example valid-block-names and put it in the init section like (setq valid-block-names (list "U00016" "ESLOT" "DEURMODEL 01".... etc etc etc)) that way previous code could be rewritten as (if (or (not blkn) (not (member (strcase blkn) valid-block-names)))(progn(prompt"verkeerd symbool geselecteerd") (c:GetBlkName))) Quote
pmxcad Posted April 12, 2019 Author Posted April 12, 2019 Robert thanks for your reply. I already suspected that it had to be something like that because otherwise those rows have no value and then the OK button does not work. and (setq blkn (strcase blkn)) is because there are two versions of the blocks with or without capitals. He works great, but your sugestions are definitely worth trying. For example, to put everything in a list. By the way, is it possible to adjust this routine to 3 edit boxes and only OK when all 3 are filled. I have an example "Tests deurnummer" (not yet fully working) Jaap Tests deurnummer.lsp Quote
pmxcad Posted April 12, 2019 Author Posted April 12, 2019 Robert, It still doesn't work as I thought. Maybe I didn't explain it well. For example, if I choose the first row, the OK button must become selectable. ; RLx 2019 J. Marchal 11-04-2019 ;========== Invullen =================================================================================================================== (defun c:Invullen-eslot ( / fp fn dcl drv i-eslot i-doorn i-aansluit i-kabeldoorv eslots-types current-eslot-data) (command "model") (c:GetBlkName) (princ) (command "qsave") ) ;========== Eind Invullen ================================================================================================================ ;========== GetBlkName ================================================================================================================ (defun c:GetBlkName (/ blkn) (vl-load-com) (defun rundcl () (init_variables) (create_dcl) (start_dcl) );defun ;-------------- block select -- get blockname ------------------------------------------ (cond ((and (setq ent (car (entsel))) ; "\nSelect Block Entity: " (eq (cdr (assoc 0 (entget ent))) "INSERT") (setq blkn (vla-get-effectivename (vlax-ename->vla-object ent))) ))) (setq blkn (strcase blkn)) ;-------------- if selected block is NOT...., ----- start "GetBlkName" again ------------------------------------- (if (not (or (= blkn "U00016") (= blkn "ESLOT") (= blkn "DEURMODEL 01") (= blkn "DEURMODEL 02") (= blkn "DEURMODEL 03") (= blkn "DEURMODEL 04") (= blkn "DEURMODEL 05") (= blkn "DEURMODEL 06") (= blkn "DEURMODEL 12") (= blkn "DEURMODEL 17") (= blkn "DEURMODEL 18") (= blkn "DEURMODEL 21") (= blkn "DEURMODEL 22") (= blkn "NR2") (= blkn "NR1") (= blkn "POORTMODEL1") (= blkn "POORTMODEL2") (= blkn "POORTMODEL3") (= blkn "POORTMODEL4") (= blkn "POORTMODEL5") );or );not (progn (prompt "verkeerd symbool geselecteerd") (c:GetBlkName) );progn );if ;-------------- if selected block is .... --------------------- (if (= blkn "U00016") (progn (command "select" ent "") (setq set1 (ssget "p")) (rundcl) );progn );if ;-------------- if selected block is .... --------------------- (if (= blkn "ESLOT") (progn (command "explode" ent ) (command "select" ent "") ;(setq set1 (ssget "p")) (setq set1 (ssget "P" '((0 . "INSERT") (2 . "U00016")))) (rundcl) );prog );if ;-------------- if selected block is .... --------------------- (if (or (= blkn "DEURMODEL 01") (= blkn "DEURMODEL 02") (= blkn "DEURMODEL 03") (= blkn "DEURMODEL 04") (= blkn "DEURMODEL 05") (= blkn "DEURMODEL 06") (= blkn "DEURMODEL 12") (= blkn "DEURMODEL 17") (= blkn "DEURMODEL 18") (= blkn "DEURMODEL 21") (= blkn "DEURMODEL 22") (= blkn "NR2") (= blkn "NR1") (= blkn "POORTMODEL1") (= blkn "POORTMODEL2") (= blkn "POORTMODEL3") (= blkn "POORTMODEL4") (= blkn "POORTMODEL5") );or (progn (Load "//REDAPP02/Program/05 - AutoCAD/01 - Toolpallets/Release 02/00 - Tools/Invullen deur nummer.LSP") (c:Invullen-Deurnummer-selectie) (command "select" ent "") (setq ss(ssget "P" (LIST '(2 . "U00016")))) (rundcl) );prog );if );defun ;========== Eind GetBlkName ====================================================================================================== ;========== Init Variables ========================================================================================================== (defun init_variables () (mapcar '(lambda (x)(set x 0)) '(i-eslot i-doorn i-aansluit i-kabeldoorv)) (setq Data '( ("Maak een keuze") ("Elektrische-sluitplaat-incl-schootcontact") ("2Elektrische-sluitplaat-dagschoot") ("M82BM-buiten-draaiend") ("M82SCFM-binnen-draaiend" ) ("Solenoide-slot-enkelzijdig-stkmt92" ("Maak een keuze" "Doornmaat-30" "Doornmaat-35" "Doornmaat-40" "Doornmaat-45" "None") ("Maak een keuze" "Aansluitkabel-6mtr" "Aansluitkabel-10mtr" "None") ("Maak een keuze" "Inbouw-kabeloverbrenger-openingshoek-max-180graden" "Opbouw-kabeldoorvoer-RVS" "Opbouw-kabelovergang-50cm" "None")) ("Solenoide-slot-dubbelzijdig-stkmt92" ("Maak een keuze" "Doornmaat-30" "Doornmaat-35" "Doornmaat-40" "Doornmaat-45" "None") ("Maak een keuze" "Aansluitkabel-6mtr" "Aansluitkabel-10mtr" "None") ("Maak een keuze" "Inbouw-kabeloverbrenger-openingshoek-max-180graden" "Opbouw-kabeldoorvoer-RVS" "Opbouw-kabelovergang-50cm" "None")) ("Solenoide-slot-enkelzijdig-stkmt72" ("Maak een keuze" "Doornmaat-55" "Doornmaat-60" "Doornmaat-65" "Doornmaat-80" "Doornmaat-100" "None") ("Maak een keuze" "Aansluitkabel-6mtr" "Aansluitkabel-10mtr" "None") ("Maak een keuze" "Inbouw-kabeloverbrenger-openingshoek-max-180graden" "Opbouw-kabeldoorvoer-RVS" "Opbouw-kabelovergang-50cm" "None")) ("Solenoide-slot-dubbelzijdig-stkmt72" ("Maak een keuze" "Doornmaat-55" "Doornmaat-60" "Doornmaat-65" "Doornmaat-80" "Doornmaat-100" "None") ("Maak een keuze" "Aansluitkabel-6mtr" "Aansluitkabel-10mtr" "None") ("Maak een keuze" "Inbouw-kabeloverbrenger-openingshoek-max-180graden" "Opbouw-kabeldoorvoer-RVS" "Opbouw-kabelovergang-50cm" "None")) ("Pengrendel-ML900-PG") ("Wittkopp-module") ("Aangrenzende-TBB") ) ) (setq eslots-types (mapcar 'car Data) current-eslot-data (nth i-eslot Data)) );end Variables ;========== Eind Variables ========================================================================================================== ;========== DCL ================================================================================================================= ;--------------- Start dcl --------------------------------------------------------------------------------- (defun start_dcl ( / dcl drv) (if (and (< 0 (setq dcl (load_dialog fn)))(new_dialog "eslot" dcl)) (progn (update_dialog) (action_tile "pl_eslot" "(setq i-eslot (atoi $value))(update_dialog)") (action_tile "pl_doorn" "(setq i-doorn (atoi $value))(chk_ok)") (action_tile "pl_aansluit" "(setq i-aansluit (atoi $value))(chk_ok)") (action_tile "pl_kabeldoorv" "(setq i-kabeldoorv (atoi $value))(chk_ok)") (action_tile "accept" "(done_dialog 1)") (action_tile "cancel" "(done_dialog 0)") (setq drv (start_dialog))(unload_dialog dcl)(vl-file-delete fn) ) ) (cond ((= drv 0)(princ "\nCanceled by User")) ((= drv 1)(show_eslot_setup)) (t (princ "\nOh darn...")) ) );End start dcl ;--------------- Create dcl ------------------------------------------------------------------------------ (defun create_dcl ( / fp) (if (setq fp (open (setq fn (vl-filename-mktemp ".dcl")) "w")) (mapcar ''((x)(princ x fp)) '("eslot:dialog {label=\" Unica Security\";spacer_1; :boxed_row{ width = 55; fixed_width = true; label=\"E-slot Setup\";" ":column{ spacer_1; :text{label=\"Type\";} :text{label=\"Doornmaat\";} :text{label=\"Aansluit\";}" ":text{label=\"Kabeldoorvoer\";} spacer_1;} :column{ spacer_1; children_fixed_width=true;" ":popup_list{key=\"pl_eslot\" ;width=45;}spacer; :popup_list{key=\"pl_doorn\" ;width=45;}spacer;" ":popup_list{key=\"pl_aansluit\" ;width=45;}spacer; :popup_list{key=\"pl_kabeldoorv\" ;width=50;}spacer; spacer_1;}} spacer_1; ok_cancel;}" ))) (if fp (close fp))(gc) );end create dcl ;--------------- Update dialog (inclusief check) ---------------------------------------- (defun update_dialog () (setq current-eslot-data (nth i-eslot Data)) (start_list "pl_eslot") (mapcar 'add_list eslots-types) (end_list) (set_tile "pl_eslot" (itoa i-eslot)) (start_list "pl_doorn") (mapcar 'add_list (nth 1 current-eslot-data)) (end_list) (set_tile "pl_doorn" (itoa i-doorn)) (start_list "pl_aansluit") (mapcar 'add_list (nth 2 current-eslot-data)) (end_list) (set_tile "pl_aansluit" (itoa i-aansluit)) (start_list "pl_kabeldoorv") (mapcar 'add_list (nth 3 current-eslot-data)) (end_list) (set_tile "pl_kabeldoorv" (itoa i-kabeldoorv)) (chk_ok) ); end update_dialog (defun chk_ok () (if (vl-every '(lambda (x)(> x 0)) (list i-eslot i-doorn i-aansluit i-kabeldoorv)) (mode_tile "accept" 0)(mode_tile "accept" 1)) );defun ;--------------- eslot Setup to setq -------------------------------------------------- (defun show_eslot_setup () (setq eslot (car current-eslot-data)) (setq doorn (nth i-doorn (nth 1 current-eslot-data))) (setq aansluit (nth i-aansluit (nth 2 current-eslot-data))) (setq kabeldoorv (nth i-kabeldoorv (nth 3 current-eslot-data))) (c:setcodes) ;(alert (strcat eslot " - " doorn " - " aansluit " - " kabeldoorv)) ;test ) ;========== Eind DCL =========================================================================================================== ;========== Set Recept/Artikel codes ================================================================================================ (defun c:setcodes ( / ARTICLECODE00 RECEPTCODE00 ARTICLECODE01 RECEPTCODE01 ARTICLECODE02 RECEPTCODE02 ARTICLECODE03 RECEPTCODE03 RECEPTCODE04 RECEPTCODE04 RECEPTCODE05 RECEPTCODE05 RECEPTCODE06 RECEPTCODE06 RECEPTCODE07 RECEPTCODE07 RECEPTCODE08 RECEPTCODE08 RECEPTCODE09 RECEPTCODE09 NETWERK) (setq ARTICLECODE "" RECEPTCODE "" ARTICLECODE00 "" RECEPTCODE00 "" ARTICLECODE01 "" RECEPTCODE01 "" ARTICLECODE02 "" RECEPTCODE02 "" ARTICLECODE03 "" RECEPTCODE03 "" ARTICLECODE06 "") ;--------------- eslot type -------------------------------------------------------------------------------------------------------------------------------------- (if (= eslot "Elektrische-sluitplaat-incl-schootcontact") (setq ARTICLECODE00 "1705HZ878-12" RECEPTCODE00 "ESS00001")) (if (= eslot "2Elektrische-sluitplaat-dagschoot") (setq ARTICLECODE00 "1705HZ12=RR" RECEPTCODE00 "ESS00002")) (if (= eslot "M82BM-buiten-draaiend") (setq ARTICLECODE00 "M82BM" RECEPTCODE00 "KLF00001" ARTICLECODE06 "ASB-82SSM")) (if (= eslot "M82SCFM-binnen-draaiend") (setq ARTICLECODE00 "M82SCFM" RECEPTCODE00 "KLF00002" ARTICLECODE06 "ZA-82 CLM Z")) (if (= eslot "Solenoide-slot-enkelzijdig-stkmt92") (setq ARTICLECODE00 "EL460" RECEPTCODE00 "SSLOT001" ARTICLECODESLOT "EL460" )) (if (= eslot "Solenoide-slot-dubbelzijdig-stkmt92") (setq ARTICLECODE00 "EL461" RECEPTCODE00 "SSLOT002" ARTICLECODESLOT "EL461" )) (if (= eslot "Solenoide-slot-enkelzijdig-stkmt72") (setq ARTICLECODE00 "EL560" RECEPTCODE00 "SSLOT003" ARTICLECODESLOT "EL560" )) (if (= eslot "Solenoide-slot-dubbelzijdig-stkmt72") (setq ARTICLECODE00 "EL561" RECEPTCODE00 "SSLOT004" ARTICLECODESLOT "EL561" )) (if (= eslot "Pengrendel-ML900-PG") (setq ARTICLECODE00 "ML900 PG" RECEPTCODE00 "PG000001")) (if (= eslot "Wittkopp-module") (setq ARTICLECODE00 "Wittkopp1000" RECEPTCODE00 "HOV00001")) (if (= eslot "Aangrenzende-TBB") (setq ARTICLECODE00 "Aangrenzende TBB" RECEPTCODE00 "Receptcode slot aanwezig in aangrenzende TBB ruimte" ARTICLECODE03 "Stepdiode" RECEPTCODE03 "SD000001")) (if (= eslot "None") (setq ARTICLECODE00 "slotkeuze maken" RECEPTCODE00 "geen slotkeuze gemaakt")) ;---------- doornmaat ------- (if (= doorn "Doornmaat-30") (setq ARTICLECODE01 (STRCAT ARTICLECODESLOT "/30"))) (if (= doorn "Doornmaat-35") (setq ARTICLECODE01 (STRCAT ARTICLECODESLOT "/35"))) (if (= doorn "Doornmaat-40") (setq ARTICLECODE01 (STRCAT ARTICLECODESLOT "/40"))) (if (= doorn "Doornmaat-45") (setq ARTICLECODE01 (STRCAT ARTICLECODESLOT "/45"))) (if (= doorn "Doornmaat-55") (setq ARTICLECODE01 (STRCAT ARTICLECODESLOT "/55"))) (if (= doorn "Doornmaat-60") (setq ARTICLECODE01 (STRCAT ARTICLECODESLOT "/60"))) (if (= doorn "Doornmaat-65") (setq ARTICLECODE01 (STRCAT ARTICLECODESLOT "/65"))) (if (= doorn "Doornmaat-80") (setq ARTICLECODE01 (STRCAT ARTICLECODESLOT "/80"))) (if (= doorn "Doornmaat-100") (setq ARTICLECODE01 (STRCAT ARTICLECODESLOT "/100"))) (if (= doorn "None") (setq ARTICLECODE01 "")) ;---------- aansluit ------- (if (= aansluit "Aansluitkabel-6mtr") (setq ARTICLECODE02 "EA218" RECEPTCODE02 "ASK00002")) (if (= aansluit "Aansluitkabel-6mtr") (setq ARTICLECODE02 "EA219" RECEPTCODE02 "ASK00001")) (if (= aansluit "None") (setq ARTICLECODE02 "" RECEPTCODE02 "")) ;---------- kabeldoorv --------------------------------------------------------------------------------------------------------------------------------------------------------------------- (if (= kabeldoorv "Inbouw-kabeloverbrenger-openingshoek-max-180graden") (setq ARTICLECODE03 "EA281" RECEPTCODE03 "KDV00002")) (if (= kabeldoorv "Opbouw-kabeldoorvoer-RVS") (setq ARTICLECODE03 "10325" RECEPTCODE03 "KDV00001")) (if (= kabeldoorv "Opbouw-kabelovergang-50cm") (setq ARTICLECODE03 "DL050" RECEPTCODE03 "KDV00003")) ; (if (= kabeldoorv "None") (setq ARTICLECODE03 "" RECEPTCODE03 "")) (if (and (= kabeldoorv "None") (/= eslot "Aangrenzende-TBB")) (setq ARTICLECODE03 "" RECEPTCODE03 "")) ;---------- invullen block --------------------------------------------------------------------------------------------------------------------------------------------------------------- (load "//REDAPP02/Program/05 - AutoCAD/01 - Toolpallets/Release 02/00 - Tools/Invullen receptcodes.lsp") ;load external lisp (C:ARTICLECODE0) (C:RECEPTCODE0) (C:ARTICLECODE1) (C:RECEPTCODE1) (C:ARTICLECODE2) (C:RECEPTCODE2) (C:ARTICLECODE3) (C:RECEPTCODE3) ; (C:ARTICLECODE4) ; (C:RECEPTCODE4) ; (C:ARTICLECODE5) ; (C:RECEPTCODE5) (C:ARTICLECODE6) ; (C:RECEPTCODE6) ; (C:ARTICLECODE7) ; (C:RECEPTCODE7) ; (C:ARTICLECODE8) ; (C:RECEPTCODE8) ; (C:ARTICLECODE9) ; (C:RECEPTCODE9) ; (C:NETWERK) (princ) ;(exit) );end setcodes ;========== Eind Set Recept/Artikel codes ============================================================================================ (prompt "\nDBBS eslot add-on geladen") (prin1) Jaap Quote
rlx Posted April 12, 2019 Posted April 12, 2019 (vl-load-com) (defun c:invullen-deurnummer ( / dcl_id fname vanruimte naarruimte deurnummer) (setq vanruimte "" naarruimte "" deurnummer "") (create_dialog) (setq dcl_id (load_dialog fname)) (if (new_dialog "temp" dcl_id) (progn (set_tile "vanruimte" vanruimte) (set_tile "naarruimte" naarruimte) (set_tile "deurnummer" deurnummer) (chk_ok) (mode_tile "vanruimte" 2) (action_tile "vanruimte" "(setq vanruimte $value)(chk_ok)") (action_tile "naarruimte" "(setq naarruimte $value)(chk_ok)") (action_tile "deurnummer" "(setq deurnummer $value)(chk_ok)") (action_tile "accept" "(val1)") (start_dialog) (unload_dialog dcl_id) (alert (strcat vanruimte "-" naarruimte "-" deurnummer)) ) (alert "Unable to start dialog") ) (if (and fname (setq fname (findfile fname)))(vl-file-delete fname)) (princ) ) (defun chk_ok () (if (vl-some 'void (list vanruimte naarruimte deurnummer))(mode_tile "accept" 1)(mode_tile "accept" 0))) (defun void (x) (or (null x)(and (eq (type x) 'STR)(eq "" (vl-string-trim " \t\r\n" x))))) (defun create_dialog () (if (setq fn (open (setq fname (vl-filename-mktemp "dcl.dcl")) "w")) (write-line "temp : dialog {label=\"Unica Security\"; :boxed_row {label=\"Ruimtenummer invullen\";children_fixed_width=true; :column {:text {label=\"Van ruimte\";}:text {label=\"Naar ruimte\";}:text {label=\"Deurnummer\";}} :column {:edit_box {key=\"vanruimte\";edit_limit=10;edit_width=10;} :edit_box {key=\"naarruimte\";edit_limit=10;edit_width=10;} :edit_box {key=\"deurnummer\";edit_limit=10;edit_width=10;}}}spacer; :row {alignment=centered;fixed_width=true;ok_cancel;}}" fn)) (if fn (progn (close fn)(gc)))) (prompt "\ninvullen-deurnummer to run.....") (princ) Quote
rlx Posted April 12, 2019 Posted April 12, 2019 all you need to do is change the chk_ok to : (defun chk_ok ()(if (> i-eslot 0)(mode_tile "accept" 0)(mode_tile "accept" 1))) as soon as you make a selection in the top pop , ok button will be enabled. But... nothing might be selected yet in the other popup's. So you may have to provide a default for those (i-doorn , i-aansluit & i-kabeldoorv) like (if (= i-doorn 0)( setq i-doorn 1)) so if you didn't make a selection to automaticaly select the 1st item in the list (well actually the 2nd because index starts at 0) Quote
pmxcad Posted July 10, 2021 Author Posted July 10, 2021 Hi RLX, It's been a while since I've been on this forum. But I have a question about the above dcl lisp (camera). Is it possible that I read a block and that these values appear in the dcl menu? For example values from block: (setq temp1 "Dinion 6000 Boxcam") (setq temp2 "Varifocal SR Megapixel Lens 3.8 13mm 0.5 sensor") (setq temp3 "Pole mount mast support") (setq temp4 "Outdoor Housing") (setq temp5 ""FTP") (setq temp6 "IR Radiator-35m-to-220m") thank you in advance / alvast bedankt Jaap Quote
rlx Posted July 10, 2021 Posted July 10, 2021 Hoi Jaap, is het al weer twee jaar geleden... wat gaat de tijd snel. I hope to have a look at this later 2day / this weekend , but I don't think this would be any problem to add to the program. Not sure if a sample drawing was included in previous post but else I make my own block example for testing (after 2 years also not exactly sure what I made for you and how it looks haha) Quote
pmxcad Posted July 10, 2021 Author Posted July 10, 2021 I'll see if I have a sample drawing with the blocks and the lisp used. Quote
pmxcad Posted July 10, 2021 Author Posted July 10, 2021 (edited) RLX, I found something. it is not wat i'am use now at the moment at work. The link to the directories is not correct but this is what is on my laptop. At work I have a much newer one that I have modified quite a bit. But this was the idea in 2019. You see that for each item from the menu there is an article code and a recipe code that is entered in the block. So when reading that block, these have to be converted back to item from the menu. (if (= "....") (setq temp1 "....") );if Camera.lsp Camera.dwg Invullen receptcodes.lsp Invullen receptcodes.lsp Edited July 11, 2021 by pmxcad Quote
rlx Posted July 10, 2021 Posted July 10, 2021 so if I understand correctly , after you make a valid selection of a camera block , "U00031" , you want popup lists in dialog preset with block values. This can only work reliable if block has exactly the same values as used in these popup lists. Which attribute from block U00031 is linked with which popup list? For example which attribute from U00031 will contain "Dinion 6000 Boxcam" , same for type , housing etc... Quote
pmxcad Posted July 10, 2021 Author Posted July 10, 2021 That's correct rlx. For example, at the end of the lisp routine you can see what info is written to the block when an option is selected from the menu. Use this again to use info again to get this from the attributes. ARTICLE CODE00 (camera) ARTICLE CODE06 (lens) ARTICLE CODE07 (mount) ARTICLE CODE08 (housing) NETWORK (cable) So if ARTICLECODE00 is "NBN-50022-C" then in the menu it is "Dinion 5000 Boxcam" and if ARTICLECODE06 is "LVF-5003N-S3813" then in the menu it is "Varifocal SR Megapixel Lens 3.8 13mm 0.5 sensor" etc etc Quote
pmxcad Posted July 10, 2021 Author Posted July 10, 2021 But you don't have to adjust the entire lisp. If you can indicate which part I need to adjust (with an example) then I would like to try it myself. Quote
BIGAL Posted July 10, 2021 Posted July 10, 2021 Rlx if you look at getattributes, its easy then to do vlax-for and make a list of the attribute values, then call one of the many dcl list dcl codes. I also use my Multi radio buttons lisp. Using getattributes means any block can be picked. I am sure I don't need to post code for you. I also have same for Dynamic block when setting visibility again just gets all visibility states. Quote
rlx Posted July 11, 2021 Posted July 11, 2021 thanx for the advise Bigal think its just a matter of reading relevant attributes and via association list link acticle code with type and set popup_list. but for now it's for me Quote
rlx Posted July 11, 2021 Posted July 11, 2021 untested so 'garantie tot aan de deur' Camera_11-Jul-2021.lsp Quote
pmxcad Posted July 14, 2021 Author Posted July 14, 2021 hi rlx, I tried but I have to admit I can't figure it out. It's harder than I thought. I did figure out that cond vs if you used. Works well. I did add getattributes with the conversion from attribute to menu items. I expected it to be possible with variables, but I don't think that's the case. What you have put below should I add or replace parts? Please help, advice. regards, Jaap Camera.lsp Quote
rlx Posted July 14, 2021 Posted July 14, 2021 Hoi Jaap , yeah I know its a little bit more complicated than meets the eye , this is because , at your request , not every camera has the same options for lens , housing or mount. So you have to take that into account too. These options are defined in the init variable part (in variable Data to be precise). So when you select a camera , you also have to populate the popup lists with the correct options. Right now I'm working late , hoping to catch up to some lost time because of Murphy (lost 3 days because company laptop was with IT , half a day because internetprovider went off line and today the wife had to go to hospital so its true what they say , all good things come in three but apparently also the bad things come in three). Anyways , not to spill my life story here but so you know it may take some time before I can sit down and have a look. cheers Quote
rlx Posted July 15, 2021 Posted July 15, 2021 One question , when you select a camera-block and dialog is populated with the relevant data in the popup_list's , what's next? Is this for info only or do you expect to to anything else with this knowledge? If this is for info only a simple retrieve attributes and use of the alert function in combination with some digital ductape would be sufficient. Quote
pmxcad Posted July 15, 2021 Author Posted July 15, 2021 The engineers fill in these blocks. They choose a camera with options. This includes article codes and recipe codes. These are data that calculation needs for price calculation. (export to Excel) But if they have to adjust the camera/options, they see the above data in the blocks. But they would like to see the description as it is now in the menu and then adjust it if necessary. The senior engineers know the data in the blocks, but the young engineers do not. Jaap Quote
Recommended Posts
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.