flowerrobot Posted March 4, 2009 Posted March 4, 2009 I think you need autocad 2008+ You know the drop down options from some commands such as "pedit" where you they drop down from you mouse pointer and you can click them, how do you do this? cheers flower Quote
ReMark Posted March 4, 2009 Posted March 4, 2009 Dynamic Input must be enabled. In AutoCAD 2009 look at the bottom left hand corner of your screen. The third button in from the right controls Dynamic Input. Quote
Lee Mac Posted March 4, 2009 Posted March 4, 2009 Is that Dynamic Input any relation to the option "DYN" on ACAD '07 (I think - only used it once)... where, when you draw a line, the length and angle appear in what I would describe as a sort of "hyperlink" style box next to the line you are drawing? Quote
ReMark Posted March 4, 2009 Posted March 4, 2009 Is that Dynamic Input any relation to the option "DYN" on ACAD '07 (I think - only used it once)... where, when you draw a line, the length and angle appear in what I would describe as a sort of "hyperlink" style box next to the line you are drawing? Yes. Same general location as stated above however it was the fourth button in from the right. Quote
Lee Mac Posted March 4, 2009 Posted March 4, 2009 Ah ok, thanks for the clarification oh Luminous One. Quote
flowerrobot Posted March 5, 2009 Author Posted March 5, 2009 sorry for the lack or clarrity, how do you do this is a lisp Quote
alanjt Posted March 5, 2009 Posted March 5, 2009 sorry for the lack or clarrity, how do you do this is a lisp turn it on? (setver "dynmode" 3) Quote
wizman Posted March 5, 2009 Posted March 5, 2009 after dynmode is set to 3, you can put options in dropdown list by putting them inside brackets: i.e.: (initget 0 "All Pick") (setq TMP (getkword "\nText object selection options [/Pick]: ")) Quote
flowerrobot Posted March 5, 2009 Author Posted March 5, 2009 Thanks bro, worked like a charm, here i was thinking some harder you need to be required. Quote
flowerrobot Posted March 6, 2009 Author Posted March 6, 2009 Great, i did is quite easily, is their a variable to make them pop down on their own instead of the arrow (where you have to press the down key) as i have 11 or so options, and not have them shown in the command bar as 'enter choice [balh/blah balh], so they are shown in the drop down, but no in the command line? so "enter choice" thanks heaps for you help Quote
wizman Posted March 6, 2009 Posted March 6, 2009 Great, i did is quite easily, is their a variable to make them pop down on their own instead of the arrow (where you have to press the down key) as i have 11 or so options, and not have them shown in the command bar as 'enter choice [balh/blah balh], so they are shown in the drop down, but no in the command line?so "enter choice" thanks heaps for you help flowerrobot, Im not sure what you meant by pop down on their own instead of the arrow. As for the prompt not getting into the command line with more than 11 options, i think its better to resolve to a dialogue box. Quote
Lee Mac Posted March 6, 2009 Posted March 6, 2009 flowerrobot, Im not sure what you meant by pop down on their own instead of the arrow. As for the prompt not getting into the command line with more than 11 options, i think its better to resolve to a dialogue box. I would second this - I very much doubt there is a way to make the dropdown list drop down independently - and a dialog box makes things much clearer. Quote
alanjt Posted March 7, 2009 Posted March 7, 2009 if you need a dialog box with a list of choices to choose from, you are more than welcome to use this. i wrote it a while back for quick list box selection. ;list select dialog ;create a temp DCL multi-select list dialog from provided list ;value is returned in list form, DCL file is deleted when finished ;example: (setq the_list (AT:listselect "This is my list title" "Select items to make a list" "25" "30" "true" (list "object 1" "object 2" "object 3")) ;if mytitle is longer than defined width, the width will be ignored and it will fit to title string ;if mylabel is longer than defined width, mylabel will be truncated ;myheight and mywidth must be strings, not numbers ;mymultiselect must either be "true" or "false" (true for multi, false for single) ;created by: alan thompson, 9.23.08 ;some coding borrowed from http://www.jefferypsanders.com (thanks for the DCL examples) (defun AT:listselect ( mytitle ;title for dialog box mylabel ;label right above list box myheight ;height of dialog box !!*MUST BE STRING*!! mywidth ;width of dialog box !!*MUST BE STRING*!! mymultiselect ;"true" for multiselect, "false" for single select mylist ;list to display in list box / retlist readlist count item savevars fn fo valuestr dcl_id ) (defun saveVars(/ readlist count item) (setq retList(list)) (setq readlist(get_tile "mylist")) (setq count 1) (while (setq item (read readlist)) (setq retlist(append retList (list (nth item myList)))) (while (and (/= " " (substr readlist count 1)) (/= "" (substr readlist count 1)) ) (setq count (1+ count)) ) (setq readlist (substr readlist count)) ) );defun (setq fn (vl-filename-mktemp "" "" ".dcl")) (setq fo (open fn "w")) (setq valuestr (strcat "value = \"" mytitle "\";")) (write-line (strcat "list_select : dialog { label = \"" mytitle "\";") fo) (write-line (strcat " : column { : row { : boxed_column { : list_box { label =\"" mylabel "\"; key = \"mylist\"; allow_accept = true; height = " myheight "; width = " mywidth "; multiple_select = " mymultiselect "; fixed_width_font = false; value = \"0\"; } } } : row { : boxed_row { : button { key = \"accept\"; label = \" Okay \"; is_default = true; } : button { key = \"cancel\"; label = \" Cancel \"; is_default = false; is_cancel = true; } } } } }") fo) (close fo) (setq dcl_id (load_dialog fn)) (new_dialog "list_select" dcl_id) (start_list "mylist" 3) (mapcar 'add_list myList) (end_list) (action_tile "cancel" "(setq ddiag 1)(done_dialog)") (action_tile "accept" "(setq ddiag 2)(saveVars)(done_dialog)") (start_dialog) (if (= ddiag 1) (setq retlist nil) ) (unload_dialog dcl_id) (vl-file-delete fn) retlist );defun Quote
flowerrobot Posted March 8, 2009 Author Posted March 8, 2009 Thanks heaps for that script, Indeed it may be a good selection,correct me if im wronge. but what i was trying to create, you either enter intiger's or a keyword, i have them all pop on the the command line and "(command "textscr")" and then remove it after the input, but was thinking of removing the pop up, and have that list drop down, (dynamic input). but if i use that dialouge box, it means its harder to put in a input dosnt it?i am trying to make progn with the least amount of inputs as possible this is the first menu. i hope you are understanding what i mean thanks heaps flower (defun menuoptions () (if (= mass nil)(setq Mass 0.00000785)) ;End if (if (= mass 0.00000818)(setq masstype "316 S.S.")) ;End if (if (= mass 0.00000785)(setq masstype "MILD STEEL")) ;End if (if (= mass 0.0000078029)(setq masstype "SAF 3402")) ;End if (if (= masli nil)(setq masli "YES")) ;End if ;--------------------------------settings------------------------------------ (cond ((= "AU" sectionlocation) (princ "\n-----AUSTRALIAN SECTIONS------")) ((= "C" sectionlocation) (princ "\n------CANADIAN SECTIONS------")) ((= "AM" sectionlocation) (princ "\n------AMERICAN SECTIONS-------")) ((= "S" sectionlocation) (princ "\n------SOUTH AFRICAN SECTIONS------")) ) (princ "\n<SE> = SETTINGS, ALLOWS YOU TO SET MASS PROPERTIES") (princ "\n<N> = SET ITEM NUMBER") (princ "\n<M> = TOGGLE MASS BOX INSERTION ON/OFF") (princ "\n<C> = CONE PROGRAM, FINDS OUT WEIGHT OF A CONE") (princ "\n<D> = FOR PIPE OR FLANGE SIZES") (princ "\n<CU> = CUSTOM FLANGE") ; CHANGES DEPENDING ON SETTING FOR CAN AMERICAN OR SA SECTIONS (if (= nil sectionlocation) (setq sectionlocation "AU") ) (cond ((= "AU" sectionlocation) (progn (princ "\n<E> = EQUAL ANGLE") (princ "\n<U> = UNEQUAL ANGLES") (princ "\n<P> = PFC") (princ "\n<B> = UNVERSAL BEAM") (princ "\n<UC> = UNVERSAL COLUMN") (princ "\n<NA> = NON-AUSTRLIAN SECTION") ) ) ((OR (= "AM" sectionlocation)(= "C" sectionlocation)) (progn (princ "\n<W> = 'W' TYPE BEAM") (princ "\n<H> = 'HP' TYPE BEAM") (princ "\n<MM> = 'M' TYPE BEAM") (princ "\n<S> = 'S' TYPE BEAM") (princ "\n<MC> = 'MC' TYPE BEAM") (princ "\n<CC> = CHANNEL") (princ "\n<A> = ANGLE") ) ) ;((= "C" sectionlocation) THE CAN IS THE SAME AS THE AMERICAN ONE, ((= "S" sectionlocation) (progn (princ "\n<W> = 'W' TYPE BEAM") (princ "\n<H> = 'HP' TYPE BEAM") (princ "\n<MM> = 'M' TYPE BEAM") (princ "\n<S> = 'S' TYPE BEAM") (princ "\n<MC> = 'MC' TYPE BEAM") (princ "\n<C> = CHANNEL") (princ "\n<A> = ANGLE") ) ) ) (princ "\nWelcome To weight calc ") (if (= masli "YES") (princ "\nYou currently want Mass box insertion ON") (princ "\nYou currently want Mass box insertion OFF") ) (princ "\nCurrent Metal is : ")(princ Masstype) (command "textscr") (initget 7 "SE C N D E U P B UC NA CU M W H MM S MC CC A") (setq mp1 (getdist "\nENTER WIDTH PLATE, or key for options : ")) (command "graphscr") ) 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.