Jump to content

Lisp's not working in 2010 that worked in 2009


kkleinchester

Recommended Posts

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:.

Link to comment
Share on other sites

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

  • alanjt

    22

  • kkleinchester

    19

  • Lee Mac

    12

  • JeepMaster

    2

Top Posters In This Topic

Posted Images

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?

Link to comment
Share on other sites

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 :P

Link to comment
Share on other sites

;; **********************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)

)

Link to comment
Share on other sites

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)
)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

 (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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...