We located a reply from Bob Van der Donck of Autodesk regarding your issue.
Good Luck!
3DCADTips Help desk
Reply From: Bob Van der Donck \(Autodesk\)
Date: Jun/08/06 - 19:43 (CDT) NEW!
Re: Flatpattern Dimensions
You could extract the extents via the API and feed these values to a custom property in your sheet metal part. After you use the part in an assembly, you can add custom properties to the BOM with the command "Add custom iProperty columns" (icon number six on the toolbar). I called the custom props "length" and "width".
You will also need to define a dummy "length" and "width" property in your
assembly. I have attached a sample R11 assembly and sample VBA code.
However each time the sheet metal part extents change , you will need to run this macro to get the values updated in the BOM.
Bob
-------------------------------Cut here ----------------------------------
Public Sub extents_to_custom_props()
Dim objpartDoc As PartDocument
Set objpartDoc = ThisApplication.ActiveDocument
Dim objCompDef As SheetMetalComponentDefinition
Set objCompDef = objpartDoc.ComponentDefinition
Dim fpBox As Box
Set fpBox = objCompDef.FlatPattern.Body.RangeBox
Dim width As Double
Dim length As Double
length = fpBox.MaxPoint.X - fpBox.MinPoint.X
width = fpBox.MaxPoint.Y - fpBox.MinPoint.Y
Dim objUOM As UnitsOfMeasure
Set objUOM = objpartDoc.UnitsOfMeasure
Dim strLength As String
Dim strWidth As String
strLength = objUOM.GetStringFromValue(length,
UnitsTypeEnum.kDefaultDisplayLengthUnits)
strWidth = objUOM.GetStringFromValue(width,
UnitsTypeEnum.kDefaultDisplayLengthUnits)
Call MsgBox("Width = " + strWidth + vbCrLf + "Length = " + strLength,
vbOKOnly, "Sheet Metal Flat Pattern")
Call Create_ext_prop("width", strWidth)
Call Create_ext_prop("length", strLength)
End Sub
Sub Create_ext_prop(prop As String, prop_value As String)
Dim opropsets As PropertySets
Dim opropset As PropertySet
Dim oUserPropertySet As PropertySet
Set opropsets = ThisApplication.ActiveDocument.PropertySets
For Each opropset In opropsets
If opropset.Name = "Inventor User Defined Properties" Then Set
oUserPropertySet = opropset
Next opropset
' If Property does not exist then add the new Property
On Error Resume Next
Call oUserPropertySet.Add(prop_value, prop)
' Try to set the Property value if it already exists
For i = 1 To oUserPropertySet.Count
If oUserPropertySet.Item(i).Name = prop Then
oUserPropertySet.Item(i).Value = prop_value
Next i
End Sub
-------------------------------Cut here-----------------------------