Highlighting occurrences

Highlighting occurrences

NachoShaw
Advisor Advisor
714 Views
4 Replies
Message 1 of 5

Highlighting occurrences

NachoShaw
Advisor
Advisor

Hi

 

When creating a shrink wrap, there is a good highlighting method in that, when you mouse over a part before selecting, all occurrences also highlight. Also, all occurrences select when selecting any single occurrence

 

Is there a way to call that type of selection?

 

 

Thanks

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


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

Sergio.D.Suárez
Mentor
Mentor

Hi, do you mean something similar to what the ilogic assembly code below shows?

 

Dim oDoc As AssemblyDocument
oDoc = ThisDoc.Document
oCompDef = oDoc.ComponentDefinition

Dim oSet As HighlightSet
oSet = oDoc.CreateHighlightSet

While True
  Dim oComp As Object
    oComp = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyOccurrenceFilter,"Select Component") 
    ' If nothing gets selected then we're done	
    If IsNothing(oComp) Then Exit While
    oSet.AddItem(oComp)
End While
oSet.Clear()

 regards


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes
Message 3 of 5

what does the code do ? It did not seens to do anything on my assambly ... thought it would select all or something like that

0 Likes
Message 4 of 5

Actually does not do any action, just highlight the selection, in the following example add an action, and as you can see highlights the selection when returning the value, and when leaving with escape, leaves the selection highlight

 

Dim oDoc As AssemblyDocument
oDoc = ThisDoc.Document
oCompDef = oDoc.ComponentDefinition

Dim oSet As HighlightSet
oSet = oDoc.CreateHighlightSet

While True
  Dim oComp As Object
    oComp = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyOccurrenceFilter,"Select Component") 
    ' If nothing gets selected then we're done	
    If IsNothing(oComp) Then Exit While
    oSet.AddItem(oComp)


	MessageBox.Show( "Component: " & oComp.name & "   | Volume: " & Round(oComp.MassProperties.Volume,1))


End While

oSet.Clear()

 


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes
Message 5 of 5

NachoShaw
Advisor
Advisor

Hi

 

this isnt what im looking to achieve. What im looking to do is 2 things

 

1. when the functions is running, highlight ALL assembly occurrences of the underlaying part. for example, if i have 45 x 1" ANSI Heavy bolts and i mouse over any one of the them, they all temporarily highlight until i mouse off.

 

2. if i select the bolt, all other occurrences of the bolt are selected also.

 

this is how the shrinkwrap works 

 

selection.gif

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes