Jump to content
Developer Wiki and Function Reference Links ×

Script to create a saved view?


MaxStudio

Recommended Posts

I created a script that creates a list of layers. is it possible to also have this script create a list of saved views?

I've given each layer a handle. If I knew how to create a saved view i could possibly use the handle to set the visibility of the layers. I just dont know if it is possible to create a saved view using a script...

Link to comment

The VSave and SaveSheet commands will allow you to save the current view. The VRestore will recall a view that you know the name of and VDelete will delete a view.

Saved views are vectorscripts.

You can use some variation of the following to get the handle and name of veiws saved in the Saved Views folder/menu item/whatever

Message(getname(Fin3D(GetObject('Saved Views'))));

And before you ask, I figured out that Fin3D gets the script by trial and error.

Link to comment

Wonderful I'm on the road to success!

So far I have the script doing the following

-User enters a string to name the layers

-Creates a list of Layers

-Sets the Scale of Each Layer

-Sets the Visibility of The Layers that were created

-Saves the View

Now I need to figure out a way to set all layers in the active document to "Hidden" That way, when I run the script a second or third time i can hide all layers in the active document and start fresh. Any ideas?

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