Save As DWF for Multi-Sheet IDW

Save As DWF for Multi-Sheet IDW

Anonymous
Not applicable
334 Views
5 Replies
Message 1 of 6

Save As DWF for Multi-Sheet IDW

Anonymous
Not applicable
I downloaded the code below from Kent's KWIK MCAD iCode Page
It works perfectly for a single sheet IDW
If I use it on a Multi-Sheet IDW it only creates the 1st Sheet in the DWF...
What I want is for a Multi-Sheet DWF to be created, I Know Inventor 7 can do
it...

Thanks

Yoni Rogel

**************************
the iCode fron Kent's:

Option Explicit

Public Sub SaveAsDwf()

ThisApplication.SilentOperation = True

Dim oDoc As DrawingDocument

Dim oSheet As Inventor.Sheet
Dim oDataIO As DataIO

Set oDoc = ThisApplication.ActiveDocument

Set oSheet = oDoc.Sheets(1)

Dim fname As String
fname = oDoc.FullFileName
fname = Left(fname, Len(fname) - 3) & "dwf"


If UpdateDrawing(oDoc) = True Then

Set oDataIO = oDoc.Sheets(1).DataIO
Call oDataIO.WriteDataToFile("DWF", fname)

End If
ThisApplication.SilentOperation = False

End Sub
0 Likes
335 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Making it iterate through the sheets would be easy enough, but I am not sure how to cause
it to all be exported to one DWF. Also be aware I have had a number of people say that
when they run this on one file it works OK, but if they batch run it the fonts get messed
up. I submitted it to Autodesk, but it got passed from one group to the other and I have
never heard back anything on it.

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program


"Yoni Rogel" wrote in message
news:03EEA8F2E4AA0B17AC6B1FC34C478105@in.WebX.maYIadrTaRb...
> I downloaded the code below from Kent's KWIK MCAD iCode Page
> It works perfectly for a single sheet IDW
0 Likes
Message 3 of 6

Anonymous
Not applicable
It might be that this is only supported in R7. I am getting multiple
sheet DWF's from IV7 Pro. I don't have IV7 installed. Might be worth
checking if there are DWF export updates for other versions. Another
possibility (which I am starting to look into) is to use the DWF toolkit
and try merging them but I can't seem to find my VC++ CD's to install
the missing Unicode support so it could be a while before I get to play
with it.

Kent Keller wrote:

>Making it iterate through the sheets would be easy enough, but I am not sure how to cause
>it to all be exported to one DWF. Also be aware I have had a number of people say that
>when they run this on one file it works OK, but if they batch run it the fonts get messed
>up. I submitted it to Autodesk, but it got passed from one group to the other and I have
>never heard back anything on it.
>
>--
>Kent
>Assistant Moderator
>Autodesk Discussion Forum Moderator Program
>
>
>"Yoni Rogel" wrote in message
>news:03EEA8F2E4AA0B17AC6B1FC34C478105@in.WebX.maYIadrTaRb...
>
>
>>I downloaded the code below from Kent's KWIK MCAD iCode Page
>>It works perfectly for a single sheet IDW
>>
>>
>
>
>
>
0 Likes
Message 4 of 6

Anonymous
Not applicable
multi sheet dwf was added in r7

-kevin

"Yoni Rogel" wrote in message
news:03EEA8F2E4AA0B17AC6B1FC34C478105@in.WebX.maYIadrTaRb...
> I downloaded the code below from Kent's KWIK MCAD iCode Page
> It works perfectly for a single sheet IDW
> If I use it on a Multi-Sheet IDW it only creates the 1st Sheet in the
DWF...
> What I want is for a Multi-Sheet DWF to be created, I Know Inventor 7 can
do
> it...
>
> Thanks
>
> Yoni Rogel
>
> **************************
> the iCode fron Kent's:
>
> Option Explicit
>
> Public Sub SaveAsDwf()
>
> ThisApplication.SilentOperation = True
>
> Dim oDoc As DrawingDocument
>
> Dim oSheet As Inventor.Sheet
> Dim oDataIO As DataIO
>
> Set oDoc = ThisApplication.ActiveDocument
>
> Set oSheet = oDoc.Sheets(1)
>
> Dim fname As String
> fname = oDoc.FullFileName
> fname = Left(fname, Len(fname) - 3) & "dwf"
>
>
> If UpdateDrawing(oDoc) = True Then
>
> Set oDataIO = oDoc.Sheets(1).DataIO
> Call oDataIO.WriteDataToFile("DWF", fname)
>
> End If
> ThisApplication.SilentOperation = False
>
> End Sub
>
>
0 Likes
Message 5 of 6

Anonymous
Not applicable
Are you saying the ability was added to the API or just manually through
the SaveCopyAs dialog?

--
Kent Keller
http://www.MyMcad.com/KWiK/Mcad.htm

Assistant Moderator
Autodesk Discussion Forum Moderator Program

"Kevin Schneider (Autodesk, Inc.)" wrote
in message news:2967C5F9800B9CAB236DAC7C6454ADCC@in.WebX.maYIadrTaRb...
> multi sheet dwf was added in r7
>
> -kevin
>
> "Yoni Rogel" wrote in message
> news:03EEA8F2E4AA0B17AC6B1FC34C478105@in.WebX.maYIadrTaRb...
> > I downloaded the code below from Kent's KWIK MCAD iCode Page
> > It works perfectly for a single sheet IDW
> > If I use it on a Multi-Sheet IDW it only creates the 1st Sheet in
the
> DWF...
> > What I want is for a Multi-Sheet DWF to be created, I Know Inventor
7 can
> do
> > it...
> >
> > Thanks
> >
> > Yoni Rogel
> >
> > **************************
> > the iCode fron Kent's:
> >
> > Option Explicit
> >
> > Public Sub SaveAsDwf()
> >
> > ThisApplication.SilentOperation = True
> >
> > Dim oDoc As DrawingDocument
> >
> > Dim oSheet As Inventor.Sheet
> > Dim oDataIO As DataIO
> >
> > Set oDoc = ThisApplication.ActiveDocument
> >
> > Set oSheet = oDoc.Sheets(1)
> >
> > Dim fname As String
> > fname = oDoc.FullFileName
> > fname = Left(fname, Len(fname) - 3) & "dwf"
> >
> >
> > If UpdateDrawing(oDoc) = True Then
> >
> > Set oDataIO = oDoc.Sheets(1).DataIO
> > Call oDataIO.WriteDataToFile("DWF", fname)
> >
> > End If
> > ThisApplication.SilentOperation = False
> >
> > End Sub
> >
> >
>
>
0 Likes
Message 6 of 6

Anonymous
Not applicable
I happens automatically via "Save Copy As" ala:
oCmdMgr.PostPrivateEvent kFileNameEvent, sDWFFilename
oCmdMgr.StartCommand kFileSaveCopyAsCommand


Kent Keller wrote:

>Are you saying the ability was added to the API or just manually through
>the SaveCopyAs dialog?
>
>
>
0 Likes