Previous Plot CanonicalMediaName

Discussion in 'AutoCAD' started by mnovendstern, Jul 1, 2004.

  1. mnovendstern

    mnovendstern Guest

    In 2004 and earlier versions, I was able to capture the CanonicalMediaName
    for the previous plot by capturing it in the AcadDocument_ObjectModified
    event by capturing the conical media name for the first instance of the
    iacadlayout object being modified. For some reason, this does NOT work in
    2005. The AcadDocument_ObjectModified event will not return the previos plot
    settings in AutoCAD 2005 unless the user has selected the save changes to
    layout option or apply to layout button and you can't rely on the user
    selecting this option.

    Any help is GREATLY appreciated!!!!


    Dim PaperWidthList(10000) As Double
    Dim PaperHeightList(10000) As Double
    Dim MediaNameList(10000) As String
    Dim plotDevicesList(10000) As String
    Dim i As Integer
    Sub AcadDocument_ObjectModified(ByVal Object As Object)
    On Error Resume Next
    If TypeName(Object) = "IAcadLayout" Then
    i = i + 1
    ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
    MediaNameList(i) = ThisDrawing.ActiveLayout.CanonicalMediaName
    plotDevicesList(i) = ThisDrawing.ActiveLayout.ConfigName
    ThisDrawing.ActiveLayout.GetPaperSize PaperWidthList(i), PaperHeightList(i)
    End If
    End Sub
     
    mnovendstern, Jul 1, 2004
    #1
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.