cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Find a solid body feature in the Browser history/feature tree

Find a solid body feature in the Browser history/feature tree

When going thru the features that make up a Solid Body, it can be very difficult to determine where in the feature tree those features are, so that they can be re-ordered or modified in some way. There should be a quick and easy way to find where these features are in the feature history. See image below for clarification.

 

 

Find Solid Feature in Browser History.png

7 Comments
P-D91
Enthusiast

This would be useful, see also my idea from a few months back

 

DRoam, you have already supported the below, but anyone else reading this, check out the link.

 

https://forums.autodesk.com/t5/inventor-ideas/feature-tree-highlight/idi-p/7016726

 

DRoam
Mentor

Related idea: Highlight features in the browser when selected from anywhere.

 

(Tagging voters of this idea in case you want to vote on the linked idea: @shilkas, @michael_marx, @pasi.annila, @johndtomlinson, @seagrotek, @Andrew2803, @TKRdam). Thanks!

 

Andrew2803
Advocate

@DRoam;

 

Thanks for tagging me, kudo given!!!

mhall55ULE
Participant

There should be an option for the tree to auto scroll to a part in an assembly or to a feature in a part. Just make it work like Solidworks. One of the biggest complaints I have with Inventor is all the work arounds and extra steps required to do to simple commands. 

 

I like to use base plains to mate parts in assemblies and the current setup doesn't allow you to easily find parts, features and planes in a large assembly tree. The "find in Browser" function doesn't work when trying to Ctl Click. If it auto-scrolled to the part or assy you wouldn't even need the find in browser command.

Anonymous
Not applicable

I couldn't agree more. Compared to CATIA V5 and Siemens NX, solid modelling of anything of an even moderately complex nature is made unnecessarily difficult due to:

 

1) the lack of ability to quickly locate a Solid or Solid feature in the browser tree by right-clicking on the feature within the graphics window and selecting 'Find in browser' (as is available with wireframe and sketch geometry) is frustrating in the extreme

 

2) the lack of ability to zoom to a Solid or Solid feature in the graphics window by right-clicking a Solid or Solid feature in the browser and selecting 'Look at'

 

3) the unbelievable lack of automatic highlighting of an item in the browser upon selection of that feature or Solid within the graphics window (and vice versa!)

 

4) no ability to organise features into named groups or folders

 

5) cannot reorder features in tree above ancestor features

 

I could probably go on but won't 😃

DRoam
Mentor

I was able to implement this one into our company add-in with just a few lines of code. Hopefully this means that Autodesk can do it very easily and quickly as well (although I'm aware it would be more involved than my implementation). Perhaps a JDI candidate, @dan_szymanski?

 

Here it is in action:

https://autode.sk/323Q3FQ

DRoam
Mentor

Here's the code, in case anyone wants to add it to their own add-in:

 

The OnExecute routine for the control definition:

Public Overrides Sub OnExecute(context As NameValueMap)
    Dim part As PartDocument = g_InvApp.ActiveDocument

    If part.SelectSet.Count = 1 Then
        Dim sel As Object = part.SelectSet.Item(1)

        If TypeOf sel Is PartFeature Then
            Dim selFeature As PartFeature = sel

            Dim modelBrowser As BrowserPane = part.BrowserPanes.Item("Model")

            Dim topNode As BrowserNode
            If part.IsSheetMetal Then
                topNode = modelBrowser.TopNode.BrowserNodes.Item("Folded Model")
            Else
                topNode = modelBrowser.TopNode
            End If

            Dim pastSolidsFolder As Boolean = False
            For Each node As BrowserNode In topNode.BrowserNodes
                If pastSolidsFolder = True Then
                    Dim nodeObj As Object = node.NativeObject

                    If TypeOf nodeObj Is PartFeature Then
                        Dim nodeFeature As PartFeature = nodeObj

                        If nodeFeature Is selFeature Then
                            node.EnsureVisible()
                            node.DoSelect()
                            Exit Sub
                        End If
                    End If
                Else
                    If node.BrowserNodeDefinition.Label Like "Solid Bodies*" Then pastSolidsFolder = True
                End If
            Next

            MessageBox.Show("Unable to find the selected solid body feature in the Browser History.", DisplayName, MessageBoxButtons.OK, MessageBoxIcon.Information)
        End If
    End If
End Sub

And here's the handler code for adding it to the context menu:

Shared Sub OnPartFeatureContextMenu(SelectedEntities As ObjectsEnumerator, SelectionDevice As SelectionDeviceEnum, LinearMenu As CommandControls, AdditionalInfo As NameValueMap) Handles UserInputEvents.OnLinearMarkingMenu
    Try
        If SelectedEntities.Count = 1 Then
            Dim sel As Object = SelectedEntities.Item(1)
            If TypeOf sel Is PartFeature Then
                Dim targetBtn As CommandControl = Nothing
                For Each btn As CommandControl In LinearMenu
                    If btn.InternalName = "AppZoomSelectCmd" Then
                        targetBtn = btn
                        Exit For
                    End If
                Next

                If targetBtn IsNot Nothing AndAlso targetBtn.Visible Then
                    LinearMenu.AddButton(MyCommands.ControlDefinitions.Item(NameOf(HFPartFindSBFeatureInHistoryCmd)).ControlDefinition,,, targetBtn.InternalName, False)
                End If
            End If
        End If
    Catch ex As Exception
        ex.ShowDetailedInfo
    End Try
End Sub

I use the check for the "AppZoomSelectCmd" (i.e. "Find Part in Window") command to check if the feature is being right-clicked in the browser and not in the graphics window. I also opted not to check if the feature is being right-clicked from within a solid body group rather than in the main part history (although I think this could be done), so the command shows up even if already right-clicking the feature from the part history. Other than that it behaves exactly as I'd want it to.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea