Detect Display Configuration.

Discussion in 'AutoCAD' started by Andrew Elmore, Jun 25, 2003.

  1. Can someone give an example of getting the current display
    configuration.(render,work,scetch, ect..)

    Thanks,
    Andy
     
    Andrew Elmore, Jun 25, 2003
    #1
  2. Care of John Janzen @ www.cadmin.com

    Function GetDisplayControlName() As String
    Dim dict As AcadDictionary
    If ThisDrawing.ActiveSpace = acPaperSpace Then
    GetDisplayControlName =
    GetDisplayConfigName(ThisDrawing.ActivePViewport)
    Else
    Set dict = ThisDrawing.Dictionaries("AEC_DISP_REP_CONFIGURATIONS")
    If Not (dict Is Nothing) Then GetDisplayControlName =
    GetDisplayConfigName(dict)
    End If
    End Function

    Private Function GetDisplayConfigName(Object As AcadObject) As String
    Dim xDat, xDty, vpt As String
    Object.GetXData "AECBASE", xDty, xDat
    If VarType(xDat) <> vbEmpty Then
    Dim obj As AcadObject
    Set obj = ThisDrawing.HandleToObject(xDat(2))
    GetDisplayConfigName = obj.Name
    End If
    End Function
     
    Bobby C. Jones, Jun 25, 2003
    #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.