Change Scale of All Viewports

Change Scale of All Viewports

jmartt
Collaborator Collaborator
2,827 Views
9 Replies
Message 1 of 10

Change Scale of All Viewports

jmartt
Collaborator
Collaborator

I just posted about getting rid of multiply-owned objects.

But I think maybe I should address the cause of these errors.

It seems to me things are getting weird and buggy, (and probably producing the mult-owned errors), when I change the scale of lots of viewports in a drawing, over several paperspaces.

 

I have a LISP that unlocks all the viewports in a dwg, even in different paperspaces. And I have a LISP that locks them all back up. In between casting these spells, however, I'm manually going to each VP and changing the Standard Scale via Properties. This endeavor seems, especially after an hour or so of doing it, that it lends itself to some sort of LISP routine.

 

Is there a way to change the Standard Scale of all viewports in a dwg, even in different paperspaces? I've searched but haven't found anything. And this is far beyond my ability to code. I'm hoping someone has a routine laying around that can do, or can be easily modified to do, this.

0 Likes
Accepted solutions (1)
2,828 Views
9 Replies
Replies (9)
Message 2 of 10

cadffm
Consultant
Consultant

If you can not do something:

Why not using FILTER (object-selection ALL) or SSX (entity VIEWPORT) or (sssetfirst nil (ssget "_X" '((0 . "VIEWPORT")(-4 . ">")(69 . 1))))

to select all viewports and then using the properties palette?

 

Ever thought of a service provider who gets paid for his work?
This makes after commissioning all desired if this is feasible, it is his job.
Man Embarassed

 

Or start to learn about dwg/dxf structure and programming. http://help.autodesk.com/view/OARX/2019/ENU/

Sebastian

0 Likes
Message 3 of 10

jmartt
Collaborator
Collaborator
0 Likes
Message 4 of 10

jmartt
Collaborator
Collaborator

After three years of wondering why my text was the wrong size in paperspace...

 

The method I used changed the annotation scale of all the paperspaces. No good!

 

I stated above that I had a routine that globally unlocked all the viewports in a drawing, but if I did have that, I must've lost it. I think I was just mistaken. I have a routine that unlocks/locks all the VPs in whatever paperspace I'm currently in, not for every paperspace. I could globally unlock them (along with the paperspace "viewports") by that LISP routine I've linked to, but - critically - I can't change the scales of the modelspace VPs without changing the paperspace "viewports" using that method.

 

So, I'm back to wishing that I had a routine that would change all the (modelspace) viewport scales in a dwt. As suggested, I could hire someone to write this code. Does anyone want to do it? What do you think it'd cost? 

0 Likes
Message 5 of 10

cadffm
Consultant
Consultant
Accepted solution

If you really na not filter the user defined viewports by layer (FILTER viewport & layer), apply to ALL,

then see again the first answer#2 above,

try my ssget sample.

 

Sebastian

0 Likes
Message 6 of 10

jmartt
Collaborator
Collaborator

Ah. Thanks, @cadffm !

 

Three years ago, I couldn't figure out how to select everything in the drawing (not just the current paperspace) in order to use FILTER to get only the viewports. But now, using the (sssetfirst nil (ssget "x")) spell, and then filtering that, I was able to get only the modelspace viewports, leaving the paperspace "viewports" alone. I then globally unlocked all the VPs, changed their annotation scales, and locked them up again, leaving the annotation scale of each paperspace at 1:1.

 

This saved me a week!

0 Likes
Message 7 of 10

cadffm
Consultant
Consultant

>>"Three years ago, I couldn't figure out how to select everything in the drawing (not just the current paperspace) in order to use FILTER to get only the viewports."

Yes. Object selection ALL and in your case, Filterlist to Viewport and your Viewport Layer 

 

>>"But now, using the (sssetfirst nil (ssget "x")) spell, "

1. Why?

2. This is not what i offered today and three years ago

3. This select ALL objects in the drawing, incl . the paperspace system viewports (what you don't want)

 

>>"and then filtering that"

Sounds you couldn't find out how it works three years ago and also today - not.

 

I wrote "object-selection ALL"

ALL is one of the standard object selection methods, but Filter command is very special,

because it allows to select objects independent of there space by using object selection method ALL.

Read the [F1] Help about AutoCAD object selection methods <HERE!>

 

instructions FILTER

Start FILTER

create al filter for VIEWPORT and LAYER= <your layername, or for Layer ~0

system viewports should be on Layer 0, so ~0 should select all other viewports>

 

now [Apply]

and as object selection, type in:

ALL<enter>

close object-selection by another <enter>, <space>, or right-click

well done

Or?

 

instructions SSGET

See above what i offered and try MY lisp statement:

Command: (sssetfirst nil (ssget "_X" '((0 . "VIEWPORT")(-4 . ">")(69 . 1))))

 

difference between filter and ssget method:

FILTER works also in LT

SSGET (with the right filter list and object selection method) is the best,

because system-viewports can have another layer than 0, also the same as you viewport layer

and this is why Filter is not 100% bullet proof.

 

Have a nice day 🙂

Sebastian

0 Likes
Message 8 of 10

cadffm
Consultant
Consultant

ah

and another more offtopic thing, if you never read it before:

go into a Layout, start command move  for example, then use the object selection method ALL<enter><enter>

and read what Acad is telling [F2].

As you can see, it talks official about a paperspace viewport, how may objects on thawed layers are in the file,

how man in the current space.

Sebastian

0 Likes
Message 9 of 10

jmartt
Collaborator
Collaborator

I dunno. Can't follow you. I guess you're just a lot smarter than me. Thanks again for your help.

0 Likes
Message 10 of 10

cadffm
Consultant
Consultant

no no no 🙂

 

Start with instructions ssget

you are able to copy&paste it, i am sure 😉

 

Sebastian

0 Likes