<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
<title>Reg Monochrome</title>
<link>http://www.zwsoft.com/forum/viewthread.php?tid=2490</link>
<description>how to set monochrome in zwcad using vb.net

dim plot as zwcadplotconfiguration
plot.stylesheet=&quot;monochrome.ctb&quot;


but i con't able to load the monochrome settings through vb.net .Kindly help me</description>
<author>varadh6309</author>
<pubDate>2012-10-31 13:07:06</pubDate>
<item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2490&amp;pid=16279</link>
<description>hai,

thank u for your replay,

herewith i have attached the vb code and also the bmp file for your reference.

kindly give the solution for me.


----------------------------------------------------------------------------------------------------------
Auto cad coding example..



********************** Set the Driver Path in Autocad *************************

Acad2000.Application.Preferences.Files.DriversPath = &quot;\\APPSVR\AutoDraft\CAD_UTILS\DRV1&quot;

********************** Set the Printer Cofiguration path (PC3 Files)  *************************



==================================================================================================
Zwcad example coding ....

Public utility As ZwcadUtility 'AcadUtility
Public Acad As ZwcadApplication
Public cad As ZwcadDocument

*******************Connect Zwcad Application*******************


On Error Resume Next
    Set Acad = GetObject(, &quot;ZWcad.Application&quot;)
    
    If Err.Number = 0 Then
        CADOPEN = False
        Err.Clear
        Set Acad = CreateObject(&quot;ZWCAD.Application&quot;)
        
        If Err Then
            CADOPEN = False
            MsgBox Err.Description
            Exit Sub
        End If
    End If
    CADOPEN = True
    On Error GoTo 0
    Acad.Visible = True
    Acad.WindowState = zcMax 'acMax
    If Acad.Documents.Count = 0 Then Acad.Documents.Add

    Set cad = Acad.ActiveDocument
    Dim CadViewPort As ZwcadViewport
    Set CadViewPort = cad.ActiveViewport
    cpath = &quot;Z:\convert\BJ057-09-05-1-002.DWG&quot;
    Acad.Documents.Open cpath
    Set cad = Acad.ActiveDocument


**********************************PlotToFile*************************


    Dim currentPlot As ZwcadPlot
    Set currentPlot = Acad.ActiveDocument.Plot
    Dim plotconfig As ZwcadPlotConfiguration
    Dim plotconfigs As ZwcadPlotConfigurations
    Set plotconfig = Acad.ActiveDocument.PlotConfigurations.Add(&quot;text&quot;)

    plotconfig.ConfigName = &quot;ho-sof-002HP LaserJet 1022.pc5&quot;
    plotconfig.CanonicalMediaName = &quot;A4&quot;
    plotconfig.StyleSheet = &quot;Monochrome.ctb&quot;
    plotconfig.StandardScale = zc1_1
    
    Dim point1(0 To 1) As Double
    Dim point2(0 To 1) As Double
    
    point1(0) = 0: point1(1) = 0 ': point1(2) = 0
    point2(0) = 55019.06: point2(1) = 38860 ': point2(2) = 0
    
    plotconfig.SetWindowToPlot point1, point2
    

********************Read back window information****************

    plotconfig.GetWindowToPlot X1, X2
    
    MsgBox &quot;Press any key to plot the following window:&quot; &amp; vbCrLf &amp; vbCrLf &amp; _
           &quot;Lower Left: &quot; &amp; X1(0) &amp; &quot;, &quot; &amp; X1(1) &amp; vbCrLf &amp; _
           &quot;Upper Right: &quot; &amp; X2(0) &amp; &quot;, &quot; &amp; X2(1)
    
*****************Make sure the instruction is to plot a view, not some other plot style*************
    
    plotconfig.CenterPlot = True
    plotconfig.StandardScale = zcScaleToFit
    Acad.ActiveDocument.Regen zcActiveViewport
    Acad.ActiveDocument.SetVariable &quot;BACKGROUNDPLOT&quot;, 0
    Acad.ActiveDocument.SetVariable &quot;TRAYNOTIFY&quot;, 0
    plotconfig.PlotType = zcWindow
    
**********************Example_SetWindowToPlot********************************
    
    cad.ActiveLayout.CopyFrom plotconfig
    Acad.ActiveDocument.ActiveLayout.PlotRotation = zc90degrees
    cad.Application.ActiveDocument.Plot.DisplayPlotPreview zcFullPreview



====================================================================================================


Acad2000.Application.Preferences.Files.PrinterConfigPath = &quot;\\APPSVR\AutoDraft\CAD_UTILS\PC316-12-08&quot;

********************** Set the Style Sheet Path   *************************

Acad2000.Application.Preferences.Files.PrinterStyleSheetPath = &quot;\\APPSVR\AutoDraft\CAD_UTILS\Plotstyle&quot;

----------------------------------------------------------------------------------------------------------</description>
<author>varadh6309</author>
<pubDate>2012-11-14 17:01:07</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2490&amp;pid=16212</link>
<description>[b]Reply [url=http://www.zwsoft.com/forum/redirect.php?goto=findpost&amp;pid=16201&amp;ptid=2490]2#[/url] [i]pmf_zwcad[/i] [/b]


    thank u... i ill check it.</description>
<author>varadh6309</author>
<pubDate>2012-11-02 22:47:30</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2490&amp;pid=16201</link>
<description>Please refer to following code:

        Dim zwcad As Object
        Dim actdoc As Object
        zwcad = CreateObject(&quot;ZwCAD+.Application&quot;)
        zwcad.Visible = True
        actdoc = zwcad.ActiveDocument
        Dim styleSheetName As String
        actdoc.ActiveLayout.StyleSheet = &quot;monochrome.ctb&quot;
        styleSheetName = actdoc.ActiveLayout.StyleSheet
        MsgBox(&quot;The style sheet for the active layout is: &quot; &amp; styleSheetName)</description>
<author>pmf_zwcad</author>
<pubDate>2012-11-02 09:53:13</pubDate>
</item>  </channel>
</rss>