It looks like you're new here. If you want to get involved, click one of these buttons!
Hi there.
So I have a new project that I can't seem to find information on in the docs. I want a way to automatically generate changes in the current view, adding rulers, changing layers that are visible, etc. using python code.
Let's say that someone is looking at a layout like this...
And you want to use the code to now see this...
Now let's say you want to add a ruler...
Or maybe change the layers that are visible
I am curious if there is a way to set all of these properties by utilizing the desired coordinates for this information. In regard to zooming in and out, I would simply like to force the user view based on the coordinate pairs that correspond the the corners of the new view.
I thought that I could access the LayoutView property, but I did not see anything within the API that would help me.
Any help is GREATLY appreciated.
Comments
@ManzAutomations There are tons of functions to achieve this and they are not hard to find:
Some of them:
Matthias
Hi ManzAutomations
since you are trying to implement alot of customization into each view (zoom, layer visibility and annotations), I recommend to use "session" to save each view status.
here's a short video of how this session bookmark works.
https://i.imgur.com/5eINkN7.mp4
drag and drop *.lys into widget to load saved sessions
@Matthias Thank you so much for your answer. I am still new to the API, so this is a huge help.
@RawrRanger, this idea may not be helpful in my case given that I am generating the exact locations dynamically and not by user input. However, the idea is wonderful and is definitely an interesting thought. Thank you so much!
Hi ManzAutomations
here's an example of showing a cell and with custom zoom, layer and annotation
function can be use like this.
show Cell "A" as new top and zoom to given box (-1.5, -1.5, 2.5, 2.5),
show all layers but hide layer 2/0 and 4/0 if those two layer exist
add two annotation at given coordinate (0, 0, 1, 1) and (-1, 1, 0, 0)
@RawrRanger That is exactly what I needed! Thank you so much!