Inventor Customization

Inventor Customization

Reply
Contributor
Mitch_31
Posts: 17
Registered: ‎02-19-2007
Message 1 of 8 (615 Views)

Frame Generator (renaming a Skeleton)

615 Views, 7 Replies
02-02-2009 10:41 AM
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.
Distinguished Contributor
richiesuk
Posts: 222
Registered: ‎02-03-2009
Message 2 of 8 (615 Views)

Re: Frame Generator (renaming a Skeleton)

02-03-2009 01:21 AM in reply to: Mitch_31
use copydesign,
I had the same problem... another bug :smileyhappy:
Contributor
Mitch_31
Posts: 17
Registered: ‎02-19-2007
Message 3 of 8 (615 Views)

Re: Frame Generator (renaming a Skeleton)

02-04-2009 08:58 AM 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
*Brian Ekins \(Autodesk\)
Message 4 of 8 (615 Views)

Re: Frame Generator (renaming a Skeleton)

02-04-2009 02:31 PM 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
Contributor
gots
Posts: 12
Registered: ‎08-23-2010
Message 5 of 8 (605 Views)

Re: Frame Generator (renaming a Skeleton)

09-09-2010 02:59 AM 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

Distinguished Contributor
Rene-J
Posts: 305
Registered: ‎05-07-2005
Message 6 of 8 (594 Views)

Re: Frame Generator (renaming a Skeleton)

09-09-2010 11:29 PM 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

Contributor
gots
Posts: 12
Registered: ‎08-23-2010
Message 7 of 8 (591 Views)

Re: Frame Generator (renaming a Skeleton)

09-09-2010 11:58 PM 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

Valued Mentor
Mike.Wohletz
Posts: 375
Registered: ‎07-29-2008
Message 8 of 8 (580 Views)

Re: Frame Generator (renaming a Skeleton)

09-10-2010 10:20 PM 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. 

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.