.NET

Reply
Active Member
chowcool
Posts: 8
Registered: ‎05-26-2006
Message 1 of 2 (110 Views)

How to translate this VBA code to c#

110 Views, 1 Replies
06-03-2006 01:07 AM
i using c# activex
but this parameter "Object LayoutList" i can't using,
who can Help me
plot.SetLayoutsToPlot(Object layoutList)
?

Sub Ch9_PrintPaperSpace() ' 建立输出用的图纸空间布局
Dim strLayouts(0 To 1) As String
Dim varLayouts As Variant
strLayouts(0) = "Layout1"
strLayouts(1) = "Layout2"
varLayouts = strLayouts
ThisDrawing.Plot.SetLayoutsToPlot varLayouts
' 设置打印份数为1
ThisDrawing.Plot.NumberOfCopies = 1
' 开始打印
ThisDrawing.Plot.PlotToDevice
End Sub
i find this VBA codes,but i can't translate it to c#
please explain...
thans very much!
Valued Contributor
smcclure
Posts: 60
Registered: ‎06-08-2006
Message 2 of 2 (110 Views)

Re: How to translate this VBA code to c#

06-08-2006 09:44 AM in reply to: chowcool
Plotting using the .NET ObjectARX wrappers is a bit different. The basic method you need to use is to create a PlotInfo object (which will contain your layouts to plot), validate the PlotInfo object, and then go through the plotting procedure by calling the appropriate methods in PlotEngine. The number of copies, for example, is set in the BeginDocument method I believe. For additional help, refer to the ObjectARX developers guide documentation under "Plot API".

Hope this helps,
- Scott
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 or visit the Installation and Licensing Forum to get help installing your software.