×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to pause in a script

How to pause in a script

How to pause in a script

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

RE: How to pause in a script

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?

RE: How to pause in a script

Here's what I use in a toolbar button:
^C^C^C^CSELECT AU \ROTATE P ;\180;

RE: How to pause in a script

(OP)
thank you
this works just fine

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources