screen pixel dimensions

Discussion in 'AutoCAD' started by blammo, Apr 20, 2004.

  1. blammo

    blammo Guest

    All,

    I think I recall some time back someone posting about this, a search
    didn't turn up anything though.

    Can the AutoCAD graphics screen size, in pixels, be captured somehow
    with AutoLISP?

    bobb
     
    blammo, Apr 20, 2004
    #1
  2. blammo

    blammo Guest

    Is screensize in Pixels?

    Oh dopey-me.

    bobb
     
    blammo, Apr 20, 2004
    #2
  3. blammo

    BillZ Guest

    (vlax-get-property (vlax-get-acad-object) 'height)

    (vlax-get-property (vlax-get-acad-object) 'width)


    Bill
     
    BillZ, Apr 20, 2004
    #3
  4. blammo

    mataeux Guest

    is that for mapping?
    are you using image objects?
     
    mataeux, Apr 20, 2004
    #4
  5. blammo

    blammo Guest

    Yes. Currently I have a pretiled set of images at different
    resolutions, but I'm moving everything over to a Dynamic image server,
    so the images will always be sized correctly for the screen.

    At some point I'll also write something to handle pulling images in for
    plotting resolution as well in an automatic fashion.

    bobb
     
    blammo, Apr 20, 2004
    #5
  6. blammo

    blammo Guest

    Will this work for Vports as well? Paperspace and ModelSpace?

    bobb
     
    blammo, Apr 20, 2004
    #6
  7. blammo

    BillZ Guest

    VIEWSIZE
    (Read-only)
    Type: Real
    Saved in: Drawing

    Stores the height of the current viewport in drawing units.

    Use this with viewctr to calculate what you need.

    Bill
     
    BillZ, Apr 20, 2004
    #7
  8. blammo

    blammo Guest

    These give a good approximation, but they also include the areas
    occupied by the Menus and toolbars, in otherwords the whole of the
    AutoCAD window occuping the windows desktop.

    bobb
     
    blammo, Apr 20, 2004
    #8
  9. blammo

    BillZ Guest

    What exactly are you trying to do?


    Bill
     
    BillZ, Apr 20, 2004
    #9
  10. blammo

    blammo Guest

    Pull an image from a Web server, like this:

    http://pwultra5.ci.stpaul.mn.us/cgi...75&map=../html/raster/rswcd_1985.map&mode=map

    at the appropriate screen resolution that will fill the graphics screen
    in AutoCAD.

    Later, I would also like to do the same for plotting where the Images
    would be higher resolution depending on the plot size desired.

    Like this:

    http://pwultra5.ci.stpaul.mn.us/cgi...50&map=../html/raster/rswcd_1985.map&mode=map

    Which is the same bounds as above but at a higher resolution

    In oder to fit the image to the screen at the correct resolution for
    viewing (on the monitor) I need the screen size, in pixels. Then I can
    assemble the Image returned that would fill the screen without worrying
    about interpolation happening. in other words I wouls always have the
    correct image reoslution no matter the Zoom level. At least to the
    limits that the Web server can serve them up in. Plotting for instance
    may require that many smaller images are imported for a large plot like
    an E-size for example.

    I have enough from this thread to accomplish it, I'll just import images
    slight larger than the AutoCad graphic screen is (Desktop window less
    the borders and menu items) and leave the extra pixels off screen.

    In the end, I want to build a modified Zoom command that will allow for
    these areial view to be left on/off with a toggle, so the user doesn't
    need to worry about importing them, they can just zoom/pan as they need to.

    bobb
     
    blammo, Apr 20, 2004
    #10
  11. blammo

    BillZ Guest

    Cool,

    (but way over my head)

    :)

    Bill
     
    BillZ, Apr 20, 2004
    #11
  12. blammo

    blammo Guest

    Alright, now what the heck does this do?

    hmmmmmm . . . .

    oh I see, you set a pixel to Ground units ratio and use that as a
    constant, cool, really cool actually.

    So why do you suppose this isn't in there to begin with? Sheesh.

    Thanks Luis!!

    That will work perfectly, although I think it still will have a little
    error in there with respect to Maximised vs not-maximised, right? I
    mean, the image will still fill the screen in both cases, but there will
    still be a bit of it off screen when the window is maximized.

    bobb
     
    blammo, Apr 20, 2004
    #12
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.