Message 1 of 6
Get model sketch in drawing view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
Is it possible to set the (get model sketch) off a part
I have a sample it show how to set the sketch visibility.
But it only working if the (get model sketch) is set
I am using INV 2008.
Private Sub SketchVisibility()
' Get the active drawing document
Dim oDrawing As DrawingDocument
Set oDrawing = ThisApplication.ActiveDocument
' Get the referenced part document
Dim oPart As PartDocument
Set oPart = oDrawing.ReferencedFiles.Item(1)
Dim oDef As PartComponentDefinition
Set oDef = oPart.ComponentDefinition
' Get the first sketch in the part
Dim oSketch As Sketch
Set oSketch = oDef.Sketches.Item(1)
' Make the sketch visible in drawing
Call oDrawing.ActiveSheet.DrawingViews(1).SetVisibility(oSketch, True)
End Sub
René J
Is it possible to set the (get model sketch) off a part
I have a sample it show how to set the sketch visibility.
But it only working if the (get model sketch) is set
I am using INV 2008.
Private Sub SketchVisibility()
' Get the active drawing document
Dim oDrawing As DrawingDocument
Set oDrawing = ThisApplication.ActiveDocument
' Get the referenced part document
Dim oPart As PartDocument
Set oPart = oDrawing.ReferencedFiles.Item(1)
Dim oDef As PartComponentDefinition
Set oDef = oPart.ComponentDefinition
' Get the first sketch in the part
Dim oSketch As Sketch
Set oSketch = oDef.Sketches.Item(1)
' Make the sketch visible in drawing
Call oDrawing.ActiveSheet.DrawingViews(1).SetVisibility(oSketch, True)
End Sub
René J