.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Plot Style Validator --- InvalidInp ut
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
287 Views, 0 Replies
06-24-2005 03:07 PM
Here is my code
:::::::::::::::::
Try
oNewPlotSetting.PlotSettingsName = "AutoCAD PostScript File Writer.pc3"
With oPlotSettingsValidator
.SetStdScale(oNewPlotSetting, 1)
.SetUseStandardScale(oNewPlotSetting, True)
.SetStdScaleType(oNewPlotSetting, StdScaleType.StdScale1To1)
.SetPlotRotation(oNewPlotSetting, PlotRotation.Degrees000)
.SetPlotPaperUnits(oNewPlotSetting, PlotPaperUnit.Inches)
Dim oWindow As New Autodesk.AutoCAD.DatabaseServices.Extents2d(0, 0, 34, 22)
.SetPlotType(oNewPlotSetting, Autodesk.AutoCAD.DatabaseServices.PlotType.Window)
oWindow = Nothing
.SetPlotWindowArea(oNewPlotSetting, oWindow)
.SetPlotOrigin(oNewPlotSetting, ac2dOriginPoint)
.SetPlotCentered(oNewPlotSetting, True)
.SetPlotOrigin(oNewPlotSetting, ac2dOriginPoint)
.SetZoomToPaperOnUpdate(oNewPlotSetting, True)
.SetCanonicalMediaName(oNewPlotSetting, MyBase.CananicalPaperSize)
.SetCurrentStyleSheet(oNewPlotSetting, "monochrome.ctb")
End With
Catch ex As Exception
End TryIf my_Layout.LayoutName <> "Model" Then
Dim oNewPlotSetting As New PlotSettings(False) ' False Paperspace, True ModelSpace
Try
'oNewPlotSetting.PlotSettingsName = PDFDeviceName ' looking for .pc3 file name
oNewPlotSetting.PlotSettingsName = "AutoCAD PostScript File Writer.pc3"
'oNewPlotSetting.PlotSettingsName = "Test this"
oNewPlotSetting.AddToPlotSettingsDictionary(oAcadD B)
With oPlotSettingsValidator
'.SetPlotConfigurationName(oNewPlotSetting, PDFDeviceName, MyBase.FormatSize)
.SetStdScale(oNewPlotSetting, 1)
.SetUseStandardScale(oNewPlotSetting, True)
.SetStdScaleType(oNewPlotSetting, StdScaleType.StdScale1To1)
.SetPlotRotation(oNewPlotSetting, PlotRotation.Degrees000)
.SetPlotPaperUnits(oNewPlotSetting, PlotPaperUnit.Inches)
'Dim oWindow As New Autodesk.AutoCAD.DatabaseServices.Extents2d(ac2dOr iginPoint.X, ac2dOriginPoint.Y, ac2dURPoint.X, ac2dURPoint.Y)
Dim oWindow As New Autodesk.AutoCAD.DatabaseServices.Extents2d(0, 0, 34, 22)
.SetPlotType(oNewPlotSetting, Autodesk.AutoCAD.DatabaseServices.PlotType.Window)
oWindow = Nothing
.SetPlotWindowArea(oNewPlotSetting, oWindow)
.SetPlotOrigin(oNewPlotSetting, ac2dOriginPoint)
.SetPlotCentered(oNewPlotSetting, True)
.SetPlotOrigin(oNewPlotSetting, ac2dOriginPoint)
.SetZoomToPaperOnUpdate(oNewPlotSetting, True)
.SetCanonicalMediaName(oNewPlotSetting, MyBase.CananicalPaperSize)
.SetCurrentStyleSheet(oNewPlotSetting, "monochrome.ctb")
End With
Catch ex As Exception
End Try
:::::::::::
The "SetPlotType" line will work with "Layout" but it will not work with "Window"
The COM interface will not let you set the type to window without the window being defined. I have tried it both ways.
Am I running into a bug?
Also,
:::::::::::::::::
Try
oNewPlotSetting.PlotSettingsName = "AutoCAD PostScript File Writer.pc3"
With oPlotSettingsValidator
.SetStdScale(oNewPlotSetting, 1)
.SetUseStandardScale(oNewPlotSetting, True)
.SetStdScaleType(oNewPlotSetting, StdScaleType.StdScale1To1)
.SetPlotRotation(oNewPlotSetting, PlotRotation.Degrees000)
.SetPlotPaperUnits(oNewPlotSetting, PlotPaperUnit.Inches)
Dim oWindow As New Autodesk.AutoCAD.DatabaseServices.Extents2d(0, 0, 34, 22)
.SetPlotType(oNewPlotSetting, Autodesk.AutoCAD.DatabaseServices.PlotType.Window)
oWindow = Nothing
.SetPlotWindowArea(oNewPlotSetting, oWindow)
.SetPlotOrigin(oNewPlotSetting, ac2dOriginPoint)
.SetPlotCentered(oNewPlotSetting, True)
.SetPlotOrigin(oNewPlotSetting, ac2dOriginPoint)
.SetZoomToPaperOnUpdate(oNewPlotSetting, True)
.SetCanonicalMediaName(oNewPlotSetting, MyBase.CananicalPaperSize)
.SetCurrentStyleSheet(oNewPlotSetting, "monochrome.ctb")
End With
Catch ex As Exception
End TryIf my_Layout.LayoutName <> "Model" Then
Dim oNewPlotSetting As New PlotSettings(False) ' False Paperspace, True ModelSpace
Try
'oNewPlotSetting.PlotSettingsName = PDFDeviceName ' looking for .pc3 file name
oNewPlotSetting.PlotSettingsName = "AutoCAD PostScript File Writer.pc3"
'oNewPlotSetting.PlotSettingsName = "Test this"
oNewPlotSetting.AddToPlotSettingsDictionary(oAcadD
With oPlotSettingsValidator
'.SetPlotConfigurationName(oNewPlotSetting, PDFDeviceName, MyBase.FormatSize)
.SetStdScale(oNewPlotSetting, 1)
.SetUseStandardScale(oNewPlotSetting, True)
.SetStdScaleType(oNewPlotSetting, StdScaleType.StdScale1To1)
.SetPlotRotation(oNewPlotSetting, PlotRotation.Degrees000)
.SetPlotPaperUnits(oNewPlotSetting, PlotPaperUnit.Inches)
'Dim oWindow As New Autodesk.AutoCAD.DatabaseServices.Extents2d(ac2dOr
Dim oWindow As New Autodesk.AutoCAD.DatabaseServices.Extents2d(0, 0, 34, 22)
.SetPlotType(oNewPlotSetting, Autodesk.AutoCAD.DatabaseServices.PlotType.Window)
oWindow = Nothing
.SetPlotWindowArea(oNewPlotSetting, oWindow)
.SetPlotOrigin(oNewPlotSetting, ac2dOriginPoint)
.SetPlotCentered(oNewPlotSetting, True)
.SetPlotOrigin(oNewPlotSetting, ac2dOriginPoint)
.SetZoomToPaperOnUpdate(oNewPlotSetting, True)
.SetCanonicalMediaName(oNewPlotSetting, MyBase.CananicalPaperSize)
.SetCurrentStyleSheet(oNewPlotSetting, "monochrome.ctb")
End With
Catch ex As Exception
End Try
:::::::::::
The "SetPlotType" line will work with "Layout" but it will not work with "Window"
The COM interface will not let you set the type to window without the window being defined. I have tried it both ways.
Am I running into a bug?
Also,

