Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Measure volume parts

31 REPLIES 31
SOLVED
Reply
Message 1 of 32
francesco_rossato
2387 Views, 31 Replies

Measure volume parts

francesco_rossato
Enthusiast
Enthusiast

Hello everyone,

 

I need a help for something that I just can't do it as quick as I would.

 

I'd like to measure the volume of certain parts on an assembly, for example: my assembly is composed by parts in steel and parts in gold, and I have to measure only the volume of gold parts.

Till Inventor 2021, this was possible doing a level of detail, and it was a quite good solution.

Now with Inventor 2022, the only solution I found is doing a Substitute of my assembly, excluding all the parts I don't need to, which is a little "annoying" and a slow procedure.

 

Does anyone know a better solution than the one I found?

 

Thank you!!

 

Francesco

0 Likes

Measure volume parts

Hello everyone,

 

I need a help for something that I just can't do it as quick as I would.

 

I'd like to measure the volume of certain parts on an assembly, for example: my assembly is composed by parts in steel and parts in gold, and I have to measure only the volume of gold parts.

Till Inventor 2021, this was possible doing a level of detail, and it was a quite good solution.

Now with Inventor 2022, the only solution I found is doing a Substitute of my assembly, excluding all the parts I don't need to, which is a little "annoying" and a slow procedure.

 

Does anyone know a better solution than the one I found?

 

Thank you!!

 

Francesco

Labels (3)
31 REPLIES 31
Message 2 of 32

theo.bot
Collaborator
Collaborator

You can use the measure command, select your first model, Press the "add to accumulated value", restart the measure (button below), and select the next model and use the "add to accumulated value" again if needed continue repeating this for all you components.

 

theobot_0-1634128806618.png

 

You can use the measure command, select your first model, Press the "add to accumulated value", restart the measure (button below), and select the next model and use the "add to accumulated value" again if needed continue repeating this for all you components.

 

theobot_0-1634128806618.png

 

Message 3 of 32

cadman777
Advisor
Advisor

I would go to the Inventor Customization forum and ask how to code a simple iLogic rule that filters out all BUT the gold parts and finds each of their volumes and then adds them up. Then you can write that to another iProperty and use it in a text label or whatever.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator

I would go to the Inventor Customization forum and ask how to code a simple iLogic rule that filters out all BUT the gold parts and finds each of their volumes and then adds them up. Then you can write that to another iProperty and use it in a text label or whatever.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
Message 4 of 32

SharkDesign
Mentor
Mentor

Add the Volume column to your BOM.

Click material to order by material.

Copy and paste into excel to add them up.

 

jameswillo_1-1634132728251.png

 

  Expert Elite
  Inventor Certified Professional

Add the Volume column to your BOM.

Click material to order by material.

Copy and paste into excel to add them up.

 

jameswillo_1-1634132728251.png

 

  Expert Elite
  Inventor Certified Professional
Message 5 of 32

cadman777
Advisor
Advisor
Accepted solution

Also, you can create a Summary BOM.

In a drawing PartsList, use the Group Settings and filter 'by Material', then make all rows Invisible except the one related to Material: GOLD (). See attached example.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator

Also, you can create a Summary BOM.

In a drawing PartsList, use the Group Settings and filter 'by Material', then make all rows Invisible except the one related to Material: GOLD (). See attached example.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
Message 6 of 32

cadman777
Advisor
Advisor

Here's my attempt at an iLogic rule to get the total Volume of a certain kind of material:

 

' This rule totals all the individual part weights of only the material specified
' Based on Curtis W's & Jane Fan's work

' Get the active assembly.
Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument

' Get the assembly component definition.
Dim oAsmDef As AssemblyComponentDefinition = oAsmDoc.ComponentDefinition

' Get all of the parts in the assembly.
Dim oLeafOccs As ComponentOccurrencesEnumerator = oAsmDef.Occurrences.AllLeafOccurrences

' Iterate through the occurrences and print the Total Volume.
Dim oOcc As ComponentOccurrence
Dim sumTemp As Double = 0 'Start sum variable @ 0 quantity

For Each oOcc In oLeafOccs

	Dim oVol As Double = (Round (oOcc.MassProperties.Volume * .000035315, 1)) 'Volume in cubic feet conversion from cc and rounded off
	Dim oMat As String = oOcc.Definition.Document.PropertySets.Item("Design Tracking Properties").Item("Material").Value 'Get the material name
	
	If oMat = "Concrete" Then 'Filter out all part except 'concrete' material
		sumTemp  = sumTemp + oVol 
	End If	
Next

MsgBox("The total volume of Concrete is " & sumTemp  & " cf")
' Or you can assign the resulting value to one of your iProperties

 

 

 

 


... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator

Here's my attempt at an iLogic rule to get the total Volume of a certain kind of material:

 

' This rule totals all the individual part weights of only the material specified
' Based on Curtis W's & Jane Fan's work

' Get the active assembly.
Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument

' Get the assembly component definition.
Dim oAsmDef As AssemblyComponentDefinition = oAsmDoc.ComponentDefinition

' Get all of the parts in the assembly.
Dim oLeafOccs As ComponentOccurrencesEnumerator = oAsmDef.Occurrences.AllLeafOccurrences

' Iterate through the occurrences and print the Total Volume.
Dim oOcc As ComponentOccurrence
Dim sumTemp As Double = 0 'Start sum variable @ 0 quantity

For Each oOcc In oLeafOccs

	Dim oVol As Double = (Round (oOcc.MassProperties.Volume * .000035315, 1)) 'Volume in cubic feet conversion from cc and rounded off
	Dim oMat As String = oOcc.Definition.Document.PropertySets.Item("Design Tracking Properties").Item("Material").Value 'Get the material name
	
	If oMat = "Concrete" Then 'Filter out all part except 'concrete' material
		sumTemp  = sumTemp + oVol 
	End If	
Next

MsgBox("The total volume of Concrete is " & sumTemp  & " cf")
' Or you can assign the resulting value to one of your iProperties

 

 

 

 


... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
Message 7 of 32

cadman777
Advisor
Advisor

Here's a better version of the iLogic rule that makes it easier to convert different materials to different Imperial units:

 

 

' This rule totals all the individual part weights of only the material specified
' Based on Curtis W's & Jane Fan's work

' Get the active assembly.
Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument

' Get the assembly component definition.
Dim oAsmDef As AssemblyComponentDefinition = oAsmDoc.ComponentDefinition

' Get all of the parts in the assembly.
Dim oLeafOccs As ComponentOccurrencesEnumerator = oAsmDef.Occurrences.AllLeafOccurrences

'******* CONVERSION FACTORS *******
Dim oCCci As Double = .06102 'cubic inches
Dim oCCcf As Double = .000035315 'cubic feet
Dim oCCcy As Double = .00001308 'cubic yards
Dim oCCgal As Double = .00026 'gallons (liquid)
'******* CONVERSION FACTORS *******

'******* USER CUSTOMIZABLE VARIABLES *******
Dim oMatl As String = "Steel, A36" 'Inventor material name
Dim oConFac As Double = oCCci  'Volume conversion factor for material
Dim oRnd As Integer = 2 'Round to right of decimal point
'******* USER CUSTOMIZABLE VARIABLES *******

' Iterate through the occurrences and print the Total Volume.
Dim oOcc As ComponentOccurrence
Dim sumTemp As Double = 0 'Start sum variable @ 0 quantity

For Each oOcc In oLeafOccs 'Look at each and every part

	Dim oVol As Double = (Round (oOcc.MassProperties.Volume * oConFac, oRnd)) 'Round volume result
	Dim oMat As String = oOcc.Definition.Document.PropertySets.Item("Design Tracking Properties").Item("Material").Value 'Get the material name
	
	If oMat = oMatl Then 'Test for material match
		sumTemp  = sumTemp + oVol 'Add all results
	End If	
Next

MsgBox("The total volume of '" & oMatl & "' is " & sumTemp  & " ci")

 

 

 

 

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes

Here's a better version of the iLogic rule that makes it easier to convert different materials to different Imperial units:

 

 

' This rule totals all the individual part weights of only the material specified
' Based on Curtis W's & Jane Fan's work

' Get the active assembly.
Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument

' Get the assembly component definition.
Dim oAsmDef As AssemblyComponentDefinition = oAsmDoc.ComponentDefinition

' Get all of the parts in the assembly.
Dim oLeafOccs As ComponentOccurrencesEnumerator = oAsmDef.Occurrences.AllLeafOccurrences

'******* CONVERSION FACTORS *******
Dim oCCci As Double = .06102 'cubic inches
Dim oCCcf As Double = .000035315 'cubic feet
Dim oCCcy As Double = .00001308 'cubic yards
Dim oCCgal As Double = .00026 'gallons (liquid)
'******* CONVERSION FACTORS *******

'******* USER CUSTOMIZABLE VARIABLES *******
Dim oMatl As String = "Steel, A36" 'Inventor material name
Dim oConFac As Double = oCCci  'Volume conversion factor for material
Dim oRnd As Integer = 2 'Round to right of decimal point
'******* USER CUSTOMIZABLE VARIABLES *******

' Iterate through the occurrences and print the Total Volume.
Dim oOcc As ComponentOccurrence
Dim sumTemp As Double = 0 'Start sum variable @ 0 quantity

For Each oOcc In oLeafOccs 'Look at each and every part

	Dim oVol As Double = (Round (oOcc.MassProperties.Volume * oConFac, oRnd)) 'Round volume result
	Dim oMat As String = oOcc.Definition.Document.PropertySets.Item("Design Tracking Properties").Item("Material").Value 'Get the material name
	
	If oMat = oMatl Then 'Test for material match
		sumTemp  = sumTemp + oVol 'Add all results
	End If	
Next

MsgBox("The total volume of '" & oMatl & "' is " & sumTemp  & " ci")

 

 

 

 

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
Message 8 of 32

SharkDesign
Mentor
Mentor

You could also add something like this to get a list of materials in the document and get the user to choose:

 

Dim oMatList As New ArrayList

For Each oOcc In oLeafOccs 'Look at each and every part
Dim oMat As String = oOcc.Definition.Document.PropertySets.Item("Design Tracking Properties").Item("Material").Value 'Get the material name

If oMatList.contains(oMat)
	Else
oMatList.add(oMat)
End If
Next

MultiValue.List("matlist") = oMatList

oChosenMat = InputListBox("Which material do you want?", MultiValue.List("matlist"), oMatList, Title := "Choose", ListName := "Material")

 

you need to create a text parameter first called "matlist"

  Expert Elite
  Inventor Certified Professional

You could also add something like this to get a list of materials in the document and get the user to choose:

 

Dim oMatList As New ArrayList

For Each oOcc In oLeafOccs 'Look at each and every part
Dim oMat As String = oOcc.Definition.Document.PropertySets.Item("Design Tracking Properties").Item("Material").Value 'Get the material name

If oMatList.contains(oMat)
	Else
oMatList.add(oMat)
End If
Next

MultiValue.List("matlist") = oMatList

oChosenMat = InputListBox("Which material do you want?", MultiValue.List("matlist"), oMatList, Title := "Choose", ListName := "Material")

 

you need to create a text parameter first called "matlist"

  Expert Elite
  Inventor Certified Professional
Message 9 of 32
cadman777
in reply to: SharkDesign

cadman777
Advisor
Advisor

I was thinking of doing that too, but it would have cost me another 3 hours!

Since I'm a novice at coding, it takes me forever to make a macro.

Anyway, great idea.

Brilliant minds think alike!

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator

I was thinking of doing that too, but it would have cost me another 3 hours!

Since I'm a novice at coding, it takes me forever to make a macro.

Anyway, great idea.

Brilliant minds think alike!

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
Message 10 of 32

SharkDesign
Mentor
Mentor

Took me 10mins to write it an then 20 minutes to work out why the multilist didn't work haha!

 

I'm not great at coding either!!

 

 

  Expert Elite
  Inventor Certified Professional

Took me 10mins to write it an then 20 minutes to work out why the multilist didn't work haha!

 

I'm not great at coding either!!

 

 

  Expert Elite
  Inventor Certified Professional
Message 11 of 32

SharkDesign
Mentor
Mentor

What about this then?

 

' This rule totals all the individual part weights of only the material specified
' Compiled by Chris Huminski and James Willoughby, based on Curtis W's & Jane Fan's work

' Get the active assembly.
Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument

' Get the assembly component definition.
Dim oAsmDef As AssemblyComponentDefinition = oAsmDoc.ComponentDefinition

' Get all of the parts in the assembly.
Dim oLeafOccs As ComponentOccurrencesEnumerator = oAsmDef.Occurrences.AllLeafOccurrences

'******* CONVERSION FACTORS *******
Dim oCCci As Double = .06102
Dim oCCcf As Double = .000035315
Dim oCCcy As Double = .00001308
Dim oCCgal As Double = .00026
'******* CONVERSION FACTORS *******

oUnitPick = InputListBox("Units?", {"Cubic Inches","Cubic Feet","Cubic Yards","Gallons"}, "Cubic Inches", Title := "Units", ListName := "Units")

Select Case oUnitPick
Case = "Cubic Inches"
	oUnits = oCCci
Case = "Cubic Feet"
	oUnits = oCCcf
Case = "Cubic Yards"
	oUnits = oCCcy
Case = "Gallons"
	oUnits = oCCgal
End Select

'[******* USER CUSTOMIZABLE VARIABLES *******
'Dim oMatl As String = "Steel, A36" 'Inventor material name
Dim oConFac As Double = oUnits  'Volume conversion factor for material
Dim oRnd As Integer = 2 'Round to right of decimal point
']******USER CUSTOMIZABLE VARIABLES *******

Dim oOcc As ComponentOccurrence
Dim sumTemp As Double = 0 'Start sum variable @ 0 quantity

'[Create a list of materials
Dim oMatList As New ArrayList

For Each oOcc In oLeafOccs 'Look at each and every part
Dim oMat As String = oOcc.Definition.Document.PropertySets.Item("Design Tracking Properties").Item("Material").Value 'Get the material name

If oMatList.Contains(oMat)'skip duplicate materials
	Else
oMatList.Add(oMat)'add material to array
End If
Next

oChosenMat = InputListBox("Which material do you want?", oMatList, oMatList, Title := "Choose", ListName := "Material")
']

'[Iterate through the occurrences and print the Total Volume.
For Each oOcc In oLeafOccs 'Look at each and every part

	Dim oVol As Double = (Round (oOcc.MassProperties.Volume * oConFac, oRnd)) 'Round volume result
	Dim oMat As String = oOcc.Definition.Document.PropertySets.Item("Design Tracking Properties").Item("Material").Value 'Get the material name
	
	If oMat = oChosenMat Then 'Test for material match
		sumTemp  = sumTemp + oVol 'Add all results
	End If	
Next
']

MsgBox("The total volume of '" & oChosenMat & "' is " & sumTemp  & " " & oUnitPick)

 

  Expert Elite
  Inventor Certified Professional

What about this then?

 

' This rule totals all the individual part weights of only the material specified
' Compiled by Chris Huminski and James Willoughby, based on Curtis W's & Jane Fan's work

' Get the active assembly.
Dim oAsmDoc As AssemblyDocument = ThisApplication.ActiveDocument

' Get the assembly component definition.
Dim oAsmDef As AssemblyComponentDefinition = oAsmDoc.ComponentDefinition

' Get all of the parts in the assembly.
Dim oLeafOccs As ComponentOccurrencesEnumerator = oAsmDef.Occurrences.AllLeafOccurrences

'******* CONVERSION FACTORS *******
Dim oCCci As Double = .06102
Dim oCCcf As Double = .000035315
Dim oCCcy As Double = .00001308
Dim oCCgal As Double = .00026
'******* CONVERSION FACTORS *******

oUnitPick = InputListBox("Units?", {"Cubic Inches","Cubic Feet","Cubic Yards","Gallons"}, "Cubic Inches", Title := "Units", ListName := "Units")

Select Case oUnitPick
Case = "Cubic Inches"
	oUnits = oCCci
Case = "Cubic Feet"
	oUnits = oCCcf
Case = "Cubic Yards"
	oUnits = oCCcy
Case = "Gallons"
	oUnits = oCCgal
End Select

'[******* USER CUSTOMIZABLE VARIABLES *******
'Dim oMatl As String = "Steel, A36" 'Inventor material name
Dim oConFac As Double = oUnits  'Volume conversion factor for material
Dim oRnd As Integer = 2 'Round to right of decimal point
']******USER CUSTOMIZABLE VARIABLES *******

Dim oOcc As ComponentOccurrence
Dim sumTemp As Double = 0 'Start sum variable @ 0 quantity

'[Create a list of materials
Dim oMatList As New ArrayList

For Each oOcc In oLeafOccs 'Look at each and every part
Dim oMat As String = oOcc.Definition.Document.PropertySets.Item("Design Tracking Properties").Item("Material").Value 'Get the material name

If oMatList.Contains(oMat)'skip duplicate materials
	Else
oMatList.Add(oMat)'add material to array
End If
Next

oChosenMat = InputListBox("Which material do you want?", oMatList, oMatList, Title := "Choose", ListName := "Material")
']

'[Iterate through the occurrences and print the Total Volume.
For Each oOcc In oLeafOccs 'Look at each and every part

	Dim oVol As Double = (Round (oOcc.MassProperties.Volume * oConFac, oRnd)) 'Round volume result
	Dim oMat As String = oOcc.Definition.Document.PropertySets.Item("Design Tracking Properties").Item("Material").Value 'Get the material name
	
	If oMat = oChosenMat Then 'Test for material match
		sumTemp  = sumTemp + oVol 'Add all results
	End If	
Next
']

MsgBox("The total volume of '" & oChosenMat & "' is " & sumTemp  & " " & oUnitPick)

 

  Expert Elite
  Inventor Certified Professional
Message 12 of 32
cadman777
in reply to: SharkDesign

cadman777
Advisor
Advisor

I tried doing that yesterday, but didn't know how.

Spent 3 hours trying things, but just didn't know that I should've used Case to do it.

The thought occurred to me, but I just couldn't figure it out.

Nice job!

 

I guess if you want to make this a 'Cadillac', you would add code to create the Parameters and check to make sure none exists as an error checking thing. That way nobody has to do anything but press a button.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes

I tried doing that yesterday, but didn't know how.

Spent 3 hours trying things, but just didn't know that I should've used Case to do it.

The thought occurred to me, but I just couldn't figure it out.

Nice job!

 

I guess if you want to make this a 'Cadillac', you would add code to create the Parameters and check to make sure none exists as an error checking thing. That way nobody has to do anything but press a button.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
Message 13 of 32

SharkDesign
Mentor
Mentor

Don't need 'case' it's just neater than 'if' statements.

 

 

  Expert Elite
  Inventor Certified Professional
0 Likes

Don't need 'case' it's just neater than 'if' statements.

 

 

  Expert Elite
  Inventor Certified Professional
Message 14 of 32
cadman777
in reply to: SharkDesign

cadman777
Advisor
Advisor

Yeah, I tried 'If' but didn't quite get it.

Also, I never knew about 'InputListBox' till seeing it now.

I guess that's cuz it didn't exist in 2010, and doesn't work in it either!

I wonder what I could use in 2010?

Maybe a Form in Inventor VBA?

Thing is, I've been trying to do it using a multi-value list in Parameters (2010 has this).

But I just can't figure out how to connect a UI selection listbox with the iLogic variables equated w/the conversion factor number.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes

Yeah, I tried 'If' but didn't quite get it.

Also, I never knew about 'InputListBox' till seeing it now.

I guess that's cuz it didn't exist in 2010, and doesn't work in it either!

I wonder what I could use in 2010?

Maybe a Form in Inventor VBA?

Thing is, I've been trying to do it using a multi-value list in Parameters (2010 has this).

But I just can't figure out how to connect a UI selection listbox with the iLogic variables equated w/the conversion factor number.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
Message 15 of 32

francesco_rossato
Enthusiast
Enthusiast
Hello Theo,
thank you! In fact, this was another option that I tried to use. It's not bad at all, especially because, as you wrote, you can accumulate all the values. The fact is that you have to pay a lot of attention of what are you clicking and how many times, so you can easily miss something, so, I'm going to search a solution that gives me a value automatically..if possible! 🙂
0 Likes

Hello Theo,
thank you! In fact, this was another option that I tried to use. It's not bad at all, especially because, as you wrote, you can accumulate all the values. The fact is that you have to pay a lot of attention of what are you clicking and how many times, so you can easily miss something, so, I'm going to search a solution that gives me a value automatically..if possible! 🙂
Message 16 of 32

francesco_rossato
Enthusiast
Enthusiast

Hello @cadman777,

 

cool solution, but unfortunately this doesn't work.

The reason may be that in your example, you had just one element in concrete replied N times, while I have several different parts with the same material.

0 Likes

Hello @cadman777,

 

cool solution, but unfortunately this doesn't work.

The reason may be that in your example, you had just one element in concrete replied N times, while I have several different parts with the same material.

Message 17 of 32

cadman777
Advisor
Advisor

Works fine for me.

Did you double-click on the PartsList to see that all the other parts are listed with total volumes shown?
Note that the 'Wood, Pressure Treated Pine' consists of both 2x6's and 4x4's, so they are different parts with the same Material, so they 'roll-up' just fine the way I showed you how to do it.

Try again, you may find it works for you.

This is how, for many years, I've created a 'Summary BOM' for structural jobs that have many different structural shapes.

It's never failed me.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes

Works fine for me.

Did you double-click on the PartsList to see that all the other parts are listed with total volumes shown?
Note that the 'Wood, Pressure Treated Pine' consists of both 2x6's and 4x4's, so they are different parts with the same Material, so they 'roll-up' just fine the way I showed you how to do it.

Try again, you may find it works for you.

This is how, for many years, I've created a 'Summary BOM' for structural jobs that have many different structural shapes.

It's never failed me.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
Message 18 of 32

francesco_rossato
Enthusiast
Enthusiast

Ops! Obviously, in my previous reply I referred to @cadman777 's BOM solution with Group Setting.

 

Anyway, thank you again @cadman777 and thank you @SharkDesign, this sounds great! Coding is still a mistery for me, and I started to use Inventor not long ago. Probably, I'll search for an iLogic training.

0 Likes

Ops! Obviously, in my previous reply I referred to @cadman777 's BOM solution with Group Setting.

 

Anyway, thank you again @cadman777 and thank you @SharkDesign, this sounds great! Coding is still a mistery for me, and I started to use Inventor not long ago. Probably, I'll search for an iLogic training.

Message 19 of 32
cadman777
in reply to: cadman777

cadman777
Advisor
Advisor

I take back my comment on InputListBox.

There is one in 2010.

I just needed to change the syntax.

But I'm still not getting to the end result.

It's a mixup between the code and the multi-value lists in Parameters.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes

I take back my comment on InputListBox.

There is one in 2010.

I just needed to change the syntax.

But I'm still not getting to the end result.

It's a mixup between the code and the multi-value lists in Parameters.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
Message 20 of 32

SharkDesign
Mentor
Mentor

d0 is the value the user eventually chooses

Prompt is just a text string in the pop up

MultiValue.List("d0") - d0 has to be in your parameters box for this to work. 

I got around it by deleting the text entirely and just referencing my array list in there. The array list is essentially the same as multivalue parameter but it only lives in the iLogic code.

d0 is the default selected item. Not sure why my code works because I didn't specify this. probably should write oMatList(0) to choose the first item in the list.

The rest are just text in the pop up.

 

 

d0 = InputListBox("Prompt", MultiValue.List("d0"), d0, Title := "Title", ListName := "List")

 

 This is where I declared the arraylist

Dim oMatList As New ArrayList

Then the loop below that adds the values to build a list (oMat is the material name for the occurance so it changes every loop)

oMatList.Add(oMat)

 

 One thing that can sometimes cause these loops to crash is if you have weldments in your assembly, so sometimes it's wise to put in a try/catch on the loop. 

  Expert Elite
  Inventor Certified Professional
0 Likes

d0 is the value the user eventually chooses

Prompt is just a text string in the pop up

MultiValue.List("d0") - d0 has to be in your parameters box for this to work. 

I got around it by deleting the text entirely and just referencing my array list in there. The array list is essentially the same as multivalue parameter but it only lives in the iLogic code.

d0 is the default selected item. Not sure why my code works because I didn't specify this. probably should write oMatList(0) to choose the first item in the list.

The rest are just text in the pop up.

 

 

d0 = InputListBox("Prompt", MultiValue.List("d0"), d0, Title := "Title", ListName := "List")

 

 This is where I declared the arraylist

Dim oMatList As New ArrayList

Then the loop below that adds the values to build a list (oMat is the material name for the occurance so it changes every loop)

oMatList.Add(oMat)

 

 One thing that can sometimes cause these loops to crash is if you have weldments in your assembly, so sometimes it's wise to put in a try/catch on the loop. 

  Expert Elite
  Inventor Certified Professional

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

Post to forums  

Autodesk Design & Make Report