Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Frame Generator (renaming a Skeleton)

7 REPLIES 7
Reply
Message 1 of 8
Mitch_31
1150 Views, 7 Replies

Frame Generator (renaming a Skeleton)

Hi all,
I want to Copy / rename a Frame, but can't cut the depency with the Skeleton and the old frame.
0) SaveAs on the Frame.iam to NewFrame.iam
1) Parse the occurences in the NewFrame
2) file copy with NewName.ipt
3) component replace Name -> NewName
All this is ok, but when I want to save, Inventor tells me that the NewSkeleton can't be saved in this file but in the context of Frame.iam.

In the NewSkeleton.ipt,
"ThisApplication.ActiveDocument.ReferencingDocuments.Item(1).ReleaseReference"
is not working...

Is there a way manage the dependency to the right file?

Thanks for help...

Michel.
7 REPLIES 7
Message 2 of 8
richiesuk
in reply to: Mitch_31

use copydesign,
I had the same problem... another bug 🙂
Message 3 of 8
Mitch_31
in reply to: Mitch_31

Yes but copydesign generates an assembly with no link with the frame, nor the frame generator.
It was basically the reason why I wanted to do it by the API...

Michel
Message 4 of 8
Anonymous
in reply to: Mitch_31


There isn't any API functionality specific to Frame
Generator.  I don't know enough about Frame Generator to say if there's a
workaround.  Sorry.
--
Brian Ekins
Autodesk Inventor API Product
Designer

href="http://blogs.autodesk.com/modthemachine">http://blogs.autodesk.com/modthemachine
Message 5 of 8
gots
in reply to: Mitch_31

hi,

I have the same problem.

To be sure all files will be unique, I need to rename all files in the Frame and I don't how to do that and it is possible.

 

Thanks

Gots

Message 6 of 8
Rene-J
in reply to: Mitch_31

Have you try to use the  FileDescriptor.ReplaceReference

 

Private Sub Replace_ref(ByVal CurFullFileName As String, ByVal NewFullFileName As String)
Dim odoc As Document
Set odoc = ThisApplication.ActiveDocument
Dim oFile As Inventor.file
Set oFile = odoc.file
Dim oFileDescriptor As Inventor.FileDescriptor

For Each oFileDescriptor In oFile.ReferencedFileDescriptors
    If oFileDescriptor.FullFileName = CurFullFileName Then
    Call oFileDescriptor.ReplaceReference(NewFullFileName)
  End If
Next

End Sub

 

René J

Message 7 of 8
gots
in reply to: Mitch_31

Hi

I already use this functoin and this is not enough...

Manualy in Inventor, I cannot save as some files (skelton files) and replace them.

I heared about tool "Copy Design", but it doesn't work for this files or I don't know how use it.

 

Thanks

Message 8 of 8
Mike.Wohletz
in reply to: gots

the CopyDesign tool works great for copying frame generated files and can go from  the assembly file down or also from drawing level down if you do some adjustments to the program. Frame generator adds lots of stuff that looks like GUIDs to attributes and also to custom properties that all must match when you are done. 

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

Post to forums  

Autodesk Design & Make Report