Frame generator component weight calculation automation

Frame generator component weight calculation automation

khantheking1995
Contributor Contributor
1,001 Views
7 Replies
Message 1 of 8

Frame generator component weight calculation automation

khantheking1995
Contributor
Contributor

15:19

Hi

I'm a frequent user of Inventor's Frame generator application for creating structural assembly and skids.

When I create a skid, on later part of the process, I analyse the skid non critical areas and change the existing frame size to lower size (Applicable to all profile) to reduce the overall weight of the skid and also its cost impact on material purchasing, it's kind of Value engineering process.

I have a solution for this (see at the bottom) but don know whether the solution is possible and how to get using Ilogic, kindly help

 

Thanks in Advance!!!

 

Below is the step I use to analyse the skid.

 

I will open the Inventor model, as you can see all the frame size are mentioned in model tree.

khantheking1995_1-1690891095349.png

Now I want to analyse a particular frame, I will select the frame as shown below and note down its weight details from vault properties.

khantheking1995_2-1690891108014.jpeg

 

 

khantheking1995_3-1690891108018.jpeg

Once I noted down the weight of existing frame, now I will right click on the part which I want to analyse and will select "Edit with Frame Generator"

khantheking1995_4-1690891185388.jpeg

 

 

Once clicked, the properties of the Part will appear as you see in image which contain standard, Family, Size, material data etc.

khantheking1995_5-1690891185391.jpeg

 

 

For my analysis, I will only change the Size in the properties and will click "OK"

khantheking1995_6-1690891185395.jpeg

 

That particular part will get replaced and I can again go to vault properties to check the weight of replaced part as below.

khantheking1995_7-1690891185399.jpeg

 

 

 

The above process takes a lot of time and create new part in my computer.

To avoid this, I need a Ilogic solution as below

 

  1. I will run the Ilogic program
  2. A dialog box or form will pop up like in below image

khantheking1995_8-1690891185401.png

 

 

The Ilogic form/rule/dialogue box have the below options

 

  1. Once Form popped run when ilogic is run, it will allow me to select one part/ipt.
  2. Once selected the Size data and Weight date will filled in existed Size section.
  3. The New size section will give me dropdown of other existing size in the same family and profile to select.
  4. Once selected, it show show the weight If it replace the ipt selected.

 

0 Likes
Replies (7)
Message 2 of 8

dalton98
Collaborator
Collaborator

Hello. This looks like it will be fairly difficult to create. Here are a few links that might be helpful

VB custom form

Replace Content Center Part

Pick tool to select component 

Ilogic for Vault 

Change structural cc part 

 

The major hang-up I see is being able to calculate the weight of the new part in the form before you replace it. You could store the weight information elsewhere and calculate it based on iproperties for material length? Or maybe you could have it replace the part in the background every time you change the size drop-down. Either way it will be fairly involved.

 

Message 3 of 8

khantheking1995
Contributor
Contributor

If I maually calculate cross section area for each profile and size and then create a table and when new size is selected , is it possible to get data from table of cross sectional area and the length of the selected material ?

I guess the result will be less accurate but tr process will be fast 

Is it possible, to create the ILOGIC

0 Likes
Message 4 of 8

Frederick_Law
Mentor
Mentor

Why are you using "Vault Connect" to check weight?

iProperties has mass already.

Material-04.jpg

 

 

0 Likes
Message 5 of 8

dalton98
Collaborator
Collaborator

You can access the excel tables for content center parts. This might be easier. In the default ones there are columns for mass. ex

dalton98_0-1691007741755.png

 

I made this rule that creates a dictionary of the table size designation and the mass/ft. Then it displays two message boxes. I couldn't figure out how to display this info in an Inventor Form so you might want to look into making a custom form in vb.net

Dim oADoc As AssemblyDocument = ThisDoc.Document

Dim oOcc As ComponentOccurrence
oOcc = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, "Select Part")

Dim propSet As PropertySet = oOcc.Definition.Document.PropertySets.Item(5)

Dim familyId As Inventor.Property = propSet.Item("FamilyId")
Dim originalRow As Integer = propSet.Item("MemberId").Value + 1

Dim oContentFamily As ContentFamily
oContentFamily = ThisApplication.ContentCenter.GetContentObject("v3#" & familyId.Value & "#")

Dim designationxweight As New Dictionary(Of String, Double)

For i = 1 To oContentFamily.TableRows.Count
	designationxweight.Add(oContentFamily.TableRows(i).Item("G_D").Value, oContentFamily.TableRows(i).Item("MAS").Value)
Next

New_Size = InputListBox("Prompt", designationxweight.Keys, d0, Title := "Title", ListName := "List")

MessageBox.Show("Existing Size: " & designationxweight.Keys(originalRow) & vbLf _
& "Weight: " & designationxweight.Values(originalRow) * Parameter(oOcc.Name, "B_L") / 12 & " lbm" _
& vbLf & vbLf & "New Size: " & New_Size & vbLf _
& "Weight: " & designationxweight.Item(New_Size) * Parameter(oOcc.Name, "B_L") / 12 & " lbm", "Title")

 

Message 6 of 8

khantheking1995
Contributor
Contributor

Hi @dalton98 

First, thanks for all the efforts you are taking to answer my questions

 

How Can I access/navigate to the above mentioned excel tables for content center parts in Inventor 2023.

After looking at the excel data you showed, now is got an another easy idea, want your input whether this is possible?

 

Previous Idea

  1. Once Form popped run when ilogic is run, it will allow me to select one part/ipt.
  2. Once selected the Size data and Weight date will filled in existed Size section.
  3. The New size section will give me dropdown of other existing size in the same family and profile to select.
  4. Once selected, it show show the weight If it replace the ipt selected.

Now we will do the same step upto step 3 to select the new Part size we want to know the weight.

 

One selected it will pull the excel weight data from content center ( Mass/foot) of that particular material

After this, we should create a calculation step in Ilogic as follows as per the table.

lets assign Mass from excel data to some variable WT_NEW

Now lets get length of that part selected

NEW_WEIGHT_VALUE = WT_NEW/foot * Length 

 

So the Ilogic will display the value in the new size weight in the form

This only utilized the data from excel for content center and avoid the process of replacing the part wven in the background.

 

Can it be done?
Is it possible?
@dalton98 

 

0 Likes
Message 7 of 8

dalton98
Collaborator
Collaborator

@khantheking1995 I messed around with the rule a bit. It now creates 4 parameters. 2 multi-value parameters for size and mass. Then i created a second rule that drives the parameters to create the NEW_WEIGHT_VALUE. I'm probably done messing with it. 

 

You said you analysised the critical areas. Are you using Autodesk Inventor Nastran ? It is vastly superior to the frame analysis. You could manipulate beam values there to test different sizes in real time. I'm no expert by any means but I prefer it for casual use. Anyways heres the code...

Dim oADoc As AssemblyDocument = ThisDoc.Document

Dim oOcc As ComponentOccurrence
oOcc = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, "Select Part")

Dim propSet As PropertySet = oOcc.Definition.Document.PropertySets.Item(5)

Dim familyId As Inventor.Property = propSet.Item("FamilyId")

Dim oContentFamily As ContentFamily
oContentFamily = ThisApplication.ContentCenter.GetContentObject("v3#" & familyId.Value & "#")

Dim listSize As New List(Of String)
Dim ListWeight As New List(Of Double)

For i = 1 To oContentFamily.TableRows.Count
	listSize.Add(oContentFamily.TableRows(i).Item("G_D").Value)
	ListWeight.Add(oContentFamily.TableRows(i).Item("MAS").Value)
Next


Dim oUserParam As UserParameters = oADoc.ComponentDefinition.Parameters.UserParameters

Try
	MultiValue.List("SIZE_LIST") = listSize
Catch
	oUserParam.AddByValue("SIZE_LIST", "", UnitsTypeEnum.kTextUnits)
	MultiValue.List("SIZE_LIST") = listSize
End Try

Try
	MultiValue.List("MASS_LIST") = ListWeight
Catch
	oUserParam.AddByValue("MASS_LIST", 0, "lbmass")
	MultiValue.List("MASS_LIST") = ListWeight
End Try

Try
	oUserParam.Item("COMPONENT_LENGTH").Value = Parameter(oOcc.Name, "G_L") * 2.54
Catch
	oUserParam.AddByValue("COMPONENT_LENGTH", Parameter(oOcc.Name, "G_L") * 2.54, UnitsTypeEnum.kInchLengthUnits)
End Try

Try
	oUserParam.Item("NEW_WEIGHT_VALUE").Value = 0
Catch
	oUserParam.AddByValue("NEW_WEIGHT_VALUE", 0, UnitsTypeEnum.kLbMassMassUnits)
End Try

 

MASS_LIST = MultiValue.List("MASS_LIST").Item(MultiValue.List("SIZE_LIST").IndexOf(SIZE_LIST))

NEW_WEIGHT_VALUE =  MASS_LIST / 12 * COMPONENT_LENGTH

 

Message 8 of 8

khantheking1995
Contributor
Contributor
Hi @dalton98
This is for Autodesk Inventor 2023
0 Likes