.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to translate this VBA code to c#

1 REPLY 1
Reply
Message 1 of 2
Anonymous
455 Views, 1 Reply

How to translate this VBA code to c#

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!
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost