+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Forum Newbie
    Using
    AutoCAD 2014
    Join Date
    Apr 2016
    Posts
    3

    Default Errror Message :invalid input while assigning CanonicalMediaName

    Registered forum members do not see this ad.

    Hi i am getting invalid input error message while assigning CanonicalMediaName=ANSI_E_(44.00_x_34.00_Inches)
    please help on that



    Please see the below VB.Net Code

    Dim rasterObj As Autodesk.AutoCAD.Interop.Common.IAcadEntity
    Dim Layout As Autodesk.AutoCAD.Interop.Common.AcadLayout
    Dim l_SheetCount As Integer
    Dim NewFile, codespot As String
    Dim i As Integer
    Dim resume2 As Boolean = True
    Try
    codespot = "SAP 1"
    NewFile = "monochrome.ctb"
    l_SheetCount = CInt(clsVariable.DrawingSheet)
    codespot = "SAP 2"
    Layout = Acad.ActiveDocument.ModelSpace.Layout
    codespot = "SAP 3"
    rasterObj = Layout.Block.Item(l_SheetCount - 1)
    If Not (Layout.CanonicalMediaName = "ANSI_E_(44.00_x_34.00_Inches)") Then
    Layout.CanonicalMediaName = "ANSI_E_(44.00_x_34.00_Inches)"
    End If
    Layout.PlotRotation = Autodesk.AutoCAD.Interop.Common.AcPlotRotation.ac0 degrees
    codespot = "SAP 5"
    If Not (Layout.StyleSheet = NewFile) Then
    Layout.StyleSheet = NewFile
    If Not (Layout.StyleSheet = NewFile) Then ''if the style sheet can't be set, use none
    Layout.StyleSheet = ""
    End If
    End If

    codespot = "SAP 6"
    Layout.PaperUnits = Autodesk.AutoCAD.Interop.Common.AcPlotPaperUnits.a cInches
    codespot = "SAP 7"
    Layout.StandardScale = Autodesk.AutoCAD.Interop.Common.AcPlotScale.acScal eToFit
    codespot = "SAP 8"
    i = 0
    'Layout = Acad.ActiveDocument.Layers.Add("Junk") 'commented prasad
    Acad.ActiveDocument.Layers.Add("Junk")
    'Set the layer named "Junk" the active layer for the current document
    Acad.ActiveDocument.ActiveLayer = Acad.ActiveDocument.Layers.Item("Junk")

    Acad.ActiveDocument.ActiveLayout.PlotType = Autodesk.AutoCAD.Interop.Common.AcPlotType.acExten ts
    Acad.ActiveDocument.ModelSpace.Layout.ConfigName = "HybridConverter.pc3" --Getting Error in this line
    ''Acad.ActiveDocument.Regen acActiveViewport
    Acad.ActiveDocument.ModelSpace.Layout.RefreshPlotD eviceInfo()

    Acad.ActiveDocument.ActiveLayer = Acad.ActiveDocument.Layers.Item("0")
    Layout = Acad.ActiveDocument.Layers.Item("Junk")
    Layout.Delete()

    codespot = "SAP 9"
    Application.DoEvents()
    Acad.Update()
    Application.DoEvents()

  2. #2
    Super Moderator SLW210's Avatar
    Computer Details
    SLW210's Computer Details
    Operating System:
    Windows 7 PRO 64-bit
    Computer:
    IBM Lenovo
    Motherboard:
    ACPI x64
    CPU:
    Pentium(R) i5 4570 @ 3.2GHz
    RAM:
    8 GB RAM
    Graphics:
    Nvidia Quadro 600 1GB
    Primary Storage:
    300 GB
    Secondary Storage:
    650GB
    Monitor:
    2x ThinkVision 24"
    Discipline
    Multi-disciplinary
    SLW210's Discipline Details
    Occupation
    Design Draftsman
    Discipline
    Multi-disciplinary
    Details
    Mostly do drafting related to manufacturing. From doing site layouts with proposed updates, additions and renovations to be budgeted and submitted for bid, to updating and changing existing drawings to reflect maintenance and repair/revision work done on site.
    Using
    AutoCAD 2011
    Join Date
    May 2007
    Location
    South Florida, USA
    Posts
    11,733

    Default

    Registered forum members do not see this ad.

    Please read the Code Posting Guidelines and place your Code in Code Tags.
    “A narrow mind and a fat head invariably come on the same person” Zig Zigler



Similar Threads

  1. Error message of Invalid Characters in File Name (AutoCAD LT2007)
    By Bud McK in forum AutoCAD Bugs, Error Messages & Quirks
    Replies: 3
    Last Post: 4th Oct 2013, 05:47 pm
  2. Invalid or incomplete DXF input Error message
    By gbuckley in forum AutoCAD General
    Replies: 2
    Last Post: 11th Jun 2013, 04:02 pm
  3. invalid file error message
    By aslan_thr in forum AutoCAD Bugs, Error Messages & Quirks
    Replies: 6
    Last Post: 15th Feb 2013, 01:57 pm
  4. Invalid URI Error Message
    By CJJ in forum AutoCAD Bugs, Error Messages & Quirks
    Replies: 26
    Last Post: 2nd Mar 2012, 03:07 pm
  5. invalid load message from design centre
    By michaeloureiro in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 21st Jan 2009, 04:52 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts