Publish dwf multi-sheet

Publish dwf multi-sheet

Anonymous
Not applicable
306 Views
2 Replies
Message 1 of 3

Publish dwf multi-sheet

Anonymous
Not applicable
I have the necessity to create a dwf multi-sheet from my application.
Using the "-PUBLISH" command, i have need of a DSD file, but i don't have this file.
Someone say me, if an other method exists to make the dwf multi-sheet, or it is possible to save the files DSD from my application ?
0 Likes
307 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
I am not sure what you are trying to accomplish, but when using the
PUBLISH command you can select all drawings you want to plot and
select if you want single or multi page dwf files.

Then you have the option to save this publish setup to a .dsd file so
you can 'recall' it instantly without going trough the setup routine again.

Leo

wrote in message news:5054804@discussion.autodesk.com...
I have the necessity to create a dwf multi-sheet from my application.
Using the "-PUBLISH" command, i have need of a DSD file, but i don't have
this file.
Someone say me, if an other method exists to make the dwf multi-sheet, or it
is possible to save the files DSD from my application ?
0 Likes
Message 3 of 3

Anonymous
Not applicable
You'll need to translate the process from vb.net to whatever you are using.
The code below will generate the DSD given a collection of Layout objects
that are going to be processed.

Private m_dsdFile As String = String.Empty 'DSD file name including path

Private Function CreateDSDFile(ByVal cLOs As Collection) As Boolean
'+-- Generates the DSD file req'd to make a DWF package
'+-- given a passed collection of Layouts to process
Dim iCntr As Integer 'generic counter
Dim fi As New FileInfo(m_dsdFile)
Try
'check to see if DSD file exists and delete it if it does
If fi.Exists = True Then fi.Delete()
'create the new dsd file
Dim myFileStream As New System.IO.FileStream(m_dsdFile, _
System.IO.FileMode.OpenOrCreate, _
System.IO.FileAccess.Write, _
System.IO.FileShare.None)
Dim myWriter As New System.IO.StreamWriter(myFileStream)
Dim sTemp As String = vbNullString 'generic temp string
'write to the new DSD file
With myWriter
.WriteLine("[DWF6Version]")
.WriteLine("Ver = 1")
'iterate thru the layouts collection
For iCntr = 1 To cLOs.Count
'grab the current layout name
sTemp = cLOs.Item(iCntr)
.WriteLine("[DWF6Sheet:" & sTemp & "]")
.WriteLine("DWG=" & Chr(34) & m_dwgName & Chr(34))
.WriteLine("Layout = " & sTemp)
.WriteLine("Setup=")
Next
.WriteLine("[Target]")
.WriteLine("Type=1")
.WriteLine("DWF=" & Chr(34) & m_dwfFile & Chr(34))
.WriteLine("OUT=")
.WriteLine("PWD=")
'close writer
.Close()
End With
'close file stream
myFileStream.Close()
'clean up
If Not IsNothing(myWriter) Then myWriter = Nothing
If Not IsNothing(myFileStream) Then myFileStream = Nothing
'send back return value
Return True
Catch ex As Exception
'
If dwfAutoSave.m_Settings.Testing Then
System.Windows.Forms.MessageBox.Show(ex.Message & ":" & ex.StackTrace,
"AcadPlotting.CreateDSDFile")
End If
'send back return value
Return False
Finally
'clean up
If Not fi Is Nothing Then fi = Nothing
End Try
End Function

--
-- Mike
___________________________
Mike Tuersley
___________________________
the trick is to realize that there is no spoon...
0 Likes