Inventor Blog by D3 Technologies

Inventor Tips & Tricks - Methods for Controlling Frame Generator Filenames and Part Numbers

Written by Pete Strycharske | Jun 4, 2021 8:30:00 PM

Frame Generator is a powerful tool inside of Inventor that allows for automation around the creation of framing designs. Autodesk has added more flexibility to the tool by allowing predetermined naming conventions for generated frame members. In this post, I’ll address a question that came to us from our YouTube channel, by utilizing the Frame Generator default naming conventions and some iLogic to ensure that data flows into all the relevant iProperties.

Here is the question:

The Solution:

In the Application Options within Inventor, I utilized the Default Naming Conventions found in the “Files” tab to set up the formatting as desired by the customer. To accomplish the desired formatting, I’ll utilize the “Assembly Name” to drive the member file names and then be sure to use the file names to drive the display name shown in the assembly.

Access the File Naming Defaults

Utilize the “Assembly Name” in the Member File Name and use the File Name for the Display Name

 

This will work great for the File and Display Names, as you can see below in the screenshot of the saved assembly. However, the Part Number is still clinging to the values from the Content Center Family Table.

The Assembly Name is populating in the Display Name, which is also indexing as desired

The File Name is correctly tied to the Assembly Name

The Part Number is still utilizing the Content Center Family data

 

The Part Number data from Content Center is particularly sticky, so way I solved this issue is to utilize an iLogic rule to seek out the Frame Generator components and assign the Display Name to the Part Number iProperty. I utilized this as an external rule, so that it could be launched in any desired assembly. The iLogic code is listed at the end of this post.

Special thanks to Jhoel Forshav, whose screencast video helped me exclusively identify the Frame Components! His video can be found with this link: https://knowledge.autodesk.com/support/inventor/learn-explore/caas/screencast/Main/Details/1168a742-a54a-47e4-8e5c-c8fdde6e56de.html

Run the desired External iLogic Rule

The Part Number updates to match the Display Name

Non-Frame Generator components are unaffected

So that’s it! By utilizing some of Inventor’s out-of-the-box functionality and a little bit of iLogic, we can get the Frame Generator components to utilize our precise formatting for File Names and other meta data. Hope you find this helpful and please see the YouTube link below to see this process in action! Happy blogging and have a most blessed day! - Pete Strycharske

 

iLogic Code:

Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument

 

Dim oDoc As Document

 

For Each oDoc In oAsmDoc.AllReferencedDocuments

        If oDoc.DocumentInterests.HasInterest("{AC211AE0-A7A5-4589-916D-81C529DA6D17}") _'Frame generator component

               AndAlso oDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject _'Part

               AndAlso oDoc.IsModifiable _    'Modifiable (not reference skeleton)

               AndAlso oAsmDoc.ComponentDefinition.Occurrences.AllReferencedOccurrences(oDoc).Count > 0 'Exists in assembly (not derived base component)

              

               Dim invDesignInfo As PropertySet

               invDesignInfo = oDoc.PropertySets.Item("Design Tracking Properties")

               'Set the Part Number text to equal the Display Name

               invDesignInfo.Item("Part Number").Value = oDoc.DisplayName

        End If

Next

Do you use any of these tips and tricks in your daily workflow? Feel free to brag about your success in the comments!

Like what you’ve read? Subscribe to our blog! 

 Feel free to share on Twitter or Facebook!