Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/29/2023 in all areas

  1. (if (null tmp) (setq tmp 25)) (initget 6) (and (setq tmp (cond ( (getreal (strcat "\nSpecify the psize <" (vl-princ-to-string tmp)"> : ") ) ( tmp ) )) (setq psize tmp))
    2 points
  2. Not a problem, always good to see someone read what we offer, understand, learn and have a go at it, fixing or altering to suit.
    1 point
  3. Like Mhupp why are you trying to jam everything into 1 dcl ? Autocad made toolbars for this idea you can have each of the dcl "radio button column" as a toolbar. No Cond required as the pick an icon there is a matching do something. Anyway here is an example of using radio buttons which are named RB1 RB2 etc auto created I have a 3 column as well need to test it again.Its a global program use in any code Multi radio buttons 2col.lsp Look at example code in Multi radio buttons 2 col. It returns the item number in the description list. AH:2col & AH:2col2 This is a tool bar I just made for some one. Put horizontal or vertical on edge of screen left and right. "steal.lsp" Look at image above post 2 and how many options are in the menu, the > means another menu, can have sub sub menu's.
    1 point
  4. Welcome to the forums but use this when posting code While this lisp is quite long it all it is a menu to call other lisp's first thing is to make sure you have those in your system. Then depending on what button you push in the menu it sets the "KeyNo" variable to a #. What it is failing to do is pass that number and list to the @RunExtSub function. this needs to be called after the @LoadDialog_Tsm function. Starting at line 294 ;;;*******************************Main program Tsm*******************************;;; (setq DclTemp (@TsmDcl)) ($TsmModes '("CMDECHO")) (setq OldErr *error* *error* $TsmError) (setvar "CMDECHO" 0) (@LoadDialog_Tsm) (@RunExtSub KeyNo KeyLst) ;added line ($TsmModer) (setq *error* OldErr) (princ) ) Also the @RunExtSub why not just pass KeyNo only and rewrite all the cond. (defun @RunExtSub (KeyNo / op warn) (setq op KeyNo) (cond ((= op 1)(c:retab)) ((= op 2)(progn(command "_filedia" "1" "_osmode" "1023" "_pdmode" "0")(princ "\nReset AutoCAD variables: Filedia, Osmode and Pdmode."))) ((= op 3)(if (@FindLoad "steal.lsp")(c:steal))) ....
    1 point
  5. Another get pline co-ords, plus a little bit more good learning exercise. (setq num (getint "\nEnter start number ")) (while (setq plent (entsel "\nPick pline enter to stop")) (if plent (progn (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent))))) (foreach pt co-ords ; do your write points to file (setq num (1+ num)) ) ) ) )
    1 point
  6. Have you thought about using a pop menu much easier to write a mnu file than a dcl. can have more items than fit in default display as it has a Next button. Or even go down the toolbar.mnu option, again make your own using notepad. This is just to show how it would look. yeah I know pipes selected but pits shown 2 images joined.
    1 point
×
×
  • Create New...