Jump to content

Search the Community

Showing results for tags 'dcl'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 25 results

  1. TL;DR I need to connect blocks using attribute values. I created multiple blocks and attribute with different properties (Annotative, scaled attribute text to 1:50, Upside down, Backward, Invisible, Constant, Verify, Preset, Multiple lines, Lock position, Visibility parameters) Request 1: I need to request for help to create a lisp for connect with *lines between attribute definition values since their attribute insertion point or block insertion point, ignoring all properties, included caps, but Visibility parameters not should be ignored, all this just of selected blocks (dynamic blocks, regular blocks, nested blocks). (check dwg attached for more details) Request 2: Add an option for let me choice if I need to ignore just specific attributes tag. (in the attached drawing I ignored between attributes values “tipo” and “nivel”) Request 2: Add an option for let me choice if I need connect just specific attributes tag. (in the attached drawing I connected between attributes values “codigo” and “alimentador”) Request 3: Add an option for let me choice for connect blocks insert point or attribute definitions insert point (check dwg file and images for more details) PD: attached blocks with the name “connect attributes.dwg” PD: if possible use DCL or OpenDCL for the GUI. connect attributes.dwg
  2. Sambuddy

    DCL Suffix Prefix

    I am trying to accomplish this lisp with no knowledge of DCL since I can check and uncheck options when I want. (Typ.) (Type) (TYP.) (TYPE) ± c/c ;option1; ± ;Dimension; c/c or C/C ;option2; ± ;Dimension; c/c or C/C then underneath the dim line to be: all four options of (Typ.)(Type)(TYP.)(TYPE) previously I had made a few lisps to do the task but it seems a DCL would be the way to go: ; Adding (Type) to the dimension line with Arial text (defun c:2 (/ Rtrn txt ss in vl) (progn (princ "\nSelect Dimension to modify: ") (setq ss (ssget "_:L" '((0 . "DIMENSION")))) ) ;end of 1st. progn (progn (setq Txt (strcat "<> " "{\\fArial|b0|i0|c0|p34;(Type)}")) (repeat (setq in (sslength ss)) (setq vl (vlax-ename->vla-object (ssname ss (setq in (1- in))))) (vl-catch-all-apply 'vla-put-TextOverride (list vl txt)) ) ) ;end 2nd. progn ; ) ; end if (princ) ) ;End Defun ; Adding ± to the dimension line keeping dim style (defun c:4 (/ Rtrn txt ss in vl) (progn (princ "\nSelect Dimension to modify: ") (setq ss (ssget "_:L" '((0 . "DIMENSION")))) ) ;end of 1st. progn (progn (setq Txt (strcat "%%P<>")) (repeat (setq in (sslength ss)) (setq vl (vlax-ename->vla-object (ssname ss (setq in (1- in))))) (vl-catch-all-apply 'vla-put-TextOverride (list vl txt)) ) ) ;end 2nd. progn ; ) ; end if (princ) ) ;End Defun for now I have them each under a command but it would be nice to have them using DCL. You see some pre/suffixes are all capital and some regular. also some are taking the dimension style formatting and some are Arial. Any help please? thank you!
  3. Hello, I just want to ask regarding the program I want to make cause I am having a problem on how to multiply the two values ( a real number and value from an input box): Part of my DCL; : edit_box { key = "sc"; label = "ENTER SCALE :"; alignment = centered; width = 10; fixed_width = true; is_enabled = false;} Part in my LISP; (set_tile "sc" "500") (mode_tile "sc" 2) (action_tile "en" "(progn (setq en $value)(mode_tile \"sc\" 0))") (action_tile "accept" "(setq scale (get_tile \"sc\") (done_dialog 1) )" ) (defun Styles() (setq size (* 0.00225 scale)) ….) but after running the program just exit. Hope someone can have time to help with this. Thank you!
  4. Hi there! I am exploring lisp and dcl at the same time. I have this DCL as shown below. Whenever the command is done and doing the same command again, values reset (pic2). I want the values to remain whenever I used the dcl again after I press "Ok" to edit particular inputs instead of typing the whole data again. How could I possibly do that? Here is the dcl code I used. CHECKING : dialog { label = "CHECKING"; : row { :boxed_row { label = "PARAMETERS"; : edit_box { key = "a"; label = "Wind Pressure (kPa)"; edit_width = 8;} : edit_box {key = "b"; label = "Tributary Width (mm)"; edit_width = 8;} : edit_box {key = "c"; label = "Unsupported Length (mm)"; edit_width = 8;} } } : row { :boxed_column { label = "SECTION PROPERTIES (ALUMINUM)"; : edit_box { key = "d"; label = "Moment of Inertia (mm^4)"; edit_width = 8;} : edit_box {key = "e"; label = "Area (mm^2)"; edit_width = 8;} : edit_box {key = "f"; label = "Extreme Fiber (mm)"; edit_width = 8;} : edit_box {key = "g"; label = "Allowable Stress (MPa)"; edit_width = 8;} } :boxed_column { label = "SECTION PROPERTIES (STEEL)"; : edit_box { key = "h"; label = "Moment of Inertia (mm^4)"; edit_width = 8;} : edit_box {key = "i"; label = "Area (mm^2)"; edit_width = 8;} : edit_box {key = "j"; label = "Extreme Fiber (mm)"; edit_width = 8;} : edit_box {key = "k"; label = "Allowable Stress (MPa)"; edit_width = 8;} } } : button { key = "accept"; label = " &OK "; is_default = true; mnemonic = "S"; } : button { key = "cancel"; label = " Cancel "; is_default = false; is_cancel = true; } } and here is the lisp code: (defun saveVars() (setq wp(distof(get_tile "a"))) (setq tw(distof(get_tile "b"))) (setq L(distof(get_tile "c"))) (setq Im(distof(get_tile "d"))) (setq Am(distof(get_tile "e"))) (setq cm(distof(get_tile "f"))) (setq Fbm(distof(get_tile "g"))) (setq Is(distof(get_tile "h"))) (setq As(distof(get_tile "i"))) (setq cs(distof(get_tile "j"))) (setq Fbs(distof(get_tile "k"))) ) (defun C:CC() (if(not(setq dcl_id (load_dialog "CHECKING.dcl"))) (progn (alert "The DCL file could not be loaded!") (exit) ) (progn (if (not(new_dialog "CHECKING" dcl_id)) (progn (alert "CHECKING.DCL file could not be loaded!") (exit) ) (progn (action_tile "accept" "(saveVars)(done_dialog 2)") (action_tile "cancel" "(done_dialog 1)") (setq ddiag(start_dialog)) (unload_dialog dcl_id) (if(= ddiag 1) (princ "\n END") ) (if(= ddiag 2) (progn (setq IT(+ Im (* 2.87 Is))) (setq moment(/ (* wp tw L L) 8000)) (setq stress(/ (* moment cm) Im)) (setq stressratio(/ stress Fbm)) (setq deflection(/ (* 5 wp tw L L L L) (* 384000 69600 IT))) (setq allowdeflection(/ L 175)) (setq defratio(/ deflection allowdeflection)) (setq pt1 (getpoint)) (setq pt2 (getpoint)) (command "_mtext" pt1 pt2 "\n Actual Bending Stress =" (rtos stress 2 2) "\n Allowable Bending Stress =" (rtos Fbm 2 2) "\n Stress Ratio =" (rtos stressratio 2 2) "\n Actual Deflection =" (rtos deflection 2 2) "\n Allowable Deflection =" (rtos allowdeflection 2 2) "\n Deflection Ratio =" (rtos defratio 2 2) "" ) ) ) ) ) ) ) ) One more thing. About the mtext output. The output is this. Numerical results always appear on the next line. and I want the result to be like this with units as text (MPa, mm, etc) Does someone has a thing about this? Thank you in advance. :)
  5. I had a conversation with a fellow CAD operator a few months ago and came across a question. Is it possible to create a DCL file that utilizes custom sprites as clickable entities? The idea is that the DCL window would show a dozen or so slide images and the user would click on the desired image to trigger the next part of the code. I know that I could show the images and place radio buttons next to them, but I feel that this could be a bit clunky. Any thoughts?
  6. eimimitu

    Material & Weight

    Hello everyone, I’ve dove head first into the overwhelming world of Autolisp… and needless to say I’m in way over my head. I’ve been trying to put together a program for AutoCAD 14 with a dialog box that will allow the user to pick from a drop down list of standard materials/click a “select objects” button… apply selected material to 3D solids and have it display the weight based on the volume of the solid/s. Furthermore, I have added two radio buttons: one for imperial measurement and one for metric measurement. There is also another “select objects” Total button to calculate and display the combined weight of the entire 3D solid assembly. I used a program called ObjectDCL to design the dialog box (ODC file and image attached). But that’s really as far as I got. I found these links as a starting point but couldn’t figure out how to tie it all together: http://www.ellenfinkelstein.com/acadblog/create-a-custom-function-in-autocads-calculator/ http://cadtips.cadalyst.com/mass-properties/tip-2258-calculate-weight http://cadtips.cadalyst.com/mass-properties/tip-2258-calculate-weight http://www.cadtutor.net/forum/showthread.php?50384-Calculating-weight-of-2d-shape-amp-3dsolid-object-by-asigned-material&highlight=material+density http://www.cadtutor.net/forum/showthread.php?89753-Help-please-need-to-combine-to-lisp&highlight=material+density I have the list of materials ready to insert along with the densities in lbs/in^3 I’m hoping one of you programming geniuses could please put it together to get it working as it is intended. I’m also hoping that I could then study that code and get some clue as to how it all works. I'm intrigued by the potential of this programming language and would love to be introduced to it by one of the many experts on this forum. Thanks in advance and please let me know if I missed anything. Matwt.lsp ODC.zip
  7. Hello again Masters and Legends, I'm currently learning DCL right now thru Afralisp.net and some autodesk forum topics. From their examples, a DCL file is paired with a LSP file to work. For example, I have a DCL and its pair LSP file, its function is just to collect names, some numbers, places, (and any other data). Is it possible that any other LSP routine can use the data stored/inputted on the DCL? If it is, how? I just dont know. Thanks again. more power!
  8. Hi, Written a tool for replacing (updating) blocks. Had some spare time untill my boss recently used the W-word again (work , yak!) Anywayz , its a prototype so I'm not sure its stable and safe yet because I only did some lab testing. I hope it will be usefull. Not sure if I will be able to work on it further any time soon because I still have a few ideas and wishes. gr. Rlx RlxBlk manual.doc RlxBlk.lsp RlxBlk.dcl
  9. I know how to do this and have done it. BUT. I have multiple products.ini, products2.ini files where i get the values for popup_list. The first selected is ok. However when i change to the external ini file to the next ini file. The content of the popup_list is still the one i have used at first. I cant post the whole lisp nor DCL but has someone experienced this before and how can i "flush" the old external ini values? Thanks.
  10. Hi, I was working with a DCL and Lisp a few days and got some doubts: 1 - radio_button: 1.1 - Has there a way to check between a number "x" of radio_button, which is the currently radio_button selected? 1.2 - To run the code and to select a first item, I use on DCL file, as enabled: is_enabled = true (it only put a dot on that item, but not select it as a click over there, in other words, only show a dot image). On lisp code I wrote to try to execute a action: (set_tile "rb1" 1), but not works, in the same way not as a click over there. 2 - toggle_button. 2.1 - The toggle button has a possibility to do a action_tile when it is pressed a first time (before to be selected), to "deselect" it is there a whay to do one action? eg.: when I select the toggle, I show one image, but when I deselect it, the image need to be changed, is there how to do it? Thanks in advance to any help!...
  11. Hi to all, I need a basic instructions to try to learn with DCL files!... 1 - How I can show a preview of a image in a chosen item in one toggle button, I have 3 toggles to select, when one of them is chosen it will show a preview of the image (the image is a block inside of dwg file); 2 - Chose, how I can start a Dialog with one item selected (the variable [value = "1"], only fill a image as selected item, but don't select it. Thanks in advance to any help.
  12. Hi Everyone, I've been lurking here for over a year now and have found lots of useful information (thanks!), but I've finally done something that doesn't seem to have been solved before, and that there may be no easy answer to. We use a complicated system of layer states, views, and freezing and unfreezing layers to set up different print states to create a package of drawings. It is sort of a wacky use of AutoCAD, but this is due to the necessity of showing an opera as it progresses through time (Act 1, Act 2, etc.). We have hundreds of operas in our repertory and this won't be changing anytime soon. Anyway, as it stands now, there is a .txt file that lives in the same directory as the file containing the scenery that is manually created so that print scripts can work. I am attempting to turn that .txt file into something that lives in a dialog box for ease of use and cleanliness. The data will be stored in a mulitline attribute in a block. I've spent a fair amount of time creating a dialog box that changes size dynamically, allows for reordering of printouts and having multiple scenery layers appear on the same printout. My only real issue (which is of course a big one) is that if you add too many rows, the dialog box becomes too big to fit on the screen. What I would love to be able to do is to make the whole box (except the buttons at the bottom) scroll up and down so that the height of the dialog box is fixed to the smallest screen we use here (~800 pixels). I've spent a little time with OpenDCL but find it a bit byzantine, and I don't know any .NET or VBA so either of those solutions will involve me learning some new programming languages--not necessarily a deal breaker but not ideal either. I'm attaching a .dwg with the attributed block and the .lsp file for anyone who wants to take a look. The command c:met_plot_2015 will create and open the dialog box, which you can then manipulate. I appreciate anyone who read to the end of this post, and any help you can provide. Thanks, Eric P.S. The printing function doesn't actually work yet; that's next on the list once I solve this. specialblock.dwg BETTERPRINTING 5.LSP
  13. Hello Everyone, I am trying to work on DCL program for my coworker and I. I went through the tutorials by Kenny on Afralisp but I am stuck. My DCL keeps freezing. I tried checking it in Visual Lisp Editor and I couldn't figure it out. If anyone has any suggestions on DCL resources. I want to write a larger program for generating detail sheets for company but have a lot to learn. Is there a better way to write interfaces than DCL? ;;;;Original Code by by Kenny Ramage (defun C:PL_TRADE_SELECT () ;define function (setq PL_FILE (findfile "PL_WEIGHT.DAT")) (setq CODE_CHOICE "2007 OPA") ; (setq CODES "*COV_CODES") ; (list_find PL_FILE CODES) ; (setq CODE_LIST FIND_RESULT) ; (setq FIND_RESULT nil) ; (setq CODE_LIST_MOD (COMMA_PULL CODE_LIST "STRING")) (setq CODE_LIST_MOD '("1998 CBC" "2003 IBC" "2007 OPA")) ; (setq dcl_id (load_dialog "PL_TRADE_SELECT.dcl")) ;load dialog (if (not (new_dialog "PL_TRADE_SELECT" dcl_id) ;test for dialog );not (exit) ;exit if no dialog );if (setq w (dimx_tile "im") ;get image tile width h (dimy_tile "im") ;get image tile height );setq (start_image "im") ;start the image (fill_image 0 0 w h 5) ;fill it with blue (end_image) ;end image (start_list "CODE_CHOICES") ;start the list box (mapcar 'add_list CODE_LIST_MOD) ;fill the list box (end_list) ;end list (action_tile "PU" "(setq PL_TYPE \"PU\")") ;store point load type (action_tile "MP" "(setq PL_TYPE \"MP\")") ;store point load type (action_tile "HV" "(setq PL_TYPE \"HV\")") ;store point load type (action_tile "EL" "(setq PL_TYPE \"EL\")") ;store point load type (action_tile "cancel" ;if cancel button pressed "(done_dialog) (setq userclick nil)" ;close dialog, set flag );action_tile (action_tile "accept" ;if O.K. pressed (strcat ;string 'em together "(progn (setq CODE_CHOICE (atof (get_tile \"CODE_CHOICES\")))" ;get list selection " (done_dialog)(setq userclick T))" ;close dialog, set flag );strcat );action tile (start_dialog) ;start dialog (unload_dialog dcl_id) ;unload (if userclick ;check O.K. was selected (progn (setq CODE_CHOICE (fix CODE_CHOICE)) ;convert to integer (setq CODE_CHOICE (nth CODE_CHOICE CODE_LIST_MOD)) ;get the size );progn );if userclick (princ) );defun C:PL_TRADE_SELECT (princ) And the DCL... PL_TRADE_SELECT : dialog { //dialog name label = "Point Load Trade Selection" ; //give it a label :boxed_radio_column { //define radio column label = "&Code" ; //give it a label : popup_list { //define popup list key = "CODE_CHOICES"; //give it a name value = "2007 OPA" ; //initial value } //end list } :boxed_radio_column { //define radio column label = "Trade" ; //give it a label : radio_button { //define radion button key = "PU" ; //give it a name label = "&Plumbing" ; //give ]it a label value = "1" ; //switch it on } //end definition : radio_button { //define radio button key = "MP" ; //give it a name label = "&Mechancical Pipe" ; //give it a label } //end definition : radio_button { //define radio button key = "HV" ; //give it a name label = "&HVAC" ; //give it a label } //end definition : radio_button { //define radio button key = "EL" ; //give it a name label = "&Electrical" ; //give it a label } //end definition } //end radio column ok_cancel ; //predifined OK/Cancel : row { //define row : image { //define image tile key = "im" ; //give it a name height = 1.0 ; //and a height width = 1.0 ; //and now a width } //end image : paragraph { //define paragraph : text_part { //define text label = "Message 1"; //give it some text } //end text : text_part { //define more text label = "Message 2"; //some more text } //end text } //end paragraph } //end row }
  14. I have made updates to an old library block (file) and saved my changes. We have a custom menu, custom program and dialog box shows all different blocks to choose from and I frequently use it. The inserted block shows updates correctly but wont change the thumbnail preview inside the dialog box. Its not an attribute block or a dynamic block. Is there anyway to resolve the preview issue?
  15. Do you need a separate .dcl file to load each dialog box?
  16. WPerciful

    DCL Questions

    I have 2 questions about a dialog box I wrote. 1. The drop down boxes aren’t wide enough to display all of the text. How do I fix this? 2. Currently in order to select a second line in the list box you have to hold down the shift key. How can I change it so that the selections remain selected without holding down the control key? The command that luanches the dcl (defun c:bprint ( / ) (setq retlist1 nil) ;;; lm:directorydialog ;;; Author: Lee Mac, Copyright © 2013 - www.lee-mac.com ;;; (setq thedirectory (lm:directorydialog "Select folder: " nil 0)) (if (/= thedirectory nil) (setq List1 (vl-directory-files thedirectory "*.dwg")) end ) (setq List2 (list "")) (batch thedirectory List1 List2) (if (/= retlist1 nil) (progn (if (/= (findfile "BPlotData.txt") nil) (setq filedata (readfile (findfile "BPlotData.txt") ) files (cdr filedata) batchplotfiles (list ) ) ) (foreach file files (setq batchplotfiles (append batchplotfiles (list (strcat "open \"" thedirectory "\\" file "\" (mybatchprint) ZOOM E close Y") ) ) ) ) (makefile (strcat (strcat "C:\\Users\\" (getvar "loginname") "\\Documents") "\\" "BatchPlot.scr" ) batchplotfiles ) (command "_.script" (strcat "C:\\Users\\" (getvar "loginname") "\\Documents\\BatchPlot.scr") ) ) ) ) The function the runs the dcl (defun batch ( mydir lista listb / prin ) (setq dir mydir poplist1 (list ) mylist1 lista mylist2 listb ) (setq poplist1 (getplotters) poplist2 (getplotstyles) ) (if (not (setq dcl_id (load_dialog "batch.dcl"))) (progn (alert "The DCL file could not be loaded!") (exit) ) (progn (if (not (new_dialog "batch" dcl_id)) (progn (alert "The BATCH definition could not be loaded!") (exit) ) (progn (start_list "poplist1" 3) (mapcar 'add_list poplist1) (end_list) (start_list "poplist2" 3) (mapcar 'add_list poplist2) (end_list) (start_list "mylist1" 3) (mapcar 'add_list mylist1) (end_list) (action_tile "pickdir" " (setq pickdir \"Yes\")(done_dialog 1)") (action_tile "accept" "(saveVars)(done_dialog 2)") (action_tile "cancel" "(done_dialog 3)") (setq ddiag (start_dialog)) (unload_dialog dcl_id) (if (= ddiag 1) (princ "\nSelect directory . . . ") ) (if (= ddiag 2) (princ "\nPlease wait. . . ") ) (if (= ddiag 3) (princ "\nBatch print has been cancelled! ") ) ) ) ) ) (princ) ) The DLC code batch : dialog { : boxed_column { : row { : popup_list { label ="Choose printer"; key = "poplist1"; height = 15; width = 30; multiple_select = true; fixed_width_font = true; value = "0"; } } : row { : popup_list { label ="Choose plot style table"; key = "poplist2"; height = 15; width = 30; multiple_select = true; fixed_width_font = true; value = "0"; } } : list_box { label ="Choose Item"; key = "mylist1"; height = 15; width = 25; multiple_select = true; fixed_width_font = true; value = ""; } : row { : button { key = "accept"; label = " Print "; is_default = true; } : button { key = "cancel"; label = " Cancel "; is_default = false; is_cancel = true; } } } }
  17. RMateus

    DCL imput rules

    Dear friends, I would like to learn how to apply a edit_box imput rules. For example, if you only want to accept a number with the following format: 888.8.88 How do I impose this rule? Thank you, and sorry for my bad English.
  18. RMateus

    DCL Help

    Please I need your help. I have a DCL with 3 columns with 8 Radio Buttons in each column. I wanted the switch could only be done in only one of 24 Radio Buttons. What do I have to change? Attached files. Thanks for the help. Greetings. samp5.dcl samp5.lsp
  19. I am trying to write a routine that allows users to input items and weights in a dialog box, and outputs a formatted MText (among other things). I allow the user to input up to 10 items, but I only want the MText to use the values that are filled in. Here's what my dialog box looks like: And here's what my output looks like: Here's my code for the Mtext: (setq val (strcat "\\pxtr18,c20,r30;\t" eq1 "\t=\t" wt1 " LB \\P\t" eq2 "\t=\t" wt2 " LB \\P\t" eq3 "\t=\t" wt3 " LB \\P\t" eq4 "\t=\t" wt4 " LB \\P\t" eq5 "\t=\t" wt5 " LB \\P\t" eq6 "\t=\t" wt6 " LB \\P\t" eq7 "\t=\t" wt7 " LB \\P\t" eq8 "\t=\t" wt8 " LB \\P\t" eq9 "\t=\t" wt9 " LB \\P\t" eq10 "\t=\t" wt10 " LB" )) (entmake (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 10 pt1) (cons 1 val) (cons 8 "NOTES") (cons 40 0.09375) (cons 7 "ROMANS") (cons 41 4))) Any suggestions how to make it ignore the "0" values? Thanks in advance!
  20. I have started to attempt to learn DCL and am currently using VLIDE as code editor. But when I write a DCL code and click "Format edit window" it returns an error: If I execute the code it runs just fine ("Preview DCL in editor" works, too), but I can't get it to organize my text. Doesn't it work at all or am I the only one having difficulties? I have been searching this since yesterday and have found not a single person mentioning it, which means either one of two things: no one has ever had this problem before or it is so simple to solve that no one ever needed to ask in internet forums. Hope I'm not asking a stupid question here This is an example of code I am trying to format (copied from a DCL tutorial by Jeff Sanders): EXAMPLE : dialog { label = "EXAMPLE.lsp"; : column { : boxed_column { label = "column 1"; : boxed_column { label = "column2"; } : boxed_column { label = "column 3"; } } ok_cancel; } } Thank you all in advance! Felipe
  21. OK LISP Masters! I have this one ALMOST where I need it. (some of the functions are still incomplete, but I know how to get those to work). Here is what this lisp is supposed to do. You are presented with a dialog box with options for device type, and other device options, then based on your options, it inserts a block, adds your other picked options, then keeps going. When you right click, the dialog should return, letting you pick different options, so you can insert different blocks. I have the whole thing working, EXCEPT for the "right click to return the dialog". Can anyone please help? (defun c:notif(/ :dlgId :done);new combined notification (setq CVR (getvar "useri2") SCL (GETVAR "userr1") lyr (getvar "clayer") osm (getvar "osmode") ) (if (= 0 scl)(command (alert "Please Set your scale and try agagin")(exit))) (COMMAND "OSMODE" "514") (COMMAND "-LAYER" "s" "F-ALRM-INDC" "") (setq :dlgId (load_dialog "notif.dcl")) (setq :done 3) (while (/= :done 0) (if (not (new_dialog "DLG_Notif" :dlgId)) (exit) ) (action_tile "devStrobe" "(setq dev 1)") (action_tile "devHRNStrobe" "(setq dev 2)") (action_tile "devSPKStrobe" "(setq dev 3)") (action_tile "devHorn" "(setq dev 4)") (action_tile "devSpeaker" "(setq dev 5)") (action_tile "mtWall" "(setq mt 1)") (action_tile "mtCeil" "(setq mt 2)") (action_tile "cd15" "(setq cd 15)") (action_tile "cd30" "(setq cd 30)") (action_tile "cd75" "(setq cd 75)") (action_tile "cd95" "(setq cd 95)") (action_tile "cd110" "(setq cd 110)") (action_tile "cd135" "(setq cd 135)") (action_tile "cd177" "(setq cd 177)") (action_tile "cd185" "(setq cd 185)") (action_tile "wat25" "(setq wat 4)") (action_tile "wat5" "(setq wat 5)") (action_tile "wat1" "(setq wat 1)") (action_tile "wat2" "(setq wat 2)") (action_tile "wat75" "(setq wat 7)") (action_tile "lensClear" "(setq lens 1)") (action_tile "lensAmber" "(setq lens 2)") (action_tile "lensCombo" "(setq lens 3)") (action_tile "spcWP" "(setq wp 1)") (action_tile "spcWG" "(setq wg 1)") (action_tile "accept" "(done_dialog 1)") (action_tile "cancel" "(done_dialog 0)") (setq :done (start_dialog)) (cond ((= :done 1) (setvar "cmdecho" 0) (if (= wat 4)(setq watt ".25W")) (if (= wat 5)(setq watt ".5W")) (if (= wat 1)(setq watt "1W")) (if (= wat 2)(setq watt "2W")) (if (= wat 7)(setq watt "7.5W")) (setq :txting 0) (while (= 0 :txting) (initget 0) (if (= dev 1) (progn (COMMAND "_.-INSERT" "FA_STROBE_ONLYW" pause SCL "" pause CD) (setq :txting 0))(setq :txting 1)) (if (= dev 2) (COMMAND "_.-INSERT" "FA_Hornstrobe" pause SCL "" pause CD)) (if (= dev 3) (COMMAND "_.-INSERT" "FA_Speakerstrobe" pause SCL "" pause CD watt)) ) (setvar "cmdecho" 1) );done ((= :done 0) (prompt "\nEnd notification command.") ) );cond ; (if (= 1 cvr)(command "-layer" "s" "F-STRB-COVR" "")) ; (setq elast (entlast)) ; (IF (= 1 CVR)(command "_.-insert" "sg-15cd" "_non" ; (cdr (assoc 10 (entget elast))) "1" "" (* 180. (/ (cdr (assoc 50 (entget elast))) pi)))) ); while (unload_dialog :dlgId) (COMMAND "CLAYER" LYR) (COMMAND "OSMODE" OSM) (princ) ) I also have the LISP and DCL files attached. NOTIF.LSP notif.dcl
  22. Hello All, I tried to solve a problem lisp and DCL but it is clear that I have a lot to learn. With lisp's trying to insert text in Autocad list opens (see DCL). Any help is welcome. Dialog Text.zip
  23. Hello All, In trying to learn LISP and DCL (http://www.afralisp.net/dialog-control-language/tutorials/dialog-boxes-and-autolisp-part-2.php) I have a question regarding the attached example: selected values ​​can be inserted into the drawing (see attached dwg and jpg's site)? Best Regards All. Samp5.zip
  24. Lee Mac

    Tip of the Day

    I've posted an earlier version of this in the past, but decided to update the code and provide a proper write-up. Designed as a bit of fun, the program will allow you to create your own custom Tip of the Day messages, which will be randomly selected and displayed once each day. Whether it's used to constructively provide help for AutoCAD users, or merely provide a funny message for each day - I leave it up to you Have fun with it! Lee Code is available here - if you have any questions about how to set it up, let me know.
  25. Hello everyone. I'm hoping one of you LISP geniuses can help me out. I dont know a whole lot about Lisp, but I think my question would be pretty simple for someone with a good LISP knowledge to figure out quite fast. I have attached a LISP and a DCL. Everything is working properly on it except for one thing. There are two checkboxes on the right of the dialogue box, one says EOL, and the other says Amber CKT. What I would like the lisp to do is, when one of the check boxes is checked, to add a fixed suffix onto the text string that the program is already building. They need to add these suffixes: EOL - "(EOL)" Amber - "A" Like I said, I think this would be pretty easy for somone who has experience writing LISP. If anyone can help me out I would greatly appreciate it! map.zip
×
×
  • Create New...