Sheet Metal Extents (Size_Thickness, Size_Width and Size_Length) for BOM

Sheet Metal Extents (Size_Thickness, Size_Width and Size_Length) for BOM

RoyWickrama_RWEI
Advisor Advisor
860 Views
3 Replies
Message 1 of 4

Sheet Metal Extents (Size_Thickness, Size_Width and Size_Length) for BOM

RoyWickrama_RWEI
Advisor
Advisor

Sheet Metal:

Thickness (T)

Width (W)

Length (L)

 

Can I get Thickness, Width and Length in BOM with an iLogic rule. with these parameters not created in PARAMETERS table

Thanks a lot for helping.

 

2019-07-03 23_22_25-Window.png

 

 

 

0 Likes
861 Views
3 Replies
Replies (3)
Message 2 of 4

bradeneuropeArthur
Mentor
Mentor

Hi,

 

You can configure the Partslist style with the needed parameters!

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 3 of 4

rhasell
Advisor
Advisor

Hi

 

I cobbled together a rule for you to look at.

This will create the Parameters and then populate them with the Sheetmetal Extents.

I will leave the BOM formatting up to you.

Note this will not update dynamically, you need additional steps for that.

 

Dim oPartDoc As PartDocument = ThisDoc.Document
Dim userParams As UserParameters = oPartDoc.ComponentDefinition.Parameters.UserParameters
Dim newParam As UserParameter ' Placeholder
Dim oFormat As CustomPropertyFormat

'LENGTH
Try
	oParam = oPartDoc.ComponentDefinition.Parameters("LENGTH")
Catch 	'If the parameter was not found, then create a new one.
	newParam = userParams.AddByExpression("LENGTH", 0, "mm") ' Create the Parameter as per above
	newParam.ExposedAsProperty = True 'Flag for Export
	oFormat = newParam.CustomPropertyFormat 'For some reason or other this line is needed to enable the following formatting
	oFormat.PropertyType = Inventor.CustomPropertyTypeEnum.kTextPropertyType
	oFormat.Precision = Inventor.CustomPropertyPrecisionEnum.kZeroDecimalPlacePrecision 'Set one decimal place
	'oFormat.Units="mm" 'Units
	oFormat.ShowUnitsString = False
	oFormat.ShowLeadingZeros = False
	oFormat.ShowTrailingZeros = False
End Try

'WIDTH
Try
	oParam = oPartDoc.ComponentDefinition.Parameters("WIDTH")
Catch 	'If the parameter was not found, then create a new one.
	newParam = userParams.AddByExpression("WIDTH", 0, "mm") ' Create the Parameter as per above
	newParam.ExposedAsProperty = True 'Flag for Export
	oFormat = newParam.CustomPropertyFormat 'For some reason or other this line is needed to enable the following formatting
	oFormat.PropertyType = Inventor.CustomPropertyTypeEnum.kTextPropertyType
	oFormat.Precision = Inventor.CustomPropertyPrecisionEnum.kZeroDecimalPlacePrecision 'Set one decimal place
	'oFormat.Units="mm" 'Units
	oFormat.ShowUnitsString = False
	oFormat.ShowLeadingZeros = False
	oFormat.ShowTrailingZeros = False

End Try
'THICK
Try
	oParam = oPartDoc.ComponentDefinition.Parameters("THICK")
Catch 	'If the parameter was not found, then create a new one.
	newParam = userParams.AddByExpression("THICK", 0, "mm") ' Create the Parameter as per above
	newParam.ExposedAsProperty = True 'Flag for Export
	oFormat = newParam.CustomPropertyFormat 'For some reason or other this line is needed to enable the following formatting
	oFormat.PropertyType = Inventor.CustomPropertyTypeEnum.kTextPropertyType
	oFormat.Precision = Inventor.CustomPropertyPrecisionEnum.kZeroDecimalPlacePrecision 'Set one decimal place
	'oFormat.Units="mm" 'Units
	oFormat.ShowUnitsString = False
	oFormat.ShowLeadingZeros = False
	oFormat.ShowTrailingZeros = False
End Try

'---------------------------------
Dim oPart As PartDocument
oPart = ThisApplication.ActiveDocument
oDoc = ThisApplication.ActiveDocument

'Turn off work features so they don't calculate
oPart.ObjectVisibility.AllWorkFeatures = False
InventorVb.DocumentUpdate()
'
Dim sizes As New List(Of Double)
'
sizes.Add(SheetMetal.FlatExtentsLength)
sizes.Add(SheetMetal.FlatExtentsWidth)
sizes.Sort()
Parameter("LENGTH") = sizes(1)
Parameter("WIDTH") = sizes(0)
Parameter("THICK") = "Thickness"
iLogicVb.UpdateWhenDone = True
'Turn back on work features - optional
oPart.ObjectVisibility.AllWorkFeatures = True
Reg
2026.1
Message 4 of 4

RoyWickrama_RWEI
Advisor
Advisor

Thanks for the reply.

I will explore, May be I will get it through.

 

0 Likes