Thanks Thanks:  0
Needs Pictures Needs Pictures:  0
Picture(s) thanks Picture(s) thanks:  0
Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Join Date
    Jan 2014
    Location
    Sydney Upper North Shore
    Posts
    4,470

    Default

    There's a discussion here on loading and using .lsp files. Not sure if it is of any help.
    CAD Forum - How to load/install a LISP application in AutoCAD?

  2. # ADS
    Google Adsense Advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many





     
  3. #17
    Join Date
    Jul 2003
    Location
    Riverhills, Brisbane
    Age
    64
    Posts
    1,216

    Default

    All Lisps that I have written are just text files

    I use "load" for my Lisp files in my toolbar menu. Not in the Acad.lsp

    Your MCR text should just be inserted into your Acad.lsp file using cut & paste.

    This will allow you to call up the MR (Move Rotate) or CR (Copy Rotate) at the Command line but it should be loaded into the dwg automatically with the Acad.lsp file

    Here is an MCR.lsp .......see if you can insert the text into the Acad.lsp file..if successful command should be either MR or CR



    ;;; Mcr.Lsp
    ;;; Copyright (C) 1990 by Autodesk Australia Pty. Ltd.
    ;;;
    ;;; Permission to use, copy, modify, and distribute this software and its
    ;;; documentation for any purpose and without fee is hereby granted.
    ;;;
    ;;; THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
    ;;; ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
    ;;; MERCHANTABILITY ARE HEREBY DISCLAIMED.
    ;;;
    ;;;-------------------------------------------------------------------------
    ;;; DESCRIPTION:
    ;;;
    ;;; Mcr.Lsp provides two new commands, MoveRot and CopyRot.
    ;;; MoveRot, MOVEs and ROTATEs selected entities whilst
    ;;; CopyRot, COPYies and ROTATEs selected entities.
    ;;;
    ;;; Written by Sam Crupi, Autodesk Australia Pty. Ltd.
    ;;; October 1987
    ;;; Modified by Jeff De Silva & Sam Crupi, Autodesk Australia Pty. Ltd.
    ;;; November 1990
    ;;;
    ;;; Version 1.0
    ;;; 4 December 1990
    ;;;
    ;;;-------------------------------------------------------------------------
    ;;;
    ;;; Error function
    ;;;
    (defun mcr_err (s) ; If an error (such as CTRL-C) occurs
    ; while this command is active...
    (if (/= s "Function cancelled")
    (if (= s "quit / exit abort")
    (princ)
    (princ (strcat "\nError: " s))
    )
    )
    (if mcr_oer ; If an old error routine exists
    (setq *error* mcr_oer) ; then, reset it
    )
    (if mcr_oce ; Reset command echoing on error
    (setvar "cmdecho" mcr_oce)
    )
    (princ)
    )
    ;;;
    ;;; Command MoveRot
    ;;;
    (defun c:MoveRot (/ sset mcr_oce mcr_oer)
    (setq mcr_oce (getvar "cmdecho")) ; save cmdecho setting
    (setvar "cmdecho" 0) ; turn cmdecho off
    (if *error* ; Set our new error handler
    (setq mcr_oer *error*
    *error* mcr_err)
    (setq *error* mcr_err)
    )
    (princ (strcat "\nMoveRot, Version " mcr_ver
    ", (C) 1990 by Autodesk Australia Pty. Ltd. "
    )
    )
    (if (setq sset (ssget)) ; get selection set
    (progn
    (setvar "cmdecho" 1) ; turn cmdecho on to allow MOVE
    ; prompts to appear
    (command "MOVE" sset "" pause pause) ; MOVE them
    ;; now ROTATE the selection set using the LASTPOINT as Base point
    (command "ROTATE" sset "" (getvar "LASTPOINT") pause)
    )
    )
    (setvar "cmdecho" mcr_oce) ; reset cmdecho to old setting
    (if mcr_oer ; If an old error routine exists
    (setq *error* mcr_oer) ; then set it back
    )
    (princ)
    )
    ;;;
    ;;; Command CopyRot
    ;;;
    (defun c:CopyRot (/ mcr_oce mcr_oer sset)
    (setq mcr_oce (getvar "cmdecho")) ; save cmdecho setting
    (setvar "cmdecho" 0) ; turn cmdecho off
    (if *error* ; Set our new error handler
    (setq mcr_oer *error*
    *error* mcr_err)
    (setq *error* mcr_err)
    )
    (princ (strcat "\nCopyRot, Version " mcr_ver
    ", (C) 1990 by Autodesk Australia Pty. Ltd. "
    )
    )
    (if (setq sset (ssget)) ; get selection set
    (progn
    (command "COPY" sset "" "0,0" "0,0") ; COPY selection set over itself
    (setvar "cmdecho" 1) ; turn cmdecho on to allow MOVE
    ; prompts to appear
    (command "MOVE" "p" "" pause pause)
    (redraw) ; Redraw screen
    ;; now ROTATE the selection set using the LASTPOINT as Base point
    (command "ROTATE" "p" "" (getvar "LASTPOINT") pause)
    )
    )
    (setvar "cmdecho" mcr_oce) ; reset cmdecho to old setting
    (if mcr_oer ; If an old error routine exists
    (setq *error* mcr_oer) ; then set it back
    )
    (princ)
    )
    ;;;
    ;;; Define the c: functions.
    ;;;
    (defun c:MR ()
    (c:MoveRot)
    )
    (defun c:CR ()
    (c:CopyRot)
    )
    (setq mcr_ver "1.0") ; set version number string
    ;;(princ (strcat "\nC:MCR (v" mcr_ver ") loaded."))
    ;;(princ "\nMR or MoveRot to Move and Rotate, CR or CopyRot to Copy and Rotate.")
    (princ)

  4. #18
    Join Date
    Nov 2006
    Location
    Heidelberg, Victoria
    Age
    79
    Posts
    2,251

    Default

    Thanks skot, the version I have rolls Move rotate and Copy rotate into the one file.

    The problem I'm having is this

    I can view and copy the lisp file I have, then navigate to Autocad\support\acad.lisp then open that. I place the cursor at the bottom of the text and right click paste.

    I get the following message, You don't have permission to open this file blah blah.

    How do I get around this problem?

    edit, just looked up my account and note that am logged in as administrator

    Ken

  5. #19
    Join Date
    Nov 2006
    Location
    Heidelberg, Victoria
    Age
    79
    Posts
    2,251

    Default

    skot, I decided to give your idea of putting mcr into the support directory, under it's own name.

    Double clicking mcr brought up the lisp text, so assumed all was well.

    After firing up Autocad and clicking on tools\load applications then loading the file, disappointment.

    From the command line, typing in mcr results in unknown command

    Any clues?

    Ken

  6. #20
    Join Date
    Jul 2003
    Location
    Riverhills, Brisbane
    Age
    64
    Posts
    1,216

    Default

    I don't have that problem, I can copy, paste, cut from any lsp file to any other.

    Have you tried it with a New notepad file and saving it as a .lsp or even adding the mcr text into any other lsp files.

    Sounds more like a Windows matter not Acad

  7. #21
    Join Date
    Jul 2003
    Location
    Riverhills, Brisbane
    Age
    64
    Posts
    1,216

    Default

    If you MCR.lsp file is in your support directory type.....

    (load "MCR") >(Enter)

    then

    MR or CR if it loads ...I am assuming that MR & CR are your Command line shortcuts

  8. #22
    Join Date
    Jul 2003
    Location
    Riverhills, Brisbane
    Age
    64
    Posts
    1,216

    Default

    I am also assuming that your Support directory is in your Search Path under the Files option

  9. #23
    Join Date
    Nov 2006
    Location
    Heidelberg, Victoria
    Age
    79
    Posts
    2,251

    Default I'm a silly sausage

    I'm a dill, the MCR lisp file works, I was typing in mcr and getting "unknown command".

    Typing in MR or CR gets the results I was after.

    I tried this before seeing skot's post #21

    Special thanks to easymike29 and skot

    Who's a happy boy?

    Ken

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Autocad 2000i
    By neksmerj in forum COMPUTERS
    Replies: 0
    Last Post: 20th April 2017, 11:08 PM
  2. Autocad R14
    By neksmerj in forum COMPUTERS
    Replies: 2
    Last Post: 30th July 2016, 06:25 PM
  3. Anyone here got autocad?
    By echnidna in forum CNC Machines
    Replies: 12
    Last Post: 5th January 2009, 12:40 AM
  4. Help with Autocad file
    By neksmerj in forum COMPUTERS
    Replies: 4
    Last Post: 18th October 2008, 04:52 PM
  5. Autocad LT 2007 and Autocad 2007
    By Toolin Around in forum NOTHING AT ALL TO DO WITH WOODWORK
    Replies: 6
    Last Post: 31st January 2007, 11:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •