russell84 Posted April 1, 2008 Posted April 1, 2008 i've been trying on and off for a couple of days now to get a dcl layout the way i want it - unfortunately i dont know anything about dcl and i'm going off the autodesk help guide. I've attached a sketch image of the layout i want and was wondering if anyone would be able to help me with it Thanks heaps You will have to excuse to quick hand drawing Quote
TimSpangler Posted April 1, 2008 Posted April 1, 2008 Are the button check boxes or radio buttons? Quote
TimSpangler Posted April 1, 2008 Posted April 1, 2008 How's this?? // // TXTO.DCL Version 1.0 // // Copyright© 2007 // // Permission to use, copy, modify, and distribute this software // for any purpose and without fee is hereby granted, provided // that the above copyright notice appears in all copies and // that both that copyright notice and the limited warranty and // restricted rights notice below appear in all supporting // documentation. // // TIMOTHY SPANGLER PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. // TIMOTHY SPANGLER SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. DESIGN SOLUTIONS // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE // UNINTERRUPTED OR ERROR FREE. // // Use, duplication, or disclosure by the U.S. Government is subject to // restrictions set forth in FAR 52.227-19 (Commercial Computer // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) // (Rights in Technical Data and Computer Software), as applicable. // dcl_settings : default_dcl_settings { audit_level = 0; } txto : dialog { label = "TXTO v1.0"; :column { :row { :text { key = "selected"; width = 30; label = "No text selected"; } :column{ :button{ label = "Select All"; key = "selall"; } :button{ label = "Select None"; key = "selnone"; } } } spacer_0; :boxed_row{ label = "Select text buttons"; :column{ :toggle{ key = "txt1"; label = "TXT1"; } :toggle{ key = "txt2"; label = "TXT2"; } :toggle{ key = "txt3"; label = "TXT3"; } :toggle{ key = "txt4"; label = "TXT4"; } :toggle{ key = "txt5"; label = "TXT5"; } } :column{ :toggle{ key = "txt6"; label = "TXT6"; } :toggle{ key = "txt7"; label = "TXT7"; } :toggle{ key = "txt8"; label = "TXT8"; } :toggle{ key = "txt9"; label = "TXT9"; } :toggle{ key = "txt10"; label = "TXT10"; } } :column{ :toggle{ key = "txt11"; label = "TXT11"; } :toggle{ key = "txt12"; label = "TXT12"; } :toggle{ key = "txt13"; label = "TXT13"; } :toggle{ key = "txt14"; label = "TXT14"; } :toggle{ key = "txt15"; label = "TXT15"; } } } spacer_1; :toggle{ key = "save"; label = "SAVE SETTINGS"; } spacer_1; :image{ key = "sep1"; color = dialog_background; width = 25; height = 1; } spacer_0; ok_cancel; spacer_1; :column{ :paragraph{ :text{ key = "copyright"; label = "--- Copyright© 2008 ---"; alignment = centered; } } } spacer_0; } } Quote
russell84 Posted April 1, 2008 Author Posted April 1, 2008 Tim thanks heaps mate - i didnt expect anyone to reply to that honestly let alone finsih it in one go Anyways thanks mate and i'll send you the lisp and final Dcl so that you have a copy I'll be adding a few more toggle boxes to that Basically all it will do is create a legend by inserting blocks that contain symbols and text and sorting the down the page depending which ones are selected. Cheers mate Quote
russell84 Posted April 2, 2008 Author Posted April 2, 2008 One more question how do you insert a image in a dialogue box?? Quote
TimSpangler Posted April 2, 2008 Posted April 2, 2008 The "image" has to be a slide created in AutoCAD or a vector graphic created by code. I used a vector image in the dialog above to create a seperator line. If you are just getting into dcl I would recommend looking ito OpenDCL instead of plan DCL http://opendcl.com/wordpress/ It has alot more to offer. Quote
russell84 Posted April 3, 2008 Author Posted April 3, 2008 i'm still editing it and the moment but you will get the gist Could you guide me through inserting a slide in this DCL? I have to define the image within the lisp don't I - What code do you use to define a image tile within the Dcl? I haven't really started defining the function within the lisp yet - but basically i want to be able to do is have each toggle box insert a block that is made up of a simple symbol and description to be within a legend.(these blocks obviously within acad search path) So once desired toggles are selected and user selects ok the user select an initial insertion point and the the lisp would create a list of selected toggles and run through the list and insert the first block at the insertion point but then cycle through the list and insert each block (-2.5(Y)) units below the previously inserted block until the list is complete thus creating the legend. Tim maybe you could help me also with the list process aswell?? Hope i didnt just confuse you. Cheers Quote
russell84 Posted April 3, 2008 Author Posted April 3, 2008 // // TXTO.DCL Version 1.0 // // Copyright© 2007 // // Permission to use, copy, modify, and distribute this software // for any purpose and without fee is hereby granted, provided // that the above copyright notice appears in all copies and // that both that copyright notice and the limited warranty and // restricted rights notice below appear in all supporting // documentation. // // TIMOTHY SPANGLER PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. // TIMOTHY SPANGLER SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. DESIGN SOLUTIONS // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE // UNINTERRUPTED OR ERROR FREE. // // Use, duplication, or disclosure by the U.S. Government is subject to // restrictions set forth in FAR 52.227-19 (Commercial Computer // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) // (Rights in Technical Data and Computer Software), as applicable. // dcl_settings : default_dcl_settings { audit_level = 0; } LEGEND : dialog { label = "LEGEND v1.0"; :column { :row { :text { key = "selected"; width = 40; label = "Make a selection"; } :row{ :button{ label = "Select All"; key = "selall"; fixed_width = false; } :button{ label = "Deselect All"; key = "selnone"; fixed_width = false; } } } spacer_0; :boxed_row{ label = " Sedimentation "; :column{ :toggle{ key = "tog1"; label = "CatchDrain"; } :toggle{ key = "tog2"; label = "Low Flow Bank "; } :toggle{ key = "tog3"; label = "Sediment Fence"; } :toggle{ key = "tog4"; label = "OverFlow Path"; } :toggle{ key = "tog5"; label = "Traffic Manoeuvring"; } } :column{ :toggle{ key = "tog6"; label = "Vehicle Shaker Grid"; } :toggle{ key = "tog7"; label = "Stabilised Site Access"; } :toggle{ key = "tog8"; label = "Stockpile Location"; } :toggle{ key = "tog9"; label = "Straw Bale Filter"; } :toggle{ key = "tog10"; label = "Geotextile Inlet Filter "; } } :column{ :toggle{ key = "tog11"; label = "Mesh && Gravel Inlet Filter "; } :toggle{ key = "tog12"; label = "Temp Rock Headwall"; } :toggle{ key = "tog13"; label = ""; } :toggle{ key = "tog14"; label = ""; } :toggle{ key = "tog15"; label = ""; } } :column{ :button{ label = "ON "; key = "selall1"; fixed_width = true; alignment = centered; } :button{ label = "OFF"; key = "selnone1"; fixed_width = true; alignment = centered; } } } :boxed_row{ label = " Roads && Drainage "; :column{ :toggle{ key = "tog31"; label = "Limit of Work "; } :toggle{ key = "tog32"; label = "Bdy Existing"; } :toggle{ key = "tog33"; label = "Bdy Proposed"; } :toggle{ key = "tog34"; label = "Ridge Line"; } :toggle{ key = "tog35"; label = "Valley Line"; } } :column{ :toggle{ key = "tog36"; label = "Surface Inlet Pits "; } :toggle{ key = "tog37"; label = "Lintel Pits"; } :toggle{ key = "tog38"; label = "Junction Pits"; } :toggle{ key = "tog39"; label = "Grateddrain"; } :toggle{ key = "tog40"; label = "Pit Tag"; } } :column{ :toggle{ key = "tog41"; label = "SW Existing "; } :toggle{ key = "tog42"; label = "SW Proposed"; } :toggle{ key = "tog43"; label = "Batter Proposed"; } :toggle{ key = "tog44"; label = "Batter Existing"; } :toggle{ key = "tog45"; label = "Spot Level"; } } :column{ :toggle{ key = "tog46"; label = "Contour Proposed"; } :toggle{ key = "tog47"; label = "Contour Existing"; } :toggle{ key = "tog48"; label = "Kerb - K&&G"; } :toggle{ key = "tog49"; label = "Kerb - KO"; } :toggle{ key = "tog50"; label = ""; } } :column{ fixed_width = true; :button{ label = "ON "; key = "selall2"; fixed_width = true; alignment = centered; } :button{ label = "OFF"; key = "selnone2"; fixed_width = true; alignment = centered; } } } :boxed_row{ label = " Services "; :column{ :toggle{ key = "tog71"; label = "Prop Electrical SRV"; } :toggle{ key = "tog72"; label = "Prop Gas SRV"; } :toggle{ key = "tog73"; label = "Prop Sewer SRV"; } :toggle{ key = "tog74"; label = "Prop Telstra SRV"; } :toggle{ key = "tog75"; label = "Prop Water SRV"; } } :column{ :toggle{ key = "tog76"; label = "Prop Rising Main "; } :toggle{ key = "tog77"; label = ""; } :toggle{ key = "tog78"; label = ""; } :toggle{ key = "tog79"; label = ""; } :toggle{ key = "tog80"; label = ""; } } :column{ :toggle{ key = "tog81"; label = "Exist Elect"; } :toggle{ key = "tog82"; label = "Exist Gas"; } :toggle{ key = "tog83"; label = "Exist Sewer"; } :toggle{ key = "tog84"; label = "Exist Telstra"; } :toggle{ key = "tog85"; label = "Exist Water"; } } :column{ :toggle{ key = "tog86"; label = "Exist Rising Main "; } :toggle{ key = "tog87"; label = ""; } :toggle{ key = "tog88"; label = ""; } :toggle{ key = "tog89"; label = ""; } :toggle{ key = "tog90"; label = ""; } } :column{ fixed_width = true; :button{ label = "ON"; key = "selall3"; fixed_width = true; alignment = centered; } :button{ label = "OFF"; key = "selnone3"; fixed_width = true; alignment = centered; } } } :row{ :boxed_row{ label = " Jointing "; :column{ :toggle{ key = "tog121"; label = "Joint - CJ"; } :toggle{ key = "tog122"; label = "Joint - EJ"; } :toggle{ key = "tog123"; label = "Joint - DJ"; } :toggle{ key = "tog124"; label = "Joint - DCJ"; } :toggle{ key = "tog125"; label = "Joint - DEJ"; } } :column{ :toggle{ key = "tog126"; label = "Joint - IJ"; } :toggle{ key = "tog127"; label = "Joint - SC"; } :toggle{ key = "tog128"; label = ""; } :toggle{ key = "tog129"; label = ""; } :toggle{ key = "tog130"; label = ""; } } :column{ fixed_width = true; :button{ label = "ON "; key = "selall4"; fixed_width = true; alignment = centered; } :button{ label = "OFF"; key = "selnone4"; fixed_width = true; alignment = centered; } } } :boxed_row{ label = " General "; :column{ :toggle{ key = "tog131"; label = "Sheet Join Line"; } :toggle{ key = "tog132"; label = ""; } :toggle{ key = "tog133"; label = ""; } :toggle{ key = "tog134"; label = ""; } :toggle{ key = "tog135"; label = ""; } } :column{ :toggle{ key = "tog136"; label = ""; } :toggle{ key = "tog137"; label = ""; } :toggle{ key = "tog138"; label = ""; } :toggle{ key = "tog139"; label = ""; } :toggle{ key = "tog140"; label = ""; } } :column{ fixed_width = true; :button{ label = "ON "; key = "selall5"; fixed_width = true; alignment = centered; } :button{ label = "OFF"; key = "selnone5"; fixed_width = true; alignment = centered; } } } } spacer_1; :toggle{ key = "save"; label = "Save Settings"; } spacer_1; :image{ key = "sep1"; color = dialog_background; width = 25; height = 0; } ok_cancel_help_info; :column{ :paragraph{ :text{ key = "copyright"; label = "--- Copyright© 2008 ---"; alignment = centered; } } } spacer_0; } } Quote
russell84 Posted April 3, 2008 Author Posted April 3, 2008 Sorry about the picture size - i had to crop it less that 600 X 600 to insert it Cheers Quote
Strix Posted April 3, 2008 Posted April 3, 2008 that looks like a really handy thing to have - now how the heck am I going to find it again when I'm doing a job that requires it? what does dcl stand for? Quote
walton10 Posted June 29, 2010 Posted June 29, 2010 Could someone show me an example of how to have the select all and select none buttons work? Google and AfraLisp are failing me. Quote
TimSpangler Posted June 29, 2010 Posted June 29, 2010 Could someone show me an example of how to have the select all and select none buttons work? Google and AfraLisp are failing me. What are you selecting? Radio buttons? Check Boxes? Items in a list box? Quote
The Buzzard Posted June 29, 2010 Posted June 29, 2010 Sorry about the picture size - i had to crop it less that 600 X 600 to insert it Cheers If you are using the dialog for inserting legends, You would be better off with a popup list. Quote
walton10 Posted June 29, 2010 Posted June 29, 2010 What are you selecting? Radio buttons? Check Boxes? Items in a list box? I was using check boxes, but switched to list_box (mulitple selections) Quote
TimSpangler Posted June 29, 2010 Posted June 29, 2010 Here is some code that you can use: The caller: (SELECT_ALL \"tile_name\" (length listlength)) The Function: ;;; ------------ SELECT ALL ITEMS IN LISTBOX (defun SELECT_ALL (Key Count / StartCount Value Count) (setq StartCount 0) (setq Value "0") (repeat (1- Count) (setq Value (strcat Value (itoa (setq StartCount (1+ StartCount))) " ")) ) (set_tile Key Value) ) This code will deselect the content in the listbox (set_tile "tile_name" "") You will want to make sure that you set the list variable to nil when you deselect the contents. HTH Quote
walton10 Posted June 29, 2010 Posted June 29, 2010 Thank you, that solved my problem directly. I appreciate the help! 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.