Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pause in a script

Status
Not open for further replies.

Antonius60

Mechanical
Dec 15, 2005
2
I know how to pause but I would like to pause sometimes more than once or only once in a lsp... For instance
rotate command
defun:1390 ()(command "rotate" pause "" pause "90")(princ))
and I know that you can use the / instead of pause with the same results but if I want to select more than one object (either window or crossing or selection) I dont know how to specify user input

thanks in advance...
Antonius60

 
Replies continue below

Recommended for you

to specify user input you can use "ssget" which will prompt the user to select elements and add them to a selection set.

Code:
Program Name: rot180
;Description: This program will rotate selected boject by 180 degrees.
;
;Programmer: Kevin Petursson
;Date: May 16, 2005
;
;
;
(defun C:rot180(/ CtrPt)
  (setvar "CMDECHO" 0)
  (setq ss1 nil)
  (setq ss1 (ssget))
  (setq CtrPt (getpoint "\nPick the rotation Point:...  "))
  (command "rotate" "P" "" CtrPt "180")
  (setq ss1 nil)
  (setvar "CMDECHO" 1)
  (princ)
)		;end defun
This routing will rotate the select objects 180 degrees about a selected point.
ss1 is the mane of the selection set.

What kind of user input do you want?
 
Here's what I use in a toolbar button:
^C^C^C^CSELECT AU \ROTATE P ;\180;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor