Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/22/2023 in all areas

  1. This will truncate your string to 3 decimals: (princ (setq weight (/ (fix (* 1000 (atof dato1)))1000.0))) If you wish to round the result, use something like this: (rtos (atof dato1) 2 3)
    2 points
  2. Essentially, DIMZIN is the reason.
    2 points
  3. My point is that if you need to respond to a LISP prompt from a Script, the response cannot be in the LISP routine, it must be part of the Script; hence moving the commands within your LISP routine will have no effect on the outcome. Instead, a better approach is to either: Develop an entirely autonomous LISP program which requires no user input and can therefore simply be loaded & run. OR Remove all of the command calls from your LISP program and perform these from the Script instead.
    1 point
  4. it's not very pretty (unlike me haha) but maybe this could work for you (defun c:t1 ( / pt cmd fn oqa ocm fp i s) (setq fn (getvar 'logfilename)) (if (findfile fn) (vl-file-delete fn)) (setq s "" pt (getpoint "\nSelect internal point for boundary : ")) (setq cmd (list "logfileon" "_.-boundary" "_a" "_i" "_n" "" "" "_non" pt "" "_redraw" "logfileoff")) (setq oqa (getvar 'qaflags) ocm (getvar 'cmdecho)) (setvar 'qaflags 2)(setvar 'cmdecho 1) (vl-catch-all-apply 'vl-cmdf cmd) (gc)(gc) (if (setq fp (open fn "r")) (while (setq i (read-line fp)) (setq s (strcat s i)) ) ) (if fp (close fp)) (if (and s (wcmatch (strcase s t) "*boundary created*")) (progn (alert "boundary created") ;;; chprop + entlast bladiebla ) (alert "computer says no") ) (setvar 'qaflags oqa)(setvar 'cmdecho ocm) (princ) )
    1 point
  5. Work on the filter of the ssget function , then you may not need for two selection sets .
    1 point
×
×
  • Create New...