01-31-2017
10:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
01-31-2017
10:30 PM
Hey, how about this:
Dim oDoc As Document = ThisApplication.ActiveDocument
If oDoc.DocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then Exit Sub
For Each oSheet As Sheet In oDoc.Sheets
If oSheet.DrawingViews.Count = 0 Then Continue For
For Each oView As DrawingView In oSheet.DrawingViews
Dim oModel As Document = oView.ReferencedDocumentDescriptor.ReferencedDocument
If oModel.DocumentSubType.DocumentSubTypeID <> "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then Continue For
Dim oOptions As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap
oOptions.Add("SheetMetalFoldedModel", False)
Dim oPoint As Point2D = oView.Position
Dim oViewStyle As DrawingViewStyleEnum = oView.ViewStyle
Dim oScale As Double = oView.Scale
Dim oOri As ViewOrientationTypeEnum = ViewOrientationTypeEnum.kDefaultViewOrientation
oSheet.DrawingViews.AddBaseView(oModel, oPoint, oScale, oOri, oViewStyle, , , oOptions)
oView.Delete()
Next
Next
Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods
- - - - - - - - - - - - - - -
Regards,
Mike
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods