Jump to content

Recommended Posts

Posted

I have ACAD2010 & am attempting to use a LISP routine that inserts a block for a photo callout symbol & the text for the photo number.

The file contains a command "SAVSET" which I can't find information for it's purpose or it's syntax.

When I enter the command, I get an error at the command line which is as follows in red:

 

Command: photo

; error: no function definition: SAVSET

 

The LISP woutine is as follows:

 

; ********************************* PHOTO **********************************

;

;

; ***************************************************************************

;

;

; ***************************************************************************

(defun C:Photo (/ cpt note)

(SAVSET '("CMDECHO" "CLAYER" "OSMODE" "ATTDIA")')

(setvar "OSMODE" 0)

(setvar "ATTDIA" 0)

;;(LYRSET "I-BLKO-PHOT" "1" "CONTINUOUS") USER HAS TO PICK THIS AS CURRENT LAYER TO BEGIN 4/25/02

;;

;; Specify photo number to start with

;;

(if (null pno) (setq pno 1))

(DEFAULT "Starting photo number" pno "INT")

(setq pno input

cpt (getpoint (strcat "\nPick location for camera "(itoa pno)": ")))

;;

;; Loop until no camera point is picked

;;

(while cpt

(princ (strcat "\nPick target for camera "(itoa pno)": "))

(command "UNDO" "G")

(command "INSERT" "C:\Users\Shadow\Documents\CAD\LISP routines\G-SFOTO1" cpt "" "" pause)

;; allow operator to select optional note

;; (menu "P0" "photo" "Y")

(setq note (getstring t "\nNote (RETURN for none): "))

;; (menu "P0" "POP0" "N")

(command "INSERT" "C:\Users\Shadow\Documents\CAD\LISP routines\G-SFOTO2" cpt "" "" "" pno (if note note ""))

(setq pno (1+ pno) cpt "U") ; set cpt to "U" to enter and repeat while loop.

(command "UNDO" "E")

(while (and (not (null cpt))

(= "U" cpt))

(initget "U u ")

(setq cpt (getpoint (strcat "\nUndo/Pick location for camera "(itoa pno)" or RETURN to exit: ")))

(if (or (= "U" cpt) (= "u" cpt))

(progn

(command "U")

(setq pno (1- pno))))

)

)

(RESET)

(princ))

 

Could anyone tell me more about the command &/or how to correct my error?

Any help would be greatly appreciated.

Rob

Posted

Hi Rob,

 

Welcome to CADTutor :)

 

Looks like you are missing quite a few subfunctions from your code, namely SAVSET, DEFAULT, menu, & RESET.

 

I would advise you contact the author of the code.

 

Also, please have a read of this .

 

Lee

Posted

"Savset" is not an AutoCAD command, must have been a custom command someone created. The autolisp gurus here will be able to help you much more than me, however.

Posted
Hi Rob,

 

Welcome to CADTutor :)

 

Looks like you are missing quite a few subfunctions from your code, namely SAVSET, DEFAULT, menu, & RESET.

 

I would advise you contact the author of the code.

 

Also, please have a read of this .

 

Lee

 

 

Thank you Lee.

 

Contacting the author of the code is not possible for a few reasons and I am new to using LISP routines. I will keep looking here to see what I can do with the routine.

 

Thanks again.

Rob

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