acPreview

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

  1. Gilles

    Gilles Guest

    Hi all

    How to show a preview with vba giving the name and path of the drawing I
    want to reach...???

    I referenced the acpreview in vba, put it in my userform, but don't know how
    to refresh the view with the thumbnail....


    Thanks a lot in advance.

    Gilles
     
    Gilles, Apr 20, 2004
    #1
  2. Gilles

    Mark Propst Guest

    I'm going by memory which in my case is really bad
    I think it has a property you just set to the file name
    acPreview.Preview = sFilename
    but you'll have to look it up to be sure, sorry i don't have time right now
    to research it.
     
    Mark Propst, Apr 20, 2004
    #2
  3. Gilles

    Gilles Guest

    Thanks a lot Mark

    I get connection with the drawing but shows me "no drawing preview"...
    Looking for the solution


    Thanks again


    Gilles
     
    Gilles, Apr 20, 2004
    #3
  4. Gilles

    Gilles Guest

    I found this in a previous post, but don't know how to declare the
    frmImageView variable...???

    Sub View()
    frmImageView.AcPreview1.Preview = "x:\ELEC\Blocks\Bolt.dwg"
    frmImageView.Show
    End Sub


    Gilles
     
    Gilles, Apr 20, 2004
    #4
  5. Gilles

    Ed Jobe Guest

    The dwg may not have a preview saved with it. This will be the case if, 1)
    the dwg is pre-R14, 2) RASTERPREVIEW is set to 0, or 3) the dwg was saved
    with ObjectDbx.
     
    Ed Jobe, Apr 20, 2004
    #5
  6. Gilles

    Gilles Guest

    1 The DWG has a preview saved with it because I see it in the traditional
    window of Autocad (2004 version)
    2 RASTERPREVIEW is set to 1
    3 What is object Dbx???


    Thanks

    Gilles
     
    Gilles, Apr 20, 2004
    #6
  7. Gilles

    Ed Jobe Guest

    ObjectDbx is an api that allows you to edit a dwg without opening it in the
    acad graphics editor, iow, "in-the-background". Do a search of this ng for
    more info on how to use it and its limitations.
     
    Ed Jobe, Apr 20, 2004
    #7
  8. Gilles

    Ed Jobe Guest

    That not a variable, just what they named the control that was placed on
    their form. Did you place the control on your form?
    frmImageView is a variable pointing to the form, and AcPreview1 is the
    control's name. If the sub is in the forms class module (for example, in a
    button's OnClick event), you can just use AcPreview1.Preview or
    Me.AcPreview1.Preview.
     
    Ed Jobe, Apr 20, 2004
    #8
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.