Help with raster dictionary

Discussion in 'AutoCAD' started by jhorn, Oct 27, 2004.

  1. jhorn

    jhorn Guest

    HI -

    I have been thrown into an AutoCAD project at the last minute. I have two questions.

    1) Does Autodesk provide any API documentation? I can not find it anywhere.

    2) Here is what I am working on. I need to get all the raster images attached to the drawing (JPEGS). Currently the app is looping through the paperSpace collection. This seems a bit much to loop through thousands of items to find two JPEGS. I see there is a dictionary of images but that holds rasterImageDef's. I can't seem to cast these references to rasterImage objects so I can get the image file name. Any help is much appreciated.
     
    jhorn, Oct 27, 2004
    #1
  2. 1) Does Autodesk provide any API documentation? I can not find it anywhere.
    If you did a full install, all of the documentation is available through
    the help file
    Use a filtered selectionset to grab them:

    Option Explicit

    Public Sub GetImages()
    Dim oSS As AcadSelectionSet
    Dim iGroup(0) As Integer
    Dim vGroup(0) As Variant
    iGroup(0) = 0
    vGroup(0) = "IMAGE"
    Set oSS = ThisDrawing.SelectionSets.Add("BlockInfo4")
    oSS.Select acSelectionSetAll, , , iGroup, vGroup
    If oSS.Count > 0 Then
    MsgBox oSS.Count
    End If
    oSS.Delete
    End Sub

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Oct 28, 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.