Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/25/2024 in all areas

  1. That might be the worst thing I've ever heard. Thing about bosses is, from time-to-time, they need to be reminded they don't always have the answers.
    2 points
  2. @leonucadomi Look at this https://www.cadtutor.net/forum/topic/75587-help-with-extracting-text-from-one-dimension/
    1 point
  3. Oh, for god sake..... Sometimes you need to take a break at the right time.... I forgot to EVAL function, after the read, to actualy get the list, and not just the symbol name.... Problem solved! ;; Define actions for the dialog (action_tile "accept" "(progn (setq nr 0) (repeat (length obattlist) (set (read (strcat \"value\" (itoa nr))) (nth (atoi (get_tile (strcat (nth nr obattlist) \"_list\"))) (eval (read (strcat (nth nr obattlist) \"_options\"))))) (setq nr (+ 1 nr)) ) (done_dialog 1) )")
    1 point
  4. Consp generally means that the argument isn't a list. Have a test and use (type Verhardingen-Verband_options) in a princ or alert line to show what Verhardingen-Verband_options is. Let us know if it is a list because there is something else wrong otherwise
    1 point
  5. Here's a working version.... but still to be tested a bit... plot.lsp
    1 point
  6. @Steven P I think this link is what you find
    1 point
  7. I thought posted a reply on my phone at moment look for surface rl.lsp by me does 1 point but simple fix for multiple points CIVIL SITE DESIGN does this as a report for all chainages XYZ
    1 point
  8. @Rabindra Bhatta, please upload your sample dwg , included te block or whatever is the triangle and 98.00 , and xls sample to be used
    1 point
  9. I have limited time at moment but for any one here is code close to what is wanted. A good starting point. Happy for some one to enhance. I will comment though that Civil site design a CIVIL add on will create reports of all cross sections etc in one go including XYZ of points.SurfaceRL.lsp
    1 point
  10. @Wootney You need to plug the selection set into the "-setlayer" command with a return following it. I also localized your "ss" variable, and added the "._" on the command names to allow language localization and prevent any redefined commands from mucking things up. See update below: (defun c:MCU (/ ss) ; localize the variable "ss" (command "._LAYON") (command "._LAYTHW") (command "._-PURGE" "ALL" "*" "N") (setq ss (ssget "_ALL")) (command "._-setbylayer" ss "" "y" "y");; added "ss" into command with a "" for the return. (princ) ) EDIT alternatively, you don't even need the call to ssget: (defun c:MCU () (command "._LAYON") (command "._LAYTHW") (command "._-PURGE" "_ALL" "*" "_N") (command "._-setbylayer" "_all" "" "_y" "_y") (princ) )
    1 point
  11. What I use in my day-to-day work is basically something like this. I'd normally type the right command name in and go about that approach. As Steven pointed out, once the direction is set, most users are happy with it. (Only works in 2D): (defun c:lx nil (CommandDirection (list "_.LINE" pause) ".Y")) (defun c:ly nil (CommandDirection (list "_.LINE" pause) ".X")) (defun c:cx (/ ss) (if (setq ss (ssget "_:L")) (CommandDirection (list "_.COPY" ss "" "_M" pause) ".Y"))) (defun c:cy (/ ss) (if (setq ss (ssget "_:L")) (CommandDirection (list "_.COPY" ss "" "_M" pause) ".X"))) (defun c:mx (/ ss) (if (setq ss (ssget "_:L")) (CommandDirection (list "_MOVE" ss "" pause) ".Y"))) (defun c:my (/ ss) (if (setq ss (ssget "_:L")) (CommandDirection (list "_MOVE" ss "" pause) ".X"))) (defun c:sx (/ ss) (if (setq ss (ssget "_:L")) (CommandDirection (list "_STRETCH" ss "" pause) ".Y"))) (defun c:sy (/ ss) (if (setq ss (ssget "_:L")) (CommandDirection (list "_STRETCH" ss "" pause) ".X"))) ;; Command Direction - Jonathan Handojo ;; Creates a command that constraints point prompts to X, Y or Z axis. ;; cmd - a list of strings to pass into the AutoCAD command function. ;; => The next prompt following the string list supplied must be a point selection. ;; dir - a string of either ".X", ".Y" or ".Z" (defun CommandDirection (cmd dir) (apply 'command cmd) (while (not (zerop (getvar "cmdactive"))) (command dir "_non" "@0,0,0" pause) ) (princ) )
    1 point
×
×
  • Create New...