Author Topic: Automatic Scale to Viewport Command  (Read 4731 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2606
  • I can't remeber what I already asked! I need help!
Automatic Scale to Viewport Command
« on: April 06, 2006, 07:58:38 AM »
Is there a lisp or command which automates a MView to a scale and the extents of an object?

basically it creates an mview, and then does a zoom extents, then scales it accordingly in the view.


thanks
Civil3D 2020

hendie

  • Guest
Re: Automatic Scale to Viewport Command
« Reply #1 on: April 06, 2006, 08:07:20 AM »
there is a viewports toolbar which has a scale dropdown on it

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Automatic Scale to Viewport Command
« Reply #2 on: April 06, 2006, 11:56:31 PM »
I have wrote a program...called Quickview...
aloow user to create standard Mview with diffrent scale..

this program allow also :

-Automatic layer creating..
-(with all options, lock/unlock, on/Off etc...)
-Automatic costum color...
-Automatic scaling...
-allow user to use metric or imperial setting..
-Automatic Mview lock and/or unlock..
-Allow also to put a name for each scale..
-add and remove scale setting....
-create and Import Mview template...

And much much more....

there is a screenshot...
(dialog made with ObjectDCL)
you can also read the help file.....but its all in French...sorry french users here.
I'll translate this programe when have time... :?
« Last Edit: April 07, 2006, 12:00:28 AM by Andrea »
Keep smile...

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Automatic Scale to Viewport Command
« Reply #3 on: April 07, 2006, 12:07:46 AM »
Andrea, can you answer MSTGoo7's original question, rather than provide an EXE file <which I believe doesn't>  ?
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MSTG007

  • Gator
  • Posts: 2606
  • I can't remeber what I already asked! I need help!
Re: Automatic Scale to Viewport Command
« Reply #4 on: April 07, 2006, 07:44:39 AM »
Does it make sense what I am talking about? Would it help you guys?
Civil3D 2020

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Automatic Scale to Viewport Command
« Reply #5 on: April 07, 2006, 11:34:55 AM »
I have one that lets you pick the viewport boundry in model space, switches you to paper space, and then creates the viewport to view the same area that was picked, and scaled to what you entered.

Would that work for you?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Automatic Scale to Viewport Command
« Reply #6 on: April 07, 2006, 12:09:19 PM »
Andrea, can you answer MSTGoo7's original question, rather than provide an EXE file <which I believe doesn't>  ?

as told...
the lisp is French release for now...
and work only for our company..
please give me time to make some modification before sharing this tool..

for the moment...you can use something like..

Code: [Select]
(if (= (getvar "tilemode") 1)
  (alert "You can't make Vport in ModelSpace")
  (progn
    (command "._mview" pause pause)
    (command "._mspace" "_zoom" "1/100xp" "._pspace")
    ))

Keep smile...

RbtDanforth

  • Guest
Re: Automatic Scale to Viewport Command
« Reply #7 on: April 07, 2006, 12:36:23 PM »
Quote
Is there a lisp or command which automates a MView to a scale and the extents of an object?

As this is two things that are usually mutually exclusive autocad can do only one at a time. When you create an Mview it usually defaults to "extents".

If you kept a rectangle of specific size in modelspace (and defpoints layer)and you could make your drawing fit in that rectangle. You could then create a Mview of a specific scale of the Model rectangle, and the natural zoom extents would be just right.
 
Much easier would be to zoom left, or zoom center, and pick the propper point, and when it asked you for a scale just type 1/48xp (if the scale is 1/4"=1'-0") and it will scale properly you can then lock the viewport and it will stay that way.

If the arithmetic is too strenuous, the properties popout with the mview highlighted has all that stuff at the bottom including locking and unlocking.

Neither trick is strenuous enough to spend the effort at lisp

delium55

  • Guest
Re: Automatic Scale to Viewport Command
« Reply #8 on: April 07, 2006, 02:49:48 PM »
First, do your drawing im model space at scale 1=1 and when you transfert in paper space  erase the rectangle, insert your template and create the mwiew at the scale you want.
Do pan for place your drawing in the mview.
Lock the viewport.
Transfer the viewport in model space with the lisp joint or use viewport guide in swamp, see discution.

For my  metric viewport in paper space i use "échelle_ep"

That's my way.

François

delium55

  • Guest
Re: Automatic Scale to Viewport Command
« Reply #9 on: April 07, 2006, 02:58:19 PM »
The files  joints.

François

sinc

  • Guest
Re: Automatic Scale to Viewport Command
« Reply #10 on: April 07, 2006, 03:04:59 PM »
Is there a lisp or command which automates a MView to a scale and the extents of an object?

So is this something you're thinking of writing?

There is now an "object" option to the zoom command, added in 2006 I think.  Would your command be like that, except create the viewport too?

Or are you thinking of making a command that zooms to the first "standard" scale that's big enough to hold the object?  In other words, if a zoom to object extents gets you a viewport scaled to 1/28.5784, would your routine create a viewport set to 1/30?

delium55

  • Guest
Re: Automatic Scale to Viewport Command
« Reply #11 on: April 07, 2006, 03:33:47 PM »
That is a lisp program and the the VBA control the DCL .
If the scale you want is not in the standards, select "autre" (other in english) and write your scale  in the zone "valeur de l"échelle" (scale value).
When you create the mwiew with that, this scale the window at the scale you have choice.

Sorry for time to answer, i have some difficulty with my english, my french is better.

François.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Automatic Scale to Viewport Command
« Reply #12 on: April 07, 2006, 06:26:03 PM »
Sorry for time to answer, i have some difficulty with my english, my french is better.

I understand.. :-)
Keep smile...