Message 1 of 2
Trying to save the drawing as idw and not dwg

Not applicable
05-19-2016
04:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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)