LayerStateManager & Map2004

Discussion in 'AutoCAD' started by TheMadMapper, Oct 12, 2004.

  1. TheMadMapper

    TheMadMapper Guest

    This code works great in Map2000i but not in 2004.

    The GetInterfaceObject("AutoCAD.AcadLayerStateManager") I'm sure is the problem.

    I've tried ("AutocadMAP.Application.2") & ("AutocadMAP.AcadLayerStateManager.2")
    but they are incorrect.

    Sub test()
    Dim layerState As AcadLayerStateManager
    Set layerState = AcadApplication.GetInterfaceObject("AutoCAD.AcadLayerStateManager")
    Call layerState.SetDatabase(ThisDrawing.Database)
    layerState.Save "Temp", acLsAll
    End Sub

    Thanks
     
    TheMadMapper, Oct 12, 2004
    #1
  2. Does the help file not tell you? This is from 2005 Help File:
    Dim oLSM As AcadLayerStateManager
    Set oLSM = ThisDrawing.Application.GetInterfaceObject("AutoCAD.AcadLayerStateManager.16")

    So I would make the assumption it is:
    Dim oLSM As AcadLayerStateManager
    Set oLSM = ThisDrawing.Application.GetInterfaceObject("AutoCAD.AcadLayerStateManager.15")

    Or maybe:
    Dim oLSM As AcadLayerStateManager
    Set oLSM = ThisDrawing.Application.GetInterfaceObject("AutoCAD.AcadLayerStateManager.2")

    Regards - Nathan
     
    Nathan Taylor, Oct 13, 2004
    #2
  3. TheMadMapper

    TheMadMapper Guest

    Thanks

    AutoCAD.AcadLayerStateManager.16 did the trick......
     
    TheMadMapper, Oct 13, 2004
    #3
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.