Trying to save the drawing as idw and not dwg

Trying to save the drawing as idw and not dwg

Anonymous
Not applicable
375 Views
1 Reply
Message 1 of 2

Trying to save the drawing as idw and not dwg

Anonymous
Not applicable

Hi,

 

I have the following code routine to save a drawing it saveas as a dwg without any issue but i cant save it as an idw file... when i do so i get a break when debugging. all textboxes point to valid locations and file names as said beore a dwg extention works fine but textbox 25 gives the file name and extention as being an ipt file, and i want an idw not a dwg

 

'CREATE IDW FILE
                    Dim oDrawDoc As DrawingDocument
                    oDrawDoc = invApp.Documents.Add(DocumentTypeEnum.kDrawingDocumentObject, invApp.FileManager.GetTemplateFile(DocumentTypeEnum.kDrawingDocumentObject))

                    Dim oSheet As Sheet
                    oSheet = oDrawDoc.ActiveSheet

                    ' Open the part to be inserted into the drawing.
                    oPartDoc = invApp.Documents.Open(TextBox22.Text & "\" & TextBox21.Text, False)

                    Dim oTG As TransientGeometry
                    oTG = invApp.TransientGeometry

                    ' Place the base front view.
                    Dim oFrontView As DrawingView
                oFrontView = oSheet.DrawingViews.AddBaseView(oPartDoc, oTG.CreatePoint2d(10, 20), 2, ViewOrientationTypeEnum.kFrontViewOrientation, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle)


                oDrawDoc.SaveAs(TextBox24.Text & "\" & TextBox25.Text, False)
                oDrawDoc.Close(True)
0 Likes
376 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Try this:

oDrawDoc.SaveAs(TextBox24.Text & "\" & TextBox25.Text & (".idw"), False)
0 Likes