Jump to content

Error message while assign plotter value to configname property


Recommended Posts

Posted

Hi I am using Autocad 2014 API

 

while developing Autocad application i am getting some errors

while assign plotter value (HybridConverter.pc3)to comfigname getting invalid input error message .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.ac0degrees

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.acInches

codespot = "SAP 7"

Layout.StandardScale = Autodesk.AutoCAD.Interop.Common.AcPlotScale.acScaleToFit

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.acExtents

Acad.ActiveDocument.ModelSpace.Layout.ConfigName = "HybridConverter.pc3" --Getting Error in this line

''Acad.ActiveDocument.Regen acActiveViewport

Acad.ActiveDocument.ModelSpace.Layout.RefreshPlotDeviceInfo()

 

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()

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...