how to Attach A Raster

Discussion in 'AutoCAD' started by youngman, Oct 1, 2004.

  1. youngman

    youngman Guest

    hi,
    here is the sample from developer help,but it failed.
    the path is all ok,but fail to add one.
    why,
    thank you
    ---------------------------------------
    Sub Ch10_AttachingARaster()
    Dim insertionPoint(0 To 2) As Double
    Dim scalefactor As Double
    Dim rotationAngle As Double
    Dim imageName As String
    Dim rasterObj As AcadRasterImage
    imageName = "C:/Acad2000/sample/watch.jpg"
    insertionPoint(0) = 5
    insertionPoint(1) = 5
    insertionPoint(2) = 0
    scalefactor = 2
    rotationAngle = 0

    On Error GoTo ERRORHANDLER
    ' Attach the raster image in model space
    Set rasterObj = ThisDrawing.ModelSpace.AddRaster _
    (imageName, insertionPoint, _
    scalefactor, rotationAngle)
    ZoomAll
    Exit Sub
    ERRORHANDLER:
    MsgBox Err.Description
    End Sub
     
    youngman, Oct 1, 2004
    #1
  2. youngman

    R.K. McSwain Guest


    Works fine here.
     
    R.K. McSwain, Oct 1, 2004
    #2
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.