Hi everybody,
I'm in a problem with time, and need to find some solutions really quick. So, I would really appreciate your help.
I will have some questions about layouts and viewport.
I need to select all the viewports in the drawing and to make some changes with them, I'm planning to select them all with ssget command. If I do that I will have one viewport for the paperspace itself in every layout. One of my question is, how to know which viewport is the paperspace itself?
Second question is, how to get the name of layout in which one is the viewport?
It is important to me that the lisp is really fast, so I'm planning to do the most of stuffs with vla commands.
Thank you for any help you can provide.
Solved! Go to Solution.
Solved by _gile. Go to Solution.
I was thinking something, correct me if I'm wrong.
Maybe it is better to select all the layouts with vla-get-layouts,
then I can easily get the name of every layout.
Now I'm not sure how to get the viewport, is this the right way:
(setq layblock (vla-get-block layout))
(setq vp1 (vla-item layblock 0)) ;Is always the first one Paperspace?
(setq vp2 (vla-item layblock 1)) ; If the first one is paperspace, then this is the one I need !
What are more experienced lispers thinking, is this the better way, then to collect all the viewports with ssget?
pendean,
Thank you for a quick answer.
Actually that was my start before I asked my question, from that I get here where I'm now...
Thank you gile,
It was exactly, for what I was looking for.
Now with assoc 410 I can get the name of the layout in which one is viewport created.
Thanks again.
Is there a way to get the name of the layout from viewport vla-object?
Can't find what you're looking for? Ask the community or share your knowledge.