Hello,
We have recently discovered an issue in inventor when copying a frame generator assembly.
Using Vault Pro copy design (also even if not, just doing a copy in general), the actual copying of all parts/sub assemblies works just fine. The new files are generated, in the appropriate folders, all links are broken to the original, all property information is updated as it should be, etc...
However, the problems exists ONLY in the inventor browser of the newly copied frame assembly.
When using the "Reuse" tool within frame gen, by default inventor "groups" those reused members into a type of sub-folder in the browser (see image attached). This is fine when creating new frames, however when you copy a design the old frame data carries over into the name of said sub-folder. This information does not exists anywhere but the folder/group name in the browser itself.
There is no way to rename this as it is not actually a folder, it simply acts as one.
This does not create problems in our model or vault, but is confusing for some users when old frame numbers appear in new assemblies they are not associated with at all.
This has caused problems in other areas though, the gist of it is this:
We have a workflow with a client we send native inventor models to of certain frames. The client then uses a 3rd party tool to translate said models to another format, creating Revit families with them.
When the translation happens, the folder name is also carried over creating confusion on the end (in revit)
I'm not looking for a Revit or translation fix, simply a way to rename these "ghost" folders in copied assemblies.
The only work around is to completely re-create the assemblies new, or promote all members up thus getting rid of the folders/groups... This is a problem as our frames are broken at that point.
Anybody else experienced this problem with browser nodes/folders and frame gen?
Any ideas how to rename them? Even if using iLogic or diving into the API and coding something?
The example in the attached image shows the copied frame (new number WLD300513) which still displays the original frame name as the folder/group name (WLD300491). Looking to have the new WLD300513 number translate through the copy so everything is aligned. You will notice the actual member names within the folder/group are correct.
Thanks!
Solved! Go to Solution.
Solved by mtresky. Go to Solution.
Hi Mathew,
I would need to ask FG developer, but it seems Frame Generator makes folder of reused frame as read only.
But I found it is possible to make it read/write via API. Based on these help pages
https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-41FDC894-63A7-4A88-B87F-0CF811879560
I wrote and test this VBA that makes reuse folder read/write. After macro run, you can rename reuse folder as usual - slow double click to get focus and rename. Modify macro to better detect reuse folder browserNode, but raw "source code" is this:
Sub FGReuseRename()
Dim oDoc As AssemblyDocument
Set oDoc = ThisApplication.ActiveDocument
' Get the model browser
Dim oPane As BrowserPane
Set oPane = oDoc.BrowserPanes.Item("Model")
Debug.Print oPane.TopNode.BrowserNodes(10).BrowserNodes(16).BrowserNodeDefinition.Label
Dim oReuseFolder As BrowserFolder
Set oReuseFolder = oPane.TopNode.BrowserNodes(10).BrowserNodes(16).NativeObject
Debug.Print TypeName(oReuseFolder)
oReuseFolder.AllowRename = True
End Sub
Regards
Jan Priban
Thank you for the reply!
I will test this out and attempt to create something automated that runs, but even manually renaming is better than nothing. I will keep you posted, thanks again!
I was able to use your code and tweak it for users to make 3 selection from the top level assembly.
Selection 1: the sub-assembly of the frame
Selection 2: the folder to rename
Selection 3: the member to rename the folder from
In a global rule, overall 5 mouse clicks.
1. open form
2. selection1
3. selection2
4. selection3
5. execute button
Code is below for anybody experiencing same issues and would like a fix:
---
'WRITTEN BY TRESKY 8/5/22 Sub Main 'If nothing is selected, prompt user, otherwise try to run code If ThisDoc.Document.SelectSet.Count = 0 Then MessageBox.Show("Nothing Selected", "Nothing Selected!") Else 'Set variable for 3 selections. Assembly component, folder to rename, and member to rename to... Dim Selection1, Selection3 As ComponentOccurrence Dim Selection2 As BrowserFolder Selection1 = ThisDoc.Document.SelectSet(1) Selection2 = ThisDoc.Document.SelectSet(2) Selection3 = ThisDoc.Document.SelectSet(3) 'Grab the browser names of each of the 3 selections Dim Name1 As String = Selection1.Name Dim Name2 As String = Selection2.Name Dim Name3 As String = Selection3.Name 'Strip off the ":#" occurance number from the end of the name ***This would create a duplicate browser node if not*** Dim nName As String = Left(Name3, Len(Name3) -2) 'Try to rename calling private sub created below with 3 inputs (selections) Try RenameFolder(Name1, Name2, nName) Catch 'Display Error on error MessageBox.Show("Error. Something went wrong, please try again...", "Error") End Try End If End Sub 'WRITTEN BY TRESKY 8/5/22 Sub RenameFolder(SubAssembly As String, CurrentName As String, NewName As String) Dim oDoc As AssemblyDocument oDoc = ThisApplication.ActiveDocument ' Get the model browser Dim oPane As BrowserPane oPane = oDoc.BrowserPanes.Item("Model") 'Set the reuse folder to rename using first and second selection inputs (Assembly Node, Folder Node) Dim oReuseFolder As BrowserFolder oReuseFolder = oPane.TopNode.BrowserNodes(SubAssembly).BrowserNodes(CurrentName).NativeObject 'Allow folder to be renamed oReuseFolder.AllowRename = True 'Rename folder to third selection input oReuseFolder.Name = NewName End Sub
Hi Mathew,
much better identification of FG frame reuse folder than I used in my snippet above 😀
Regards
Jan Priban
Can't find what you're looking for? Ask the community or share your knowledge.