.NET

Reply
Active Member
8 Posts
0 Kudos
Registered: ‎05-26-2006
Post 1 of 2

How to translate this VBA code to c#

158 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
60 Posts
1 Kudo
Registered: ‎06-08-2006
Post 2 of 2

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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!