kkleinchester Posted December 3, 2009 Share Posted December 3, 2009 Any help would be appreciated. I have some custom lisp routines that worked great in a previous versions but we have finally switched full time to 2010 and the commands no longer work. Some of my standard lisp that were mover still work, so I am at a loss:cry:. Quote Link to comment Share on other sites More sharing options...
alanjt Posted December 3, 2009 Share Posted December 3, 2009 Any help would be appreciated. I have some custom lisp routines that worked great in a previous versions but we have finally switched full time to 2010 and the commands no longer work. Some of my standard lisp that were mover still work, so I am at a loss:cry:. Can you post an example? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 3, 2009 Share Posted December 3, 2009 It could be any number of things, could you post an example of the LISP that fails to work, and we can see what is wrong (if anything). Lee EDIT: AJ beat me to it Quote Link to comment Share on other sites More sharing options...
kkleinchester Posted December 3, 2009 Author Share Posted December 3, 2009 ;; **********************MOVE COMMANDS*************************** ;; *************Commands provided with best of intentions******** ;; *************And Absolutely No Warrantee!!******************** ;; ********Seriously though, this is pretty simple stuff********* ;; ********Craig Colomb copyright2005 cc@craigcad.us************* (defun c:mx (/ ss ptso ptd ptre xDist) ;Move along X axis only (setvar "cmdecho" 0) (setq ss (ssget)) (setq ptso (getpoint "\n Select source point or Enter to type in distance along X axis" ) ) (if (null ptso) (progn (setq xDist (getdist "\nType in or pick points for distance ") ptso (list 0.0 0.0 0.0) ptd (list xDist 0.0 0.0) ) (command ".move" ss "" "_non" ptso "_non" ptd) (princ) ) (progn (setq ptre (getpoint "\n Select destination reference")) (setq ptd (list (car ptre) (cadr ptso) (caddr ptso))) (command ".move" ss "" "_non" ptso "_non" ptd) (setvar "cmdecho" 1) (princ) ) ) ) (defun c:mz (/ ss ptso ptd ptre) ;MOve in Z direction (setvar "cmdecho" 0) (setq ss (ssget)) (setq ptso (getpoint "\n Select source point or Enter to type in distance along Z axis")) (if (null ptso) (progn (setq xDist (getdist "\nType in or pick points for distance ") ptso (list 0.0 0.0 0.0) ptd (list 0.0 0.0 xDist) ) (command ".move" ss "" "_non" ptso "_non" ptd) (princ) ) (progn (setq ptre (getpoint "\n Select destination reference")) (setq ptd (list (car ptso) (cadr ptso) (caddr ptre))) (command ".move" ss "" "_non" ptso "_non" ptd) (setvar "cmdecho" 1) (princ) ) ) ) (defun c:my (/ ss ptso ptre ptd) ;Move in Y only (setvar "cmdecho" 0) (setq ss (ssget)) (setq ptso (getpoint "\n Select source point or Enter to type in distance along Y axis" ) ) (if (null ptso) (progn (setq xDist (getdist "\nType in or pick points for distance ") ptso (list 0.0 0.0 0.0) ptd (list 0.0 xDist 0.0) ) (command ".move" ss "" "_non" ptso "_non" ptd) (princ) ) (progn (setq ptre (getpoint "\n Select destination reference")) (setq ptd (list (car ptso) (cadr ptre) (caddr ptso))) (command ".move" ss "" "_non" ptso "_non" ptd) (setvar "cmdecho" 1) (princ) ) ) ) (defun c:mxy (/ ss ptso ptre ptd) ;Move in X,Y only (setvar "cmdecho" 0) (setq ss (ssget)) (setq ptso (getpoint "\n Select source point")) (setq ptre (getpoint "\n Select destination reference")) (setq ptd (list (car ptre) (cadr ptre) (caddr ptso))) (command ".move" ss "" "_non" ptso "_non" ptd) (setvar "cmdecho" 1) (princ) ) ;; ******************COPY COMMANDS****************************************** (defun c:cx (/ ss ptso ptd ptre) ;.copy along X axis only (setvar "cmdecho" 0) (setq ss (ssget)) (setq ptso (getpoint "\n Select source point")) (setq ptre '(1 1));GIve ptre a value to enter While loop (while (/= nil ptre);repeat until user cancels (setq ptre (getpoint "\n Select destination reference")) (setq ptd (list (car ptre) (cadr ptso) (caddr ptso))) (command ".copy" ss "" "_non" ptso "_non" ptd) ) (setvar "cmdecho" 1) (princ) ) (defun c:cz (/ ss ptso ptd ptre) ;.copy in Z direction (setvar "cmdecho" 0) (setq ss (ssget)) (setq ptso (getpoint "\n Select source point")) (setq ptre '(1 1)) (while (/= nil ptre) (setq ptre (getpoint "\n Select destination reference")) (setq ptd (list (car ptso) (cadr ptso) (caddr ptre))) (command ".copy" ss "" "_non" ptso "_non" ptd) ) (setvar "cmdecho" 1) (princ) ) (defun c:cy (/ ss ptso ptre ptd) ;.copy in Y only (setvar "cmdecho" 0) (setq ss (ssget)) (setq ptso (getpoint "\n Select source point")) (setq ptre '(1 1)) (while (/= nil ptre) (setq ptre (getpoint "\n Select destination reference")) (setq ptd (list (car ptso) (cadr ptre) (caddr ptso))) (command ".copy" ss "" "_non" ptso "_non" ptd) ) (setvar "cmdecho" 1) (princ) ) (defun c:cxy (/ ss ptso ptre ptd) ;.copy in X,Y only (setvar "cmdecho" 0) (setq ss (ssget)) (setq ptso (getpoint "\n Select source point")) (setq ptre '(1 1)) (while (/= nil ptre) (setq ptre (getpoint "\n Select destination reference")) (setq ptd (list (car ptre) (cadr ptre) (caddr ptso))) (command ".copy" ss "" "_non" ptso "_non" ptd) ) (setvar "cmdecho" 1) (princ) ) Quote Link to comment Share on other sites More sharing options...
alanjt Posted December 3, 2009 Share Posted December 3, 2009 Real quick, does this work? (defun c:mxy (/ ss ptso ptre ptd) ;Move in X,Y only (setvar "cmdecho" 0) (setq ss (ssget)) (setq ptso (getpoint "\n Select source point")) (setq ptre (getpoint "\n Select destination reference")) (setq ptd (list (car ptre) (cadr ptre) (caddr ptso))) (command "_.move" ss "" "_non" ptso "_non" ptd) (setvar "cmdecho" 1) (princ) ) Quote Link to comment Share on other sites More sharing options...
kkleinchester Posted December 3, 2009 Author Share Posted December 3, 2009 no, it did not! thanks for help Quote Link to comment Share on other sites More sharing options...
alanjt Posted December 3, 2009 Share Posted December 3, 2009 no, it did not! thanks for help Just wanted to rule out the simple things. What kind of error does it give you? Copy it from the commandline. Quote Link to comment Share on other sites More sharing options...
kkleinchester Posted December 3, 2009 Author Share Posted December 3, 2009 unknown command Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 3, 2009 Share Posted December 3, 2009 Are you loading the codes correctly? Quote Link to comment Share on other sites More sharing options...
alanjt Posted December 3, 2009 Share Posted December 3, 2009 What happens if you just paste this into the command line? (command "_.move") Quote Link to comment Share on other sites More sharing options...
kkleinchester Posted December 3, 2009 Author Share Posted December 3, 2009 it is the reg move command Quote Link to comment Share on other sites More sharing options...
alanjt Posted December 3, 2009 Share Posted December 3, 2009 (defun c:mxy (/ ss ptso ptre ptd) ;Move in X,Y only (setvar "cmdecho" 1) (setq ss (ssget)) (setq ptso (getpoint "\n Select source point")) (setq ptre (getpoint "\n Select destination reference")) (setq ptd (list (car ptre) (cadr ptre) (caddr ptso))) (command "_.move" ss "" "_non" ptso "_non" ptd) (setvar "cmdecho" 1) (princ) ) Run this and copy/paste everything it prints to the commandline. Quote Link to comment Share on other sites More sharing options...
kkleinchester Posted December 3, 2009 Author Share Posted December 3, 2009 do you mean save it as a lisp, then past to cmdline? or just paste? Quote Link to comment Share on other sites More sharing options...
alanjt Posted December 3, 2009 Share Posted December 3, 2009 do you mean save it as a lisp, then past to cmdline? or just paste? EITHER WILL WORK. Quote Link to comment Share on other sites More sharing options...
kkleinchester Posted December 3, 2009 Author Share Posted December 3, 2009 I am still at the standard move command. thanks for your help, if it helps this lisp is to allow you to move an object on one axis, or just xy. Quote Link to comment Share on other sites More sharing options...
alanjt Posted December 3, 2009 Share Posted December 3, 2009 I am still at the standard move command. thanks for your help, if it helps this lisp is to allow you to move an object on one axis, or just xy. I understand what it does. It works fine on my end, but I need you to load it, execute it and paste everything it displays at the command line. Quote Link to comment Share on other sites More sharing options...
kkleinchester Posted December 3, 2009 Author Share Posted December 3, 2009 I pasted to the command line and got just the standard move Quote Link to comment Share on other sites More sharing options...
alanjt Posted December 3, 2009 Share Posted December 3, 2009 I pasted to the command line and got just the standard move DID YOU EXECUTE THE COMMAND? SORRY FOR THE CAPS, I'M AT WORK. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 3, 2009 Share Posted December 3, 2009 Did you not receive an error after running the code in reply #12? If so, could you post your command-line history on here so that we can diagnose it Quote Link to comment Share on other sites More sharing options...
kkleinchester Posted December 3, 2009 Author Share Posted December 3, 2009 maybe I am not doing something correctly! I pasted it, hit enter then just got move. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.