rcb007 Posted August 12, 2020 Posted August 12, 2020 I have the following routine I am wanting to use. But I would like to be able to have the user pause and do (several other commands: Move, Stretch, etc). Then continue with the rest of the routine. Is that possible? (defun C:InsertBlockStretch () ;;; Insert Dynamic Block (command "._insert" "Viewport-Frame" "0,0" "1" "1" "0" ) ;;; Pause User and Adjust Viewport with Block to Desired Shape (ALERT "Adjust Viewport and Viewport Frame together.") ;;; Change Space of the Viewport-Frame (command "_chspace" "window" "1.07,24.24" "23.12,-0.5" "") ;; Switch Back to PaperSpace (command "_pspace") (princ)) Thank you for help. Quote
Steven P Posted August 12, 2020 Posted August 12, 2020 Are the actions always going to be the same each time? Always a move, always a stretch etc. or will they be up to the user to decide? I think it is easier if you specify which actions to do - even if the user doesn't do anything but move on - than it is to let them have a free range on doing everything Quote
BIGAL Posted August 12, 2020 Posted August 12, 2020 Insert the frame at desired lower left "1.07,24.24" or a getpoint. Pick other corner then work out the X scale and Y scale then insert if you make the Viewport-frame 1 x 1 then scaling is direct difference in X & Y values. 1 Quote
rcb007 Posted August 12, 2020 Author Posted August 12, 2020 You are right, if it’s equal 1x1. The dynamic block just stretches to the user’s preference. I thought the user might need to adjust the shape to the frame they wanted. Maybe I just stop the routine once it inserts, then prompts the user to start the next step which would change space. Etc. that’s just a thought. Quote
BIGAL Posted August 12, 2020 Posted August 12, 2020 Draw a rectang where you drag the top right get its values erase it then insert your block using those values. (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (entlast))))) Quote
Recommended Posts
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.