Update and Rebuild

Update and Rebuild

Anonymous
Not applicable
302 Views
4 Replies
Message 1 of 5

Update and Rebuild

Anonymous
Not applicable
What is the Update and Rebuild properties for DrawingDocuments supposed to
do? Why does both of these lines throw a error?

Dim oDDoc As DrawingDocument
Set oDDoc = ThisApplication.ActiveDocument
oDDoc.Update
oDDoc.Rebuild


--
Kent Keller
Member of the Autodesk Discussion Forum Moderator Program

http://www.MyMcad.com/KWiK/Mcad.htm
0 Likes
303 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Kent,

I use this method (with no error) to update the model: ( the RaiseEvent is
there because its part of an Inventor Class Model I have built)..

Public Function UpdateModel() As Boolean

On Error (edited)

'Update the entire document
Set invDocument = invApp.ActiveDocument
invDocument.Update

'Update and Fit to window in one command
'invApp.ActiveView.Fit True

'Zoom All
With invApp.CommandManager
    .StartCommand kZoomAllCommand
    .StopActiveCommand
End With

'Raise Update event
RaiseEvent UpdateComplete

'Return success
UpdateModel = True

Exit Function

Hell:
    UpdateModel = False

End Function

--
Veign
www.veign.com
<> - Bigger, Better, Cleaner!
www.veign.com/download_application.html#Link200
Code Samples & Sample Projects
http://www.veign.com/information/application/info_app.html
NEW! - Quick Reference Guides
http://www.veign.com/company_store.html
0 Likes
Message 3 of 5

Anonymous
Not applicable
Thanks for the reply, but is this for a drawing document? I have no
problems with the methods for parts and assemblies, but with idw files I do.

Ps. I find your error routine interesting coding style, but probably not
really appropriate for the Autodesk Server.

--
Kent Keller
Member of the Autodesk Discussion Forum Moderator Program

http://www.MyMcad.com/KWiK/Mcad.htm

"MajicMrln" wrote in message
news:440F89392AEE0B2C8ADF7F9B825193A4@in.WebX.maYIadrTaRb...
> Kent,
>
> I use this method (with no error) to update the model: ( the RaiseEvent is
> there because its part of an Inventor Class Model I have built)..
0 Likes
Message 4 of 5

Anonymous
Not applicable
These two methods are on the Document object which means that all document
types inherit them. They are not currently supported on Drawing documents.

-Brian

"Kent Keller" wrote in message
news:7B6A31F812A5F96A2FF88CB41A363E40@in.WebX.maYIadrTaRb...
> Thanks for the reply, but is this for a drawing document? I have no
> problems with the methods for parts and assemblies, but with idw files I
do.
>
> Ps. I find your error routine interesting coding style, but probably not
> really appropriate for the Autodesk Server.
>
> --
> Kent Keller
> Member of the Autodesk Discussion Forum Moderator Program
>
> http://www.MyMcad.com/KWiK/Mcad.htm
>
> "MajicMrln" wrote in message
> news:440F89392AEE0B2C8ADF7F9B825193A4@in.WebX.maYIadrTaRb...
> > Kent,
> >
> > I use this method (with no error) to update the model: ( the RaiseEvent
is
> > there because its part of an Inventor Class Model I have built)..
>
>
0 Likes
Message 5 of 5

Anonymous
Not applicable
Thanks Brian... I didn't really think they fit in the Drawing Document
object... maybe a note in the help page for the DrawingDocument Object page
saying they aren't supported there would be helpful.
--
Kent Keller
Member of the Autodesk Discussion Forum Moderator Program

http://www.MyMcad.com/KWiK/Mcad.htm

"Brian Ekins (Autodesk)" wrote in message
news:FAF8365CE9B5A5F997B4C5FAE9AD60F3@in.WebX.maYIadrTaRb...
> These two methods are on the Document object which means that all document
> types inherit them. They are not currently supported on Drawing
documents.
>
> -Brian
0 Likes