HighLight Set

HighLight Set

Anonymous
Not applicable
774 Views
4 Replies
Message 1 of 5

HighLight Set

Anonymous
Not applicable

upgraded to IV12... my highlight set will no longer work. Anyone know why? It looks to be coded properly...

 

        Dim lNumbOfItems As Long
        For lNumbOfItems = 1 To oCurve.Count

            Dim oDrawingCurveSegment As Inventor.DrawingCurveSegment
            oDrawingCurveSegment = oCurve.Item(lNumbOfItems).Segments.Item(1)

            Dim oSet1 As Inventor.HighlightSet
            oSet1 = oDrawingDoc.CreateHighlightSet

            Call oSet1.AddItem(oDrawingCurveSegment)

        Next

 I would appreceiate any help?

Thanks,

Bill

0 Likes
775 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

Anyone?

0 Likes
Message 3 of 5

skyngu
Collaborator
Collaborator

ilogic?

Autodesk Inventor Professional 2019
0 Likes
Message 4 of 5

Anonymous
Not applicable

VB.net... Did the API change?

0 Likes
Message 5 of 5

Anonymous
Not applicable

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...

0 Likes