Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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.

  • Like 1
Posted

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.

Posted

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

 

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