russell84 Posted February 19, 2008 Posted February 19, 2008 Hey guys I really would like to get some help in a getting a starting place to make a legend checkbox button. I'd like to create a button that would bring up a list of symbols and lines with a check box next to them and once all symbols and lines are checked and insert button down the bottom of the list and finally a insert comand - just at scale 1:1 Any ideas? Could each symbol be a separate block that is inserted with the appropriate text? Thanks for any help Quote
bsamc2000 Posted February 29, 2008 Posted February 29, 2008 The short answer is yes. The question then becomes are you wanting to do this using dcl, vba or .net? Thanks, Brian Quote
russell84 Posted February 29, 2008 Author Posted February 29, 2008 vba would be great - so you know how - have you done this for your self have you? Any help would be appreciated Thanks Quote
bsamc2000 Posted February 29, 2008 Posted February 29, 2008 I'm in Japan, half way around the world for my workstation, but I wrote this little code. Is this similar to what you are looking for? Thanks, Brian Legend.zip Quote
russell84 Posted March 18, 2008 Author Posted March 18, 2008 I'm now looking at using dcl i'm currently just setting up a dcl file at the moment - would be handy if someone had a example i could go off. cheers Quote
Graggs Posted October 17, 2008 Posted October 17, 2008 MMmm...I'm looking for just a tool, but I have no programming experience. Does anyone know of a solution? I have tried a script by Peter Jamtgaard, but it seems a little unstable on my setup. I'd also appreciate a count function, which would tell you how may occurrences of the block exist in the drawing. Icing on the cake would be a simple math function, to multiply an attribute numerical value, by the qty. (I do lighting design, and would like to calculate the total load for example). Cheers Graham Quote
russell84 Posted October 24, 2008 Author Posted October 24, 2008 i have a legend creater written that simply inserts blocks that describe linetypes and symbols throughout a drawing. Its old and kinda messy because it was one of the first lisp/dcl routines i wrote. But it doesn't check what blocks are contained within a drawing - it only works by manual ticking of the check boxes. You could create something more advanced if you want but its up to you. My one at the moment just inserts differnt blocks that were set up for different scales ive attached a pic of the result also a pic of the form. i'll give you the code if you want for it all and you can edit it from there. Atleast its a start you know. But what you are talking about you will need some experience and help with writing it to suit your needs Let me know if you want it Quote
Graggs Posted November 10, 2008 Posted November 10, 2008 Hi Russell, Sorry for not getting back sooner....new to all this! I fumbled through the drawings I needed to do, but this is something I'd like to crack, so any help would be marvellous. With my workload, I really don't have time to learn programming (as much as I would like to) so I need to use what I can find. Thanks again for taking the time to reply. Graham Quote
asos2000 Posted December 2, 2008 Posted December 2, 2008 Thanks Russell but there is a question, could that lisp read from a folder? means, I created a seperete file and saved in a folder (and sub-folders for groups like Roads, Jointing ...) for each detail, and the lisp reads those files and show the groups in window Quote
cadmando2 Posted December 12, 2008 Posted December 12, 2008 Russell, Your Legend Creator look great. you wouldn't want to share the Lisp and DCL file would you? I'm still learning how to write lisp programs. I started out using a "Ksoft DCL & AutoLisp generator program, but dosen't completly finish creating the lisp & DCL file. But I learning to Manipulate lisp files. Quote
russell84 Posted December 14, 2008 Author Posted December 14, 2008 Hey this lisp was one of my first - it is kind of messy but if you find anything useful within it go for it. I need to write it properly now that i know a bit more about lisp and vba etc but that will be when i have the ime - it works for now. here is the dcl i'll post the lisp next dcl_settings : default_dcl_settings { audit_level = 0; } LEGEND : dialog { label = "LEGEND CREATOR v1.0"; :column { :row { :text { key = "text1"; width = 30; 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 = "t1"; label = "CatchDrain "; } :toggle{ key = "t2"; label = "Low Flow Bank "; } :toggle{ key = "t3"; label = "Traffic Manoeuvring"; } } :column{ :toggle{ key = "t4"; label = "OverFlow Path "; } :toggle{ key = "t5"; label = "Sediment Fence"; } :toggle{ key = "t6"; label = "Vehicle Shaker Grid"; } } :column{ :toggle{ key = "t7"; label = "Stabilised Site Access "; } :toggle{ key = "t8"; label = "Stockpile Location"; } :toggle{ key = "t9"; label = "Straw Bale Filter"; } } :column{ :toggle{ key = "t10"; label = "Geotextile Inlet Filter "; } :toggle{ key = "t11"; label = "Mesh && Gravel Inlet Filter"; } // :toggle{ // key = "t12"; // label = "Temp Rock Headwall"; // } // :toggle{ // key = "t13"; // label = "Proposed Rip Rap"; // } spacer_1; } :column{ fixed_height = true; :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 = "t14"; label = "Limit of Work "; } :toggle{ key = "t15"; label = "Bdy Existing"; } :toggle{ key = "t16"; label = "Bdy Proposed"; } :toggle{ key = "t17"; label = "Ridge Line"; } :toggle{ key = "t18"; label = "Valley Line"; } :toggle{ key = "t19"; label = "Subsoil Proposed"; } :toggle{ key = "t20"; label = "Table Drain"; } :toggle{ key = "t21"; label = "Pits - Junction"; } } :column{ :toggle{ key = "t22"; label = "Pits - Surface inlet"; } :toggle{ key = "t23"; label = "Pits - Lintels"; } :toggle{ key = "t24"; label = "Pit Tag"; } //new toggles :toggle{ key = "t100"; label = "SW Pit Info"; } :toggle{ key = "t101"; label = "SEW Pit Info"; } // :toggle{ key = "t25"; label = "Grateddrain"; } :toggle{ key = "t26"; label = "SW Existing"; } :toggle{ key = "t27"; label = "SW Proposed"; } } :column{ :toggle{ key = "t28"; label = "Batter Existing"; } :toggle{ key = "t29"; label = "Batter Proposed"; } :toggle{ key = "t30"; label = "Contour Existing"; } :toggle{ key = "t31"; label = "Contour Proposed"; } :toggle{ key = "t32"; label = "Contour BE"; } :toggle{ key = "t33"; label = "Spot Level Proposed"; } :toggle{ key = "t34"; label = "Spot Level BE"; } } :column{ :toggle{ key = "t35"; label = "Kerb - K&&G"; } :toggle{ key = "t36"; label = "Kerb - KO"; } :toggle{ key = "t37"; label = "Kerb - IK"; } :toggle{ key = "t38"; label = "Kerb - BK"; } :toggle{ key = "t39"; label = "Kerb - RK"; } :toggle{ key = "t40"; label = "Dish Gutter - DG"; } spacer_1; } :column{ fixed_height = true; 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 = "Existing Services Proposed Services"; :column{ :toggle{ key = "t41"; label = "EXSRV Electrical "; } :toggle{ key = "t42"; label = "EXSRV Gas"; } :toggle{ key = "t43"; label = "EXSRV Sewer"; } :toggle{ key = "t44"; label = "EXSRV Telstra"; } :toggle{ key = "t45"; label = "EXSRV Water"; } } :column{ :toggle{ key = "t46"; label = "EXSRV Rising Main "; } :toggle{ key = "t47"; label = "EXSRV Opt-Fibre"; } :toggle{ key = "t48"; label = "EXSRV Optus"; } :toggle{ key = "t49"; label = "EXSRV ERM"; } :toggle{ key = "t50"; label = "EXSRV IRM"; } } :column{ :toggle{ key = "t51"; label = "SRV Electrical "; } :toggle{ key = "t52"; label = "SRV Gas"; } :toggle{ key = "t53"; label = "SRV Sewer"; } :toggle{ key = "t54"; label = "SRV Telstra"; } :toggle{ key = "t55"; label = "SRV Water"; } } :column{ :toggle{ key = "t56"; label = "SRV Rising Main "; } :toggle{ key = "t57"; label = "SRV Opt-Fibre"; } :toggle{ key = "t58"; label = "SRV Optus"; } :toggle{ key = "t59"; label = "SRV ERM"; } :toggle{ key = "t60"; label = "SRV IRM"; } } :column{ fixed_height = true; 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{ fixed_width = false; label = " Jointing "; :column{ :toggle{ key = "t61"; label = "Joint - CJ"; } :toggle{ key = "t62"; label = "Joint - DCJ"; } :toggle{ key = "t63"; label = "Joint - DEJ"; } :toggle{ key = "t64"; label = "Joint - DJ"; } spacer_1; spacer_1; } :column{ fixed_width = true; :toggle{ key = "t65"; label = "Joint - EJ "; } :toggle{ key = "t66"; label = "Joint - IJ"; } :toggle{ key = "t67"; label = "Joint - SC"; } :toggle{ key = "t68"; label = "Joint - TEJ"; } spacer_1; spacer_1; } :column{ fixed_height = true; 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 = "t69"; label = "Sheet Join Line"; } :toggle{ key = "t70"; label = ""; } :toggle{ key = "t71"; label = ""; } :toggle{ key = "t72"; label = ""; } :toggle{ key = "t73"; label = ""; } } :column{ } :column{ } } } spacer_1; :toggle{ key = "save"; label = "Save Settings"; } spacer_1; :image{ key = ""; width = 0; aspect_ratio = 1; COLOR = 7; } ok_cancel_help; :column{ :paragraph{ :text{ key = "copyright"; label = ""; alignment = centered; } } } spacer_0; } } Quote
russell84 Posted December 14, 2008 Author Posted December 14, 2008 you will just have to make the blocks your self. also i must say that i had a little help here and there from people on this forum when writing this. But if you need any help let me know - i should be able to help you. Cheers guys Ps. The lisp file was too large so i split it into 2 files - just paste the contents of LEGEND2.lsp into LEGEND1.lsp LEGEND.LSP LEGEND2.LSP Quote
asos2000 Posted December 15, 2008 Posted December 15, 2008 How can I create dcl file? I paste the code in txt then renamed to legend.dcl and but the lisp (after collecting the 2 parts) put there is an error message, The LEGEND.DCL file could not be loaded. Quote
russell84 Posted December 15, 2008 Author Posted December 15, 2008 thats correct so far - but you need to have the legend.dcl file located within one of your acad search paths - then it will work. Cheers - let me know how you go Quote
asos2000 Posted December 16, 2008 Posted December 16, 2008 I added a new search path and worked good Thanx Russel Quote
segorfree Posted June 25, 2009 Posted June 25, 2009 What's the comand line to launch Legend.dvb Quote
mauserp08 Posted September 7, 2011 Posted September 7, 2011 Hi Russell, are you still available for questions about your lisp routine to create legends? Quote
Lee Mac Posted September 7, 2011 Posted September 7, 2011 Would this help at all? http://lee-mac.com/blockcounter.html Quote
mauserp08 Posted September 7, 2011 Posted September 7, 2011 Hi Lee, this appears to be what I am looking for. Does this have the code for the dcl as well in it? Quote
Lee Mac Posted September 7, 2011 Posted September 7, 2011 Hi Lee, this appears to be what I am looking for. Does this have the code for the dcl as well in it? Yes, you only need to download the LISP file. 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.