rlx Posted March 28, 2018 Posted March 28, 2018 if I read in the help file it should be possible to couple an action to a image tile (not talking about image_button) http://help.autodesk.com/view/ACD/2018/ENU/?guid=GUID-B5F8DF42-D22A-4ACC-B236-F66733DE62D6 : image { action alignment aspect_ratio color fixed_height fixed_width height is_enabled is_tab_stop key mnemonic value width } (don't tell anyone but I want a secret button) All the other tiles leave a border... but this only seem to work when I use a button / image_button (defun c:itest ( / fn fp id tst rtn) (defun tst (i)(alert (strcat "no.=" (itoa i)))) (setq fn (vl-filename-mktemp ".dcl") fp (open fn "w")) (write-line "tst:dialog{label=\"image test\";" fp) (write-line ":image{key=\"im\";color=dialog_background;boxed=false;action=\"(tst 1)\";width=5;height=5;allow_accept=true;is_tab_stop=true;}" fp) (write-line "ok_cancel;}" fp)(close fp)(gc)(setq id (load_dialog fn))(new_dialog "tst" id) (action_tile "cancel" "(done_dialog 0)") ;(action_tile "im" "(done_dialog 0)") (action_tile "accept" "(done_dialog 1)") (setq rtn (start_dialog)) (unload_dialog id) (cond ((= rtn 0)(princ "\ncancel"))((= rtn 1)(princ "\naccept"))) (princ) ) (c:itest) well having a migraine (wished it was a hangover so at least I had fun) so if anyone knows the answer I read it first thing in the morning gr. Rlx Quote
Grrr Posted March 28, 2018 Posted March 28, 2018 Wo-ho-ho, interesting news Rlx! Thats some ACAD 2018 stuff... still remember this PITA I had. Quote
BIGAL Posted March 29, 2018 Posted March 29, 2018 Not sure if this will help : boxed_row { : icon_image { width = 12; aspect_ratio = 1.0; key = "icon_noi"; } Quote
rlx Posted March 29, 2018 Author Posted March 29, 2018 Not sure if this will help : boxed_row { : icon_image { width = 12; aspect_ratio = 1.0; key = "icon_noi"; } unfortunately nope... awel, probably no secret button it is then... thanx for the effort though... gr. Rlx Quote
BIGAL Posted March 29, 2018 Posted March 29, 2018 Is (action_image "key1" "(setq val1 $value)") a undocumented ? need to make some dcl also : image { rather than icon_image need to make some dcl code for testing There seems to be a few ways to do images and what is returned. Quote
rlx Posted March 29, 2018 Author Posted March 29, 2018 Is (action_image "key1" "(setq val1 $value)") a undocumented ? need to make some dcl also : image { rather than icon_image need to make some dcl code for testing There seems to be a few ways to do images and what is returned. action_image doesn't turn blue in vlisp editor , neither as a lisp or DCL command .. pitty just wanted to hide the button for the support folders editor. No big deal though. Just had the idea for a hidden button and wondered if it was possible. IT department constantly sabotages my settings so I decided to fight back with a little tool to (re)set my environment with one click. gr. Rlx Quote
Grrr Posted March 29, 2018 Posted March 29, 2018 Rlx, If I was you I would assign a 'hidden action': Say you fill in that edit_box "reset_rlx_settings", then you press [Options] button and your environment is reset. Quote
rlx Posted March 29, 2018 Author Posted March 29, 2018 (edited) Rlx, If I was you I would assign a 'hidden action':Say you fill in that edit_box "reset_rlx_settings", then you press [Options] button and your environment is reset. and that will hide my button? great idea whahaha but seriously , many ways to get to my way and an easter-egg code is indeed one of them , but this was (is) all about whether if its possible to create a 'secret' place somewhere on a dialog. gr.Rlx Edited March 29, 2018 by rlx Quote
ronjonp Posted March 29, 2018 Posted March 29, 2018 You could also setup the action to just react to your profile: (if (= (getenv "username") "rlx") "magical stuff" "suckit minion" ) I also like Grrr's approach to react to certain phrase Quote
rlx Posted March 29, 2018 Author Posted March 29, 2018 You could also setup the action to just react to your profile: (if (= (getenv "username") "rlx") "magical stuff" "suckit minion" ) I also like Grrr's approach to react to certain phrase haha , you have a way with words too I see other option would be to make one big slide button and draw buttons on it or something and then read the coordinates but that's to much trouble for a solution a don't really have a problem to thanx for all your good advises guys! gr. Rlx Quote
Roy_043 Posted March 29, 2018 Posted March 29, 2018 This may be of interest: In one of his projects Lee Mac uses a hidden DCL button. http://www.theswamp.org/index.php?topic=30262.0 Quote
Grrr Posted March 29, 2018 Posted March 29, 2018 and that will hide my button? great idea whahahabut seriously , many ways to get to my way and an easter-egg code is indeed one of them , but this was (is) all about whether if its possible to create a 'secret' place somewhere on a dialog. gr.Rlx Just throwing an idea, but you ask a very interesting question for a 'secret button' ! You could also setup the action to just react to your profile: (if (= (getenv "username") "rlx") "magical stuff" "suckit minion" ) IMO thats the most logical solution for this certain problem of RLX's, but like he said many ways (so he chooses). This may be of interest:In one of his projects Lee Mac uses a hidden DCL button. http://www.theswamp.org/index.php?topic=30262.0 Wow nice finding Roy, Looks like this is the answer for Rlx's interesting question! The first thing I did was to look for the mnemonic(s) in Lee's code, but then remembered about this approach aswell. And this also answers my old unasked question "can you use grread while dialog (DCL) is opened?", I tested that question by myself a time ago and it didn't worked. But the technique demonstrated here provides alternative: by assigning actions to say 30 invisible buttons and work out their actions. ...and I still think that Lee is an alien whose codes need to be explored by us. Quote
rlx Posted March 29, 2018 Author Posted March 29, 2018 (edited) if I understand correctly Lee has made a image named help , color -15 and size 0.1 and added mnenomic to it... havend tried it out yet (well I had tried 0 before but that didn't work , so 0.1 is the key here) but will try 2nite or 2morrow ... if it works it works.... and one more feather for master Lee's , euh , euh , hat :-) Edited March 29, 2018 by rlx Quote
rlx Posted March 29, 2018 Author Posted March 29, 2018 Wow nice finding Roy, Looks like this is the answer for Rlx's interesting question! The first thing I did was to look for the mnemonic(s) in Lee's code, but then remembered about this approach aswell. And this also answers my old unasked question "can you use grread while dialog (DCL) is opened?", I tested that question by myself a time ago and it didn't worked. But the technique demonstrated here provides alternative: by assigning actions to say 30 invisible buttons and work out their actions. ...and I still think that Lee is an alien whose codes need to be explored by us. Once came to the same conclusion that Lee is out of this world If you look at the color dialog you see some sort of grread in action , just look at the middle bar with the standard colors and hover over it. You see no borders until you go over them. This functionality is probably not exposed to us mortels...only .net etc. happy coding gr. Rlx Quote
Grrr Posted March 29, 2018 Posted March 29, 2018 If you look at the color dialog you see some sort of grread in action , just look at the middle bar with the standard colors and hover over it. You see no borders until you go over them. This functionality is probably not exposed to us mortels...only .net etc. Rlx, do you mean the truecolor dialog? Quote
rlx Posted March 29, 2018 Author Posted March 29, 2018 Rlx, do you mean the truecolorjust the standard one , but in fact now I think about it , tooltips pretty much do the same Quote
Grrr Posted March 29, 2018 Posted March 29, 2018 Ah, I see now.. Well I assume its ARX based (not sure though) - I've seen some guys doing impressive stuff with ARX programming. Quote
rlx Posted March 29, 2018 Author Posted March 29, 2018 Ah, I see now..Well I assume its ARX based (not sure though) - I've seen some guys doing impressive stuff with ARX programming. I'm not completely stupid but I don't think I'm smart enough to come up with some usefull c#.arx.net , well , not anytime soon , not before the big crunch or other end stage for this universe, but looking @ the bright side , when the wife's not blocking my view that is , we seem to live in a multiverse so some where there's maybe even a universe where I'm smarter than Lee hahaha gr. Rlx ps. just tried it and where my attempt to do the same in the past with size 0 failed , size 0.1 worked. thanx Lee / (cab) and of course you guys , ron , roy , bigal and you grrr! Quote
Grrr Posted March 29, 2018 Posted March 29, 2018 I'm not completely stupid but I don't think I'm smart enough to come up with some usefull c#.arx.net , well , not anytime soon , not before the big crunch or other end stage for this universe, but looking @ the bright side IMO knowing C#/ARX/.NET isn't everything: I only look for ways and ideas to automate my work and make it easier.. and with the time I'm forced to perform more and more complex list manipulation. ATM I'm attempting to write a routine to perform quantitative account on our architectural project, where I'm planning how to arrange the different data, aswell its extraction. So from attributed dynamic blocks, my list results into multi-nested, that contains matrix lists. Sample item from my main list looks like this: ("Зидарии" ; in the end I just (apply 'append L) and write this matrix list into acad_table ( ("1" "Направа на тухлена зидария 12см." "" "" "" "" "" "=(SUM(H4:H8) -SUM(H9:H11))" "" ) ("" "" "m2" "6.1" "0" "4.32" "2" "=(D4*F4*G4)" "") ("" "" "m2" "4.35" "0" "4.32" "2" "=(D5*F5*G5)" "") ("" "" "m2" "1.38" "0" "4.32" "2" "=(D6*F6*G6)" "") ("" "" "m2" "1.6" "0" "4.32" "2" "=(D7*F7*G7)" "") ("" "" "m2" "3.6" "0" "4.72" "1" "=(D8*F8*G8)" "") ("" "" "m2" "0.9" "0" "2.1" "2" "=(D9*F9*G9)" "ДА") ("" "" "m2" "0.75" "0" "2" "4" "=(D10*F10*G10)" "ДА") ("" "" "m2" "2" "0" "1" "1" "=(D11*F11*G11)" "ДА") ) ( ("2" "Направа на тухлена зидария над 25см." "" "" "" "" "" "=(SUM(H13:H16) -SUM(H17:H17))" "" ) ("" "" "m3" "11.2" "0" "4.72" "2" "=(D13*F13*G13)" "") ("" "" "m3" "6" "0" "4.32" "2" "=(D14*F14*G14)" "") ("" "" "m3" "3.87" "0" "4.32" "1" "=(D15*F15*G15)" "") ("" "" "m3" "5.22" "0" "4.32" "1" "=(D16*F16*G16)" "") ("" "" "m3" "1" "0" "2.1" "4" "=(D17*F17*G17)" "ДА") ) ( ("3" "Направа на зидария от газобетон 10см." "" "" "" "" "" "=(SUM(H19:H25) -SUM(H26:H29))" "" ) ("" "" "m2" "6.29" "0" "0.7" "2" "=(D19*F19*G19)" "") ("" "" "m2" "6.29" "0" "0.6" "2" "=(D20*F20*G20)" "") ("" "" "m2" "48.05" "0" "0.7" "1" "=(D21*F21*G21)" "") ("" "" "m2" "48.05" "0" "0.6" "1" "=(D22*F22*G22)" "") ("" "" "m2" "54.2" "0" "0.6" "1" "=(D23*F23*G23)" "") ("" "" "m2" "54.2" "0" "0.5" "1" "=(D24*F24*G24)" "") ("" "" "m2" "12" "0" "1.35" "2" "=(D25*F25*G25)" "") ("" "" "m2" "4" "0" "0.6" "5" "=(D26*F26*G26)" "ДА") ("" "" "m2" "4" "0" "0.5" "5" "=(D27*F27*G27)" "ДА") ("" "" "m2" "5.4" "0" "1.35" "1" "=(D28*F28*G28)" "ДА") ("" "" "m2" "1" "0" "0.75" "1" "=(D29*F29*G29)" "ДА") ) ) And I doubt if a C#/.NET guy could replicate and re-arrange the data as easy like we do it in LISP. Unless every one of them can manipulate the data so flexible, as Lee manipulates lists. I work as a drafter and I list my program requests for myself, so the advantage is that I know what exactly I want, and what steps I have to perform, if my code errors out I know how to debug it (in most of the cases, else I'd ask on the forum). But I never had a specific request thats not achieavable with LISP, I remember only few things and one of them was to access the object model for Revit/3DS max (they require C#, .NET). For sure ATM I'm not aware of the cool things the other languages can do, but its not like I want to write some BIM program. And everythings fine, while LISP is alive.. else we may have to switch to VBA or something else. Quote
rlx Posted March 29, 2018 Author Posted March 29, 2018 IMO knowing C#/ARX/.NET isn't everything:I only look for ways and ideas to automate my work .... I completely lost you / panicked right after the word 'work' haha... in the beginning I protected my work with , well , protect.exe but not anymore. Compared to many of you I'm middle class at best , but at my work nobody comes even close to comprehend what I'm doing and they actually love it , so long as I deliver on time. And sometimes this means I don't have the time (or will) to optimize my code , just quickly make something that works and if someone can make a routine that's 10 nano seconds faster , well good for you! I like programming , a lot , but I also have do deliver drawings , on time and on budget and what I like about this site is the people who contribute their knowledge, tools and experience that help me do that and hoping that my own contributions , small and rare as they may be , also have helped others. And who knows , there's already a little Lee 2.0 of Grrr 2.0 among us 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.