Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/02/2022 in all areas

  1. So is there more to this code? Looking at it to see what it is doing, you create a blank selection set, then the 'while' since there is no command active, 'cmdactive = 0, is skipped, then you have your checking... so as it is as far as I can tell this snippet isn't doing an awful lot... so can you share a bit more?
    1 point
  2. It was just an example of how to remove things from a selection set. You have to select something during the command or have something selected then run the command. It will take the inverse of whats completely on screen. Repeat the command to switch back and forth. will also error if nothing is on the screen. To directly answer you question. the foreach with ssdel from my example is a better option on how to remove one selection set from another. also you don't have to build a 3rd selection set (setq ssRemove (ssget '((0 . "*TEXT")))) (setq ssKeep (ssget "_X" '((0 . "*TEXT,LEADER,MULTILEADER,DIMENSION")))) (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex ssRemove))) (ssdel ent ssKeep) ;only removes the entity from the selection set doesn't delete the entity from the drawing. ) (sssetfirst nil ssKeep) (princ)
    1 point
  3. The color of the AutoCAD drawing area has changed quite a bit over the years. Do you always use the color Autodesk has chosen for you or do you have your own personal preference? Take the poll and let's see what color CADTutor members prefer. If you use a non-standard color, tell us what it is and why you use it.
    1 point
  4. I've been using Philips 328E9QJAB 32″ Curved Frameless Monitor and it is one of the best monitors I've used. One of my friend suggested me this monitor and I'm using this monitor for a year now I regret nothing. If you want to go with this I'm 100% sure you will not regret it.
    1 point
  5. Attached is my take on the program: personally, I like any dialog images to appear embedded as part of the interface, and the use of a slide library reduces the number of files which need to be distributed. AutoLISP Code: (defun c:test ( / dch ) (cond ( (<= (setq dch (load_dialog "test.dcl")) 0) (princ "\nUnable to find/load test.dcl file.") ) ( (not (new_dialog "test" dch)) (princ "\nUnable to display dialog.") ) ( (set_tile "dcl" "Slide Library Example") (foreach key '("sl1""sl2""sl3""sl4") (action_tile key "(updatetiles $key)") ) (set_tile "sl1" "1") (updatetiles "sl1") (start_dialog) ) ) (if (< 0 dch) (unload_dialog dch)) (princ) ) (defun updatetiles ( key ) ( (lambda ( x y ) (start_image "sld") (fill_image 0 0 x y -15) (slide_image 0 0 x y (strcat "test(" key ")")) (end_image) (mapcar 'mode_tile '("ed1""ed2""ed3""ed4""ed5") (cadr (assoc key '( ("sl1" (0 0 1 1 1)) ("sl2" (0 0 0 1 1)) ("sl3" (1 1 1 0 1)) ("sl4" (1 1 1 0 0)) ) ) ) ) ) (dimx_tile "sld") (dimy_tile "sld") ) ) DCL Code (to be saved as test.dcl): edit : edit_box { edit_width = 12; width = 20; fixed_width = true; } test : dialog { key = "dcl"; spacer; : row { spacer; : radio_column { fixed_height = true; : radio_button { label = "Rectangle"; key = "sl1"; } : radio_button { label = "Rounded"; key = "sl2"; } : radio_button { label = "Circle"; key = "sl3"; } : radio_button { label = "Pipe"; key = "sl4"; } } : image { key = "sld"; width = 33.5; fixed_width = true; aspect_ratio = 0.66; } : column { fixed_height = true; : edit { label = "X:"; key = "ed1"; } : edit { label = "Y:"; key = "ed2"; } : edit { label = "R:"; key = "ed3"; } : edit { label = "D1:"; key = "ed4"; } : edit { label = "D2:"; key = "ed5"; } } spacer; } spacer_1; ok_cancel; } The above files along with the Slide Library file are attached. test.zip
    1 point
×
×
  • Create New...