Jump to content

Is it possible to stretch a viewport within lisp?


Recommended Posts

Posted

I am having a hard time trying to figure out how to stretch a side or (2 endpoints) of a viewport a few inches automatically.

 

I can stretch objects within that area, but it will not allow me to select the viewport and slide that.

 

(command "stretch" "19.05,-1.75" "24.5,25.0" "" "22.7,23.5719" "28.1011,23.5719")

 

 

Thank you for the help.

Posted (edited)

Are you in paper space? Is the layer the viewport is on unlocked? Your selection window has to in compass both endpoint grips to work on the viewport.

 

Try it manually and see if it works. you might need to update your selection window.

 

(command "stretch" pause pause "" "0,0" "5.4011,0")

 

Edited by mhupp
Posted

Sort of easy using vl have 2 properties Width and Height so can stretch by the amount required, ok this will stretch left and right, ok so now there is a property Center so can do a move viewport based on center and new pt

 

(setq obj (vlax-ename->vla-object (car  (entsel "Pick obj"))))
(vla-put-width obj 1000)
(vla-put-center obj '(500 400))

 

Posted

Thank you guys. BigAl, that is an interesting way of doing it. easy too.

 

 

Posted

Use dumpit.lsp and pick a viewport will expose all the variables that you can use to get the stretch to work. Hint Center.

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