VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 2
Anonymous
222 Views, 1 Reply

Publish Dwf

Is the Publish (drawings to dwf) in the Object Model? I can't find it
anywhere.

Thanks,

Terry Hickman
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Hello Terry



With AutoCAD (MAP) 2002 I Use the follwing as part of batch job processing vb.net program
to plot to dwf. I do not know if this can help you but here is wat I use.





Private Sub Plot2DWF_Normal()
Dim myplotfile As String
Dim myPlotConfig As AcadPlotConfiguration
Dim myLayouts As AcadLayouts
Dim myLayout As AcadLayout
myAcadDoc.SetVariable("LUPREC", 2)
myAcadDoc.SetVariable("MEASUREMENT", 1)
myplotfile = Me.strFileOut
myLayouts = myAcadDoc.Layouts()
myLayout = myLayouts.Item("Layout1")
myAcadDoc.ActiveLayout = myLayouts.Item("Layout1")
myPlotConfig = myAcadDoc.PlotConfigurations.Add("myDwfPlotconfig")
myAcadDoc.PaperSpace.Layout.RefreshPlotDeviceInfo()

With myPlotConfig
.PaperUnits = AcPlotPaperUnits.acMillimeters
.ConfigName = "DWF_ePlot_plot.pc3"
.CanonicalMediaName = "UserDefinedMetric (914.00 x 1230.00MM)"
.PlotType = AcPlotType.acLayout
.PlotHidden = False
.PlotViewportsFirst = True
.UseStandardScale = True
.StandardScale = AcPlotScale.ac1_1
.StyleSheet = "MapAsbuiltGrayColor.ctb"
End With
myAcadDoc.PaperSpace.Layout.RefreshPlotDeviceInfo()
myAcadDoc.ActiveLayout.CopyFrom(myPlotConfig)
myAcadDoc.PaperSpace.Layout.RefreshPlotDeviceInfo()
myAcadDoc.Regen(AcRegenType.acActiveViewport)
myAcadDoc.Plot.PlotToFile(myplotfile)
End Sub
<\pre>


I hope this can help you.



Luc

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

Post to forums  

Forma Design Contest


Autodesk Design & Make Report