Jump to content
Developer Wiki and Function Reference Links ×

Fit to objects


Recommended Posts

I have a script that makes a custom selection and I would like to automatically zoom to the selected objects...just like the "fit to objects", but can find no function or procedure for that. Any ideas on how to use the "Zoom" class of procedures to accomplish the feat. I figure I could probably calculate the view based on the bounding boxes of the selected objects as well as the zoom factor, but am looking for an easier solution first.

Link to comment

After creating your script with Custom Selection you can edit the script to add the following statement:

DoMenuTextByName('Fit To Objects', 0);

That should do it.

Link to comment

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