Anyone?
It seems as if the HighLightSet in IV12 will no longer support the curve segment in an exposed (visible) sketch on a drawing view or is it some type of bug or clitch? Is there a work around for this?
Public Sub HighLightSet()
Dim oDrawingDoc As Inventor.DrawingDocument
Set oDrawingDoc = ThisApplication.ActiveDocument
Dim oSheets As Inventor.Sheets
Set oSheets = oDrawingDoc.Sheets
Dim oSheet As Inventor.Sheet
Set oSheet = oSheets.Item(1)
Dim oDrawingViews As Inventor.DrawingViews
Set oDrawingViews = oSheet.DrawingViews
Dim oDrawingView As Inventor.DrawingView
Set oDrawingView = oDrawingViews.Item(1)
Dim oRefComps As Inventor.Document
Set oRefComps = oDrawingView.ReferencedDocumentDescriptor.ReferencedDocument
Dim oRefCompDef As Inventor.ComponentDefinition
Set oRefCompDef = oRefComps.ComponentDefinition
Dim oRefCompDefOccs As Inventor.ComponentOccurrence
Set oRefCompDefOccs = oRefCompDef.Occurrences.Item(1)
Dim oRefSubComps As Inventor.ComponentOccurrence
Set oRefSubComps = oRefCompDefOccs.SubOccurrences.Item(1)
Dim oRefSubCompsSubComps As Inventor.ComponentOccurrence
Set oRefSubCompsSubComps = oRefSubComps.SubOccurrences.Item(1)
Dim oSketchPartFils As Inventor.ComponentDefinition
Set oSketchPartFils = oRefSubCompsSubComps.Definition
Dim oSketches As Inventor.PlanarSketches
Set oSketches = oSketchPartFils.Sketches
Dim oSketch As Inventor.Sketch
Set oSketch = oSketches.Item(2)
Dim oPlanarSketchProxy As Inventor.PlanarSketchProxy
Call oRefSubCompsSubComps.CreateGeometryProxy(oSketch, oPlanarSketchProxy)
Call oDrawingView.SetVisibility(oPlanarSketchProxy, True)
Dim oCurve As Inventor.DrawingCurvesEnumerator
Set oCurve = oDrawingView.DrawingCurves(oPlanarSketchProxy)
Dim lNumbOfItems As Long
For lNumbOfItems = 1 To oCurve.Count
Dim oDrawingCurveSegment As Inventor.DrawingCurveSegment
Set oDrawingCurveSegment = oCurve.Item(lNumbOfItems).Segments.Item(1)
Dim oSet1 As Inventor.HighLightSet
Set oSet1 = oDrawingDoc.CreateHighlightSet
'Call oSet1.AddItem(oDrawingView)
Call oSet1.AddItem(oDrawingCurveSegment)
Next
End Sub
This is really important...