.NET

Reply
Valued Contributor
NKCAUTOCAD01
Posts: 86
Registered: ‎08-31-2011
Message 1 of 5 (292 Views)

einvalidinput : SetPlotConfigurationName

292 Views, 4 Replies
10-31-2013 01:39 AM
Thank you.
A command aborts it in eInvalidInput when I set device name in GetPlotDeviceList() of PlotSettingsValidator in SetPlotConfigurationName.
Please teach a cause or measures.
Thanking you in advance.
Valued Contributor
andred
Posts: 82
Registered: ‎10-17-2003
Message 2 of 5 (270 Views)

Re: einvalidinput : SetPlotConfigurationName

10-31-2013 08:55 AM in reply to: NKCAUTOCAD01

Hello,

 

Do you have a sample code? You can't set plot device name using GetPlotDeviceList, you have to use SetPlotConfigurationName method from the plot validator like that:

 

acPlSetVdr.SetPlotConfigurationName(acPlSet, PlotSettingsToUse.PlotConfigurationName, strCanonicalMediaName)

 

where acPlSet is the plotsettings object copy from the PlotSettingsToUse object.

 

Before you have to be sure that the plotconfigurationname exist and the CanonicalMediaName too.

 

Regards,

 

André

 

 

 

 

Valued Mentor
gasty1001
Posts: 443
Registered: ‎04-11-2010
Message 3 of 5 (268 Views)

Re: einvalidinput : SetPlotConfigurationName

10-31-2013 09:18 AM in reply to: NKCAUTOCAD01

Hi,

 

Plotting is a complex task, many things can go wrong: paper size, plotting device, pc hardware, etc, add a very poor documentation and you got the figure. I would try first with the examples in the Kean's blog, like this:Plot a Window , for example check out the comment on the window definition and the order to code it. Show your code, platform, etc. as it's very hard to guess what can be wrong.

 

Gaston Nunez

Valued Contributor
NKCAUTOCAD01
Posts: 86
Registered: ‎08-31-2011
Message 4 of 5 (242 Views)

Re: einvalidinput : SetPlotConfigurationName

11-01-2013 01:45 AM in reply to: gasty1001
Thank you.
I am sorry with lack of information to ask you a question.

    ' Changes the plot settings for a layout directly
    Public Sub ChangeLayoutPlotSettings()
        ' Get the current document and database, and start a transaction
        Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument
        Dim acCurDb As Database = acDoc.Database

        Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()
            ' Reference the Layout Manager
            Dim acLayoutMgr As LayoutManager = LayoutManager.Current

            ' Get the current layout and output its name in the Command Line window
            Dim acLayout As Layout = _
                acTrans.GetObject(acLayoutMgr.GetLayoutId(acLayoutMgr.CurrentLayout), OpenMode.ForRead)

            ' Output the name of the current layout and its device
            acDoc.Editor.WriteMessage(vbLf & "Current layout: " & acLayout.LayoutName)

            acDoc.Editor.WriteMessage(vbLf & "Current device name: " & acLayout.PlotConfigurationName)

            ' Get a copy of the PlotSettings from the layout
            Using acPlSet As PlotSettings = New PlotSettings(acLayout.ModelType)
                acPlSet.CopyFrom(acLayout)

                ' Update the PlotConfigurationName property of the PlotSettings object
                Dim acPlSetVdr As PlotSettingsValidator = PlotSettingsValidator.Current
                acPlSetVdr.SetPlotConfigurationName(acPlSet, "DWG To PDF.pc3", "ANSI_B_(11.00_x_17.00_Inches)")

                acPlSetVdr.SetPlotConfigurationName(acPlSet, "DocuPrint 3100", "A3 (297x420mm)")

                ' Zoom to show the whole paper
                acPlSetVdr.SetZoomToPaperOnUpdate(acPlSet, True)

                ' Update the layout
                acLayout.UpgradeOpen()
                acLayout.CopyFrom(acPlSet)
            End Using

            ' Output the name of the new device assigned to the layout
            acDoc.Editor.WriteMessage(vbLf & "New device name: " & acLayout.PlotConfigurationName)

            ' Save the new objects to the database
            acTrans.Commit()
        End Using

        ' Update the display
        acDoc.Editor.Regen()
    End Sub

 

acPlSetVdr.SetPlotConfigurationName(acPlSet, "DWG To PDF.pc3", "ANSI_B_(11.00_x_17.00_Inches) ")
Then I do not have any problem,
Of print environment using in us
acPlSetVdr.SetPlotConfigurationName(acPlSet, "DocuPrint 3100 ", "A3 (297x420mm) ")
When I carry out
By einvalidinput error, a command is terminated abnormally.

When I carry this out,
Current device name: DocuPrint 3100 
Because I appear, must be a Device name.

Please teach a cause, measures.
Thanking you in advance.

Contributor
zrobert
Posts: 18
Registered: ‎08-28-2009
Message 5 of 5 (215 Views)

Re: einvalidinput : SetPlotConfigurationName

11-04-2013 02:34 AM in reply to: NKCAUTOCAD01

Hi;

 

Please run this Kean's code, and you will see correct plot device names and cannonical media names of your system.

Maybe you mistyped some of this two names in your code.

 

http://through-the-interface.typepad.com/through_the_interface/2007/10/allowing-select.html

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community