<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sheet Metal Extents in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885448#M155602</link>
    <description>Brian, This is excellent. &lt;BR /&gt;
&lt;BR /&gt;
But do you think you could extend your addin to also work on non-sheetmetal parts?&lt;BR /&gt;
&lt;BR /&gt;
I would think it could be easy to add three more custom parameters with the total length of a parts bounding box. Something like TotX, TotY and TotZ.&lt;BR /&gt;
&lt;BR /&gt;
This would be great to use in property expressions on parts like plates, beams etc. If defined in a templatefile this would give us fully automatic BOM-info.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I have previously done something like this with VBA using the following code (I think I may have gotten it from you in the first place):&lt;BR /&gt;
&lt;BR /&gt;
--------------------------------------------------------------&lt;BR /&gt;
'Get the RangeBox data of the primary solid body.&lt;BR /&gt;
'Die if solid body is not defined.&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
    Set oBox = oDoc.ComponentDefinition.SurfaceBodies.Item(1).RangeBox&lt;BR /&gt;
    If Err Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    On Error GoTo 0&lt;BR /&gt;
    Call oBox.GetBoxData(MinPoint, MaxPoint)&lt;BR /&gt;
&lt;BR /&gt;
'Calculate X,Y,Z displacement&lt;BR /&gt;
    For i = 1 To 3&lt;BR /&gt;
        dBlockSize(i) = MaxPoint(i) - MinPoint(i)&lt;BR /&gt;
    Next&lt;BR /&gt;
&lt;BR /&gt;
' Set a reference to the UnitsOfMeasure object of the active document.&lt;BR /&gt;
    Dim oUOM As UnitsOfMeasure&lt;BR /&gt;
    Set oUOM = ThisDocument.UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
' Get the enum value that defines the current default length units.&lt;BR /&gt;
    Dim eLengthUnit As UnitsTypeEnum&lt;BR /&gt;
    eLengthUnit = oUOM.LengthUnits&lt;BR /&gt;
&lt;BR /&gt;
' Get the equivalent string of the enum value.&lt;BR /&gt;
    Dim sLengthUnit As String&lt;BR /&gt;
    sLengthUnit = oUOM.GetStringFromType(eLengthUnit)&lt;BR /&gt;
&lt;BR /&gt;
' Create a string array showing the X,Y,Z lengths in the current units.&lt;BR /&gt;
    Dim sBlockSize(1 To 3)&lt;BR /&gt;
    For i = 1 To 3&lt;BR /&gt;
        sBlockSize(i) = oUOM.GetStringFromValue(dBlockSize(i), sLengthUnit)&lt;BR /&gt;
    Next&lt;BR /&gt;
&lt;BR /&gt;
'Isolate numerical values and get units suffix&lt;BR /&gt;
    For i = 1 To 3&lt;BR /&gt;
        sTemp() = Split(sBlockSize(i), " ", 2, 1)&lt;BR /&gt;
        sValues(i) = sTemp(0)&lt;BR /&gt;
    Next&lt;BR /&gt;
&lt;BR /&gt;
    sValues(4) = sTemp(1)</description>
    <pubDate>Sat, 14 Apr 2007 14:19:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-04-14T14:19:28Z</dc:date>
    <item>
      <title>Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885434#M155588</link>
      <description>I cannot understand why Autodesk does not have the sheet metal extents and &lt;BR /&gt;
sheet metal style as parameters so we do not have to resort to VBA or &lt;BR /&gt;
addins.  (I know of the great program Yippee etc.)&lt;BR /&gt;
&lt;BR /&gt;
Anyways, I have included the code from someone at Autodesk for the length &lt;BR /&gt;
and width.  What I do not understand is where to put this code so that it &lt;BR /&gt;
will be updated every time the sheet metal part is changed.  Is there a way &lt;BR /&gt;
to do this?  Do I place it in my sheet metal template file?  I am a little &lt;BR /&gt;
unclear as to where I put it.  Also does somebody have the code for the &lt;BR /&gt;
style?&lt;BR /&gt;
&lt;BR /&gt;
(I know how to put it in the template file and run the macro but it does not &lt;BR /&gt;
update unless this is done.)&lt;BR /&gt;
&lt;BR /&gt;
It has been a while since I have done any programming in VB and have never &lt;BR /&gt;
done any inside Inventor so any help on this would be greatly appreciated!.&lt;BR /&gt;
&lt;BR /&gt;
**************************************************************&lt;BR /&gt;
Public Sub extents_to_custom_props()&lt;BR /&gt;
   Dim objpartDoc As PartDocument&lt;BR /&gt;
&lt;BR /&gt;
    Set objpartDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
    Dim objCompDef As SheetMetalComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Set objCompDef = objpartDoc.ComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Dim fpBox As Variant&lt;BR /&gt;
&lt;BR /&gt;
    Set fpBox = objCompDef.FlatPattern.Body.RangeBox&lt;BR /&gt;
&lt;BR /&gt;
    Dim width As Double&lt;BR /&gt;
&lt;BR /&gt;
    Dim length As Double&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    length = fpBox.MaxPoint.X - fpBox.MinPoint.X&lt;BR /&gt;
&lt;BR /&gt;
    width = fpBox.MaxPoint.Y - fpBox.MinPoint.Y&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim objUOM As UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
    Set objUOM = objpartDoc.UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim strLength As String&lt;BR /&gt;
&lt;BR /&gt;
    Dim strWidth As String&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    strLength = objUOM.GetStringFromValue(length, &lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
    strWidth = objUOM.GetStringFromValue(width, &lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call MsgBox("Width = " + strWidth + vbCrLf + "Length = " + strLength, &lt;BR /&gt;
vbOKOnly, "Sheet Metal Flat Pattern")&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("width", strWidth)&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("length", strLength)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub Create_ext_prop(prop As String, prop_value As String)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dim opropsets As PropertySets&lt;BR /&gt;
&lt;BR /&gt;
Dim opropset As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
Dim oUserPropertySet As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Set opropsets = ThisApplication.ActiveDocument.PropertySets&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
For Each opropset In opropsets&lt;BR /&gt;
&lt;BR /&gt;
    If opropset.Name = "Inventor User Defined Properties" Then Set &lt;BR /&gt;
oUserPropertySet = opropset&lt;BR /&gt;
&lt;BR /&gt;
Next opropset&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
' If Property does not exist then add the new Property&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
        Call oUserPropertySet.Add(prop_value, prop)&lt;BR /&gt;
&lt;BR /&gt;
' Try to set the Property value if it already exists&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 For i = 1 To oUserPropertySet.Count&lt;BR /&gt;
&lt;BR /&gt;
   If oUserPropertySet.Item(i).Name = prop Then &lt;BR /&gt;
oUserPropertySet.Item(i).Value = prop_value&lt;BR /&gt;
&lt;BR /&gt;
 Next i&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
*******************************************************************************&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0</description>
      <pubDate>Thu, 08 Feb 2007 20:16:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885434#M155588</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-08T20:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885435#M155589</link>
      <description>Also what do I have to change with the code to allow me to run it on parts &lt;BR /&gt;
that are in an assembly?  (It runs into errors unless I explicitly open the &lt;BR /&gt;
part in a separate window.)&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message &lt;BR /&gt;
news:5480176@discussion.autodesk.com...&lt;BR /&gt;
I cannot understand why Autodesk does not have the sheet metal extents and&lt;BR /&gt;
sheet metal style as parameters so we do not have to resort to VBA or&lt;BR /&gt;
addins.  (I know of the great program Yippee etc.)&lt;BR /&gt;
&lt;BR /&gt;
Anyways, I have included the code from someone at Autodesk for the length&lt;BR /&gt;
and width.  What I do not understand is where to put this code so that it&lt;BR /&gt;
will be updated every time the sheet metal part is changed.  Is there a way&lt;BR /&gt;
to do this?  Do I place it in my sheet metal template file?  I am a little&lt;BR /&gt;
unclear as to where I put it.  Also does somebody have the code for the&lt;BR /&gt;
style?&lt;BR /&gt;
&lt;BR /&gt;
(I know how to put it in the template file and run the macro but it does not&lt;BR /&gt;
update unless this is done.)&lt;BR /&gt;
&lt;BR /&gt;
It has been a while since I have done any programming in VB and have never&lt;BR /&gt;
done any inside Inventor so any help on this would be greatly appreciated!.&lt;BR /&gt;
&lt;BR /&gt;
**************************************************************&lt;BR /&gt;
Public Sub extents_to_custom_props()&lt;BR /&gt;
   Dim objpartDoc As PartDocument&lt;BR /&gt;
&lt;BR /&gt;
    Set objpartDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
    Dim objCompDef As SheetMetalComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Set objCompDef = objpartDoc.ComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Dim fpBox As Variant&lt;BR /&gt;
&lt;BR /&gt;
    Set fpBox = objCompDef.FlatPattern.Body.RangeBox&lt;BR /&gt;
&lt;BR /&gt;
    Dim width As Double&lt;BR /&gt;
&lt;BR /&gt;
    Dim length As Double&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    length = fpBox.MaxPoint.X - fpBox.MinPoint.X&lt;BR /&gt;
&lt;BR /&gt;
    width = fpBox.MaxPoint.Y - fpBox.MinPoint.Y&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim objUOM As UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
    Set objUOM = objpartDoc.UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim strLength As String&lt;BR /&gt;
&lt;BR /&gt;
    Dim strWidth As String&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    strLength = objUOM.GetStringFromValue(length,&lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
    strWidth = objUOM.GetStringFromValue(width,&lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call MsgBox("Width = " + strWidth + vbCrLf + "Length = " + strLength,&lt;BR /&gt;
vbOKOnly, "Sheet Metal Flat Pattern")&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("width", strWidth)&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("length", strLength)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub Create_ext_prop(prop As String, prop_value As String)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dim opropsets As PropertySets&lt;BR /&gt;
&lt;BR /&gt;
Dim opropset As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
Dim oUserPropertySet As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Set opropsets = ThisApplication.ActiveDocument.PropertySets&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
For Each opropset In opropsets&lt;BR /&gt;
&lt;BR /&gt;
    If opropset.Name = "Inventor User Defined Properties" Then Set&lt;BR /&gt;
oUserPropertySet = opropset&lt;BR /&gt;
&lt;BR /&gt;
Next opropset&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
' If Property does not exist then add the new Property&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
        Call oUserPropertySet.Add(prop_value, prop)&lt;BR /&gt;
&lt;BR /&gt;
' Try to set the Property value if it already exists&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 For i = 1 To oUserPropertySet.Count&lt;BR /&gt;
&lt;BR /&gt;
   If oUserPropertySet.Item(i).Name = prop Then&lt;BR /&gt;
oUserPropertySet.Item(i).Value = prop_value&lt;BR /&gt;
&lt;BR /&gt;
 Next i&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
*******************************************************************************&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;/SENDMAIL&gt;</description>
      <pubDate>Thu, 08 Feb 2007 21:03:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885435#M155589</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-08T21:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885436#M155590</link>
      <description>The reason it fails for parts in an assembly is that the program is getting &lt;BR /&gt;
the active document.  Even though you've in-place activated a part, the &lt;BR /&gt;
assembly is still the active document.  Instead of using the ActiveDocument, &lt;BR /&gt;
you  should use the ActiveEditObject property instead.  This will return &lt;BR /&gt;
whatever object the end-user is currently editing.  This can be a document, &lt;BR /&gt;
sketch, or sheet.  In the case where a part is in-place activated, the part &lt;BR /&gt;
document is the active edit object since any edits made will take place &lt;BR /&gt;
within the part.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message &lt;BR /&gt;
news:5480280@discussion.autodesk.com...&lt;BR /&gt;
Also what do I have to change with the code to allow me to run it on parts&lt;BR /&gt;
that are in an assembly?  (It runs into errors unless I explicitly open the&lt;BR /&gt;
part in a separate window.)&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message&lt;BR /&gt;
news:5480176@discussion.autodesk.com...&lt;BR /&gt;
I cannot understand why Autodesk does not have the sheet metal extents and&lt;BR /&gt;
sheet metal style as parameters so we do not have to resort to VBA or&lt;BR /&gt;
addins.  (I know of the great program Yippee etc.)&lt;BR /&gt;
&lt;BR /&gt;
Anyways, I have included the code from someone at Autodesk for the length&lt;BR /&gt;
and width.  What I do not understand is where to put this code so that it&lt;BR /&gt;
will be updated every time the sheet metal part is changed.  Is there a way&lt;BR /&gt;
to do this?  Do I place it in my sheet metal template file?  I am a little&lt;BR /&gt;
unclear as to where I put it.  Also does somebody have the code for the&lt;BR /&gt;
style?&lt;BR /&gt;
&lt;BR /&gt;
(I know how to put it in the template file and run the macro but it does not&lt;BR /&gt;
update unless this is done.)&lt;BR /&gt;
&lt;BR /&gt;
It has been a while since I have done any programming in VB and have never&lt;BR /&gt;
done any inside Inventor so any help on this would be greatly appreciated!.&lt;BR /&gt;
&lt;BR /&gt;
**************************************************************&lt;BR /&gt;
Public Sub extents_to_custom_props()&lt;BR /&gt;
   Dim objpartDoc As PartDocument&lt;BR /&gt;
&lt;BR /&gt;
    Set objpartDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
    Dim objCompDef As SheetMetalComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Set objCompDef = objpartDoc.ComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Dim fpBox As Variant&lt;BR /&gt;
&lt;BR /&gt;
    Set fpBox = objCompDef.FlatPattern.Body.RangeBox&lt;BR /&gt;
&lt;BR /&gt;
    Dim width As Double&lt;BR /&gt;
&lt;BR /&gt;
    Dim length As Double&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    length = fpBox.MaxPoint.X - fpBox.MinPoint.X&lt;BR /&gt;
&lt;BR /&gt;
    width = fpBox.MaxPoint.Y - fpBox.MinPoint.Y&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim objUOM As UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
    Set objUOM = objpartDoc.UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim strLength As String&lt;BR /&gt;
&lt;BR /&gt;
    Dim strWidth As String&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    strLength = objUOM.GetStringFromValue(length,&lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
    strWidth = objUOM.GetStringFromValue(width,&lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call MsgBox("Width = " + strWidth + vbCrLf + "Length = " + strLength,&lt;BR /&gt;
vbOKOnly, "Sheet Metal Flat Pattern")&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("width", strWidth)&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("length", strLength)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub Create_ext_prop(prop As String, prop_value As String)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dim opropsets As PropertySets&lt;BR /&gt;
&lt;BR /&gt;
Dim opropset As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
Dim oUserPropertySet As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Set opropsets = ThisApplication.ActiveDocument.PropertySets&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
For Each opropset In opropsets&lt;BR /&gt;
&lt;BR /&gt;
    If opropset.Name = "Inventor User Defined Properties" Then Set&lt;BR /&gt;
oUserPropertySet = opropset&lt;BR /&gt;
&lt;BR /&gt;
Next opropset&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
' If Property does not exist then add the new Property&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
        Call oUserPropertySet.Add(prop_value, prop)&lt;BR /&gt;
&lt;BR /&gt;
' Try to set the Property value if it already exists&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 For i = 1 To oUserPropertySet.Count&lt;BR /&gt;
&lt;BR /&gt;
   If oUserPropertySet.Item(i).Name = prop Then&lt;BR /&gt;
oUserPropertySet.Item(i).Value = prop_value&lt;BR /&gt;
&lt;BR /&gt;
 Next i&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
*******************************************************************************&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;/SENDMAIL&gt;&lt;/SENDMAIL&gt;</description>
      <pubDate>Mon, 12 Feb 2007 18:34:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885436#M155590</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-12T18:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885437#M155591</link>
      <description>Hi Brian,&lt;BR /&gt;
&lt;BR /&gt;
I remember you saying at AU that most VBA should be put in an external &lt;BR /&gt;
project and not in a part file but for this program where would you put it &lt;BR /&gt;
and what needs to be changed in the code to allow it to be run upon a save &lt;BR /&gt;
(or update)?&lt;BR /&gt;
&lt;BR /&gt;
I guess what I am after is the VBA code that will save the two extent &lt;BR /&gt;
variables as length and width, be always up to date, and without any &lt;BR /&gt;
messagebox.  I would guess the code would have to be placed in the sheet &lt;BR /&gt;
metal template file to do this.  Am I correct?&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help,&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Brian Ekins (Autodesk)" &lt;BRIAN.EKINS&gt; wrote in message &lt;BR /&gt;
news:5483813@discussion.autodesk.com...&lt;BR /&gt;
The reason it fails for parts in an assembly is that the program is getting&lt;BR /&gt;
the active document.  Even though you've in-place activated a part, the&lt;BR /&gt;
assembly is still the active document.  Instead of using the ActiveDocument,&lt;BR /&gt;
you  should use the ActiveEditObject property instead.  This will return&lt;BR /&gt;
whatever object the end-user is currently editing.  This can be a document,&lt;BR /&gt;
sketch, or sheet.  In the case where a part is in-place activated, the part&lt;BR /&gt;
document is the active edit object since any edits made will take place&lt;BR /&gt;
within the part.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message&lt;BR /&gt;
news:5480280@discussion.autodesk.com...&lt;BR /&gt;
Also what do I have to change with the code to allow me to run it on parts&lt;BR /&gt;
that are in an assembly?  (It runs into errors unless I explicitly open the&lt;BR /&gt;
part in a separate window.)&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message&lt;BR /&gt;
news:5480176@discussion.autodesk.com...&lt;BR /&gt;
I cannot understand why Autodesk does not have the sheet metal extents and&lt;BR /&gt;
sheet metal style as parameters so we do not have to resort to VBA or&lt;BR /&gt;
addins.  (I know of the great program Yippee etc.)&lt;BR /&gt;
&lt;BR /&gt;
Anyways, I have included the code from someone at Autodesk for the length&lt;BR /&gt;
and width.  What I do not understand is where to put this code so that it&lt;BR /&gt;
will be updated every time the sheet metal part is changed.  Is there a way&lt;BR /&gt;
to do this?  Do I place it in my sheet metal template file?  I am a little&lt;BR /&gt;
unclear as to where I put it.  Also does somebody have the code for the&lt;BR /&gt;
style?&lt;BR /&gt;
&lt;BR /&gt;
(I know how to put it in the template file and run the macro but it does not&lt;BR /&gt;
update unless this is done.)&lt;BR /&gt;
&lt;BR /&gt;
It has been a while since I have done any programming in VB and have never&lt;BR /&gt;
done any inside Inventor so any help on this would be greatly appreciated!.&lt;BR /&gt;
&lt;BR /&gt;
**************************************************************&lt;BR /&gt;
Public Sub extents_to_custom_props()&lt;BR /&gt;
   Dim objpartDoc As PartDocument&lt;BR /&gt;
&lt;BR /&gt;
    Set objpartDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
    Dim objCompDef As SheetMetalComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Set objCompDef = objpartDoc.ComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Dim fpBox As Variant&lt;BR /&gt;
&lt;BR /&gt;
    Set fpBox = objCompDef.FlatPattern.Body.RangeBox&lt;BR /&gt;
&lt;BR /&gt;
    Dim width As Double&lt;BR /&gt;
&lt;BR /&gt;
    Dim length As Double&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    length = fpBox.MaxPoint.X - fpBox.MinPoint.X&lt;BR /&gt;
&lt;BR /&gt;
    width = fpBox.MaxPoint.Y - fpBox.MinPoint.Y&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim objUOM As UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
    Set objUOM = objpartDoc.UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim strLength As String&lt;BR /&gt;
&lt;BR /&gt;
    Dim strWidth As String&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    strLength = objUOM.GetStringFromValue(length,&lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
    strWidth = objUOM.GetStringFromValue(width,&lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call MsgBox("Width = " + strWidth + vbCrLf + "Length = " + strLength,&lt;BR /&gt;
vbOKOnly, "Sheet Metal Flat Pattern")&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("width", strWidth)&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("length", strLength)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub Create_ext_prop(prop As String, prop_value As String)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dim opropsets As PropertySets&lt;BR /&gt;
&lt;BR /&gt;
Dim opropset As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
Dim oUserPropertySet As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Set opropsets = ThisApplication.ActiveDocument.PropertySets&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
For Each opropset In opropsets&lt;BR /&gt;
&lt;BR /&gt;
    If opropset.Name = "Inventor User Defined Properties" Then Set&lt;BR /&gt;
oUserPropertySet = opropset&lt;BR /&gt;
&lt;BR /&gt;
Next opropset&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
' If Property does not exist then add the new Property&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
        Call oUserPropertySet.Add(prop_value, prop)&lt;BR /&gt;
&lt;BR /&gt;
' Try to set the Property value if it already exists&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 For i = 1 To oUserPropertySet.Count&lt;BR /&gt;
&lt;BR /&gt;
   If oUserPropertySet.Item(i).Name = prop Then&lt;BR /&gt;
oUserPropertySet.Item(i).Value = prop_value&lt;BR /&gt;
&lt;BR /&gt;
 Next i&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
*******************************************************************************&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;/SENDMAIL&gt;&lt;/SENDMAIL&gt;&lt;/BRIAN.EKINS&gt;</description>
      <pubDate>Tue, 13 Feb 2007 19:05:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885437#M155591</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-13T19:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885438#M155592</link>
      <description>Rob&lt;BR /&gt;
&lt;BR /&gt;
IMO Best Option 1 is to make a Addin.  Best Option 2 is to use the &lt;BR /&gt;
VBAAutoMacros program found in the SDK folder&lt;BR /&gt;
&lt;BR /&gt;
Either way you are going to have to set up a OnSave event to fire your code.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
___________________&lt;BR /&gt;
Kent Keller&lt;BR /&gt;
www.kwikmcad.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message &lt;BR /&gt;
news:5485284@discussion.autodesk.com...&lt;BR /&gt;
Hi Brian,&lt;BR /&gt;
&lt;BR /&gt;
I remember you saying at AU that most VBA should be put in an external&lt;BR /&gt;
project and not in a part file but for this program where would you put it&lt;BR /&gt;
and what needs to be changed in the code to allow it to be run upon a save&lt;BR /&gt;
(or update)?&lt;BR /&gt;
&lt;BR /&gt;
I guess what I am after is the VBA code that will save the two extent&lt;BR /&gt;
variables as length and width, be always up to date, and without any&lt;BR /&gt;
messagebox.  I would guess the code would have to be placed in the sheet&lt;BR /&gt;
metal template file to do this.  Am I correct?&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help,&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Brian Ekins (Autodesk)" &lt;BRIAN.EKINS&gt; wrote in message&lt;BR /&gt;
news:5483813@discussion.autodesk.com...&lt;BR /&gt;
The reason it fails for parts in an assembly is that the program is getting&lt;BR /&gt;
the active document.  Even though you've in-place activated a part, the&lt;BR /&gt;
assembly is still the active document.  Instead of using the ActiveDocument,&lt;BR /&gt;
you  should use the ActiveEditObject property instead.  This will return&lt;BR /&gt;
whatever object the end-user is currently editing.  This can be a document,&lt;BR /&gt;
sketch, or sheet.  In the case where a part is in-place activated, the part&lt;BR /&gt;
document is the active edit object since any edits made will take place&lt;BR /&gt;
within the part.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message&lt;BR /&gt;
news:5480280@discussion.autodesk.com...&lt;BR /&gt;
Also what do I have to change with the code to allow me to run it on parts&lt;BR /&gt;
that are in an assembly?  (It runs into errors unless I explicitly open the&lt;BR /&gt;
part in a separate window.)&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message&lt;BR /&gt;
news:5480176@discussion.autodesk.com...&lt;BR /&gt;
I cannot understand why Autodesk does not have the sheet metal extents and&lt;BR /&gt;
sheet metal style as parameters so we do not have to resort to VBA or&lt;BR /&gt;
addins.  (I know of the great program Yippee etc.)&lt;BR /&gt;
&lt;BR /&gt;
Anyways, I have included the code from someone at Autodesk for the length&lt;BR /&gt;
and width.  What I do not understand is where to put this code so that it&lt;BR /&gt;
will be updated every time the sheet metal part is changed.  Is there a way&lt;BR /&gt;
to do this?  Do I place it in my sheet metal template file?  I am a little&lt;BR /&gt;
unclear as to where I put it.  Also does somebody have the code for the&lt;BR /&gt;
style?&lt;BR /&gt;
&lt;BR /&gt;
(I know how to put it in the template file and run the macro but it does not&lt;BR /&gt;
update unless this is done.)&lt;BR /&gt;
&lt;BR /&gt;
It has been a while since I have done any programming in VB and have never&lt;BR /&gt;
done any inside Inventor so any help on this would be greatly appreciated!.&lt;BR /&gt;
&lt;BR /&gt;
**************************************************************&lt;BR /&gt;
Public Sub extents_to_custom_props()&lt;BR /&gt;
   Dim objpartDoc As PartDocument&lt;BR /&gt;
&lt;BR /&gt;
    Set objpartDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
    Dim objCompDef As SheetMetalComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Set objCompDef = objpartDoc.ComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Dim fpBox As Variant&lt;BR /&gt;
&lt;BR /&gt;
    Set fpBox = objCompDef.FlatPattern.Body.RangeBox&lt;BR /&gt;
&lt;BR /&gt;
    Dim width As Double&lt;BR /&gt;
&lt;BR /&gt;
    Dim length As Double&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    length = fpBox.MaxPoint.X - fpBox.MinPoint.X&lt;BR /&gt;
&lt;BR /&gt;
    width = fpBox.MaxPoint.Y - fpBox.MinPoint.Y&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim objUOM As UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
    Set objUOM = objpartDoc.UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim strLength As String&lt;BR /&gt;
&lt;BR /&gt;
    Dim strWidth As String&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    strLength = objUOM.GetStringFromValue(length,&lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
    strWidth = objUOM.GetStringFromValue(width,&lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call MsgBox("Width = " + strWidth + vbCrLf + "Length = " + strLength,&lt;BR /&gt;
vbOKOnly, "Sheet Metal Flat Pattern")&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("width", strWidth)&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("length", strLength)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub Create_ext_prop(prop As String, prop_value As String)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dim opropsets As PropertySets&lt;BR /&gt;
&lt;BR /&gt;
Dim opropset As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
Dim oUserPropertySet As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Set opropsets = ThisApplication.ActiveDocument.PropertySets&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
For Each opropset In opropsets&lt;BR /&gt;
&lt;BR /&gt;
    If opropset.Name = "Inventor User Defined Properties" Then Set&lt;BR /&gt;
oUserPropertySet = opropset&lt;BR /&gt;
&lt;BR /&gt;
Next opropset&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
' If Property does not exist then add the new Property&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
        Call oUserPropertySet.Add(prop_value, prop)&lt;BR /&gt;
&lt;BR /&gt;
' Try to set the Property value if it already exists&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 For i = 1 To oUserPropertySet.Count&lt;BR /&gt;
&lt;BR /&gt;
   If oUserPropertySet.Item(i).Name = prop Then&lt;BR /&gt;
oUserPropertySet.Item(i).Value = prop_value&lt;BR /&gt;
&lt;BR /&gt;
 Next i&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
*******************************************************************************&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;/SENDMAIL&gt;&lt;/SENDMAIL&gt;&lt;/BRIAN.EKINS&gt;&lt;/SENDMAIL&gt;</description>
      <pubDate>Tue, 13 Feb 2007 19:58:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885438#M155592</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-13T19:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885439#M155593</link>
      <description>I agree with Kent.  Those are the two options.&lt;BR /&gt;
&lt;BR /&gt;
Everything gets a little more complicated when you need to program some &lt;BR /&gt;
associativity, which is what you're doing in this case.  You want the &lt;BR /&gt;
parameters or properties to be associated with the extent of the flat. &lt;BR /&gt;
Basically, you want something to update in reaction to a change to something &lt;BR /&gt;
else.  To do this you need a program to be watching for the change and then &lt;BR /&gt;
recompute the dependencies.  In your case a slightly delayed associativity &lt;BR /&gt;
may be ok and you can listen to the event that notifies you when the &lt;BR /&gt;
document is saved and update the data then.  The alternative is to watch for &lt;BR /&gt;
whenever the model changes and update with each change.&lt;BR /&gt;
&lt;BR /&gt;
Add-Ins are much better suited for this than VBA macros, but it is possible &lt;BR /&gt;
using VBA.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
&lt;BR /&gt;
"Kent Keller" &lt;KENTKSTROBEDATA.COM add="" the=""&gt; wrote in message &lt;BR /&gt;
news:5485372@discussion.autodesk.com...&lt;BR /&gt;
Rob&lt;BR /&gt;
&lt;BR /&gt;
IMO Best Option 1 is to make a Addin.  Best Option 2 is to use the&lt;BR /&gt;
VBAAutoMacros program found in the SDK folder&lt;BR /&gt;
&lt;BR /&gt;
Either way you are going to have to set up a OnSave event to fire your code.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
___________________&lt;BR /&gt;
Kent Keller&lt;BR /&gt;
www.kwikmcad.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message&lt;BR /&gt;
news:5485284@discussion.autodesk.com...&lt;BR /&gt;
Hi Brian,&lt;BR /&gt;
&lt;BR /&gt;
I remember you saying at AU that most VBA should be put in an external&lt;BR /&gt;
project and not in a part file but for this program where would you put it&lt;BR /&gt;
and what needs to be changed in the code to allow it to be run upon a save&lt;BR /&gt;
(or update)?&lt;BR /&gt;
&lt;BR /&gt;
I guess what I am after is the VBA code that will save the two extent&lt;BR /&gt;
variables as length and width, be always up to date, and without any&lt;BR /&gt;
messagebox.  I would guess the code would have to be placed in the sheet&lt;BR /&gt;
metal template file to do this.  Am I correct?&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help,&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Brian Ekins (Autodesk)" &lt;BRIAN.EKINS&gt; wrote in message&lt;BR /&gt;
news:5483813@discussion.autodesk.com...&lt;BR /&gt;
The reason it fails for parts in an assembly is that the program is getting&lt;BR /&gt;
the active document.  Even though you've in-place activated a part, the&lt;BR /&gt;
assembly is still the active document.  Instead of using the ActiveDocument,&lt;BR /&gt;
you  should use the ActiveEditObject property instead.  This will return&lt;BR /&gt;
whatever object the end-user is currently editing.  This can be a document,&lt;BR /&gt;
sketch, or sheet.  In the case where a part is in-place activated, the part&lt;BR /&gt;
document is the active edit object since any edits made will take place&lt;BR /&gt;
within the part.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message&lt;BR /&gt;
news:5480280@discussion.autodesk.com...&lt;BR /&gt;
Also what do I have to change with the code to allow me to run it on parts&lt;BR /&gt;
that are in an assembly?  (It runs into errors unless I explicitly open the&lt;BR /&gt;
part in a separate window.)&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message&lt;BR /&gt;
news:5480176@discussion.autodesk.com...&lt;BR /&gt;
I cannot understand why Autodesk does not have the sheet metal extents and&lt;BR /&gt;
sheet metal style as parameters so we do not have to resort to VBA or&lt;BR /&gt;
addins.  (I know of the great program Yippee etc.)&lt;BR /&gt;
&lt;BR /&gt;
Anyways, I have included the code from someone at Autodesk for the length&lt;BR /&gt;
and width.  What I do not understand is where to put this code so that it&lt;BR /&gt;
will be updated every time the sheet metal part is changed.  Is there a way&lt;BR /&gt;
to do this?  Do I place it in my sheet metal template file?  I am a little&lt;BR /&gt;
unclear as to where I put it.  Also does somebody have the code for the&lt;BR /&gt;
style?&lt;BR /&gt;
&lt;BR /&gt;
(I know how to put it in the template file and run the macro but it does not&lt;BR /&gt;
update unless this is done.)&lt;BR /&gt;
&lt;BR /&gt;
It has been a while since I have done any programming in VB and have never&lt;BR /&gt;
done any inside Inventor so any help on this would be greatly appreciated!.&lt;BR /&gt;
&lt;BR /&gt;
**************************************************************&lt;BR /&gt;
Public Sub extents_to_custom_props()&lt;BR /&gt;
   Dim objpartDoc As PartDocument&lt;BR /&gt;
&lt;BR /&gt;
    Set objpartDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
    Dim objCompDef As SheetMetalComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Set objCompDef = objpartDoc.ComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Dim fpBox As Variant&lt;BR /&gt;
&lt;BR /&gt;
    Set fpBox = objCompDef.FlatPattern.Body.RangeBox&lt;BR /&gt;
&lt;BR /&gt;
    Dim width As Double&lt;BR /&gt;
&lt;BR /&gt;
    Dim length As Double&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    length = fpBox.MaxPoint.X - fpBox.MinPoint.X&lt;BR /&gt;
&lt;BR /&gt;
    width = fpBox.MaxPoint.Y - fpBox.MinPoint.Y&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim objUOM As UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
    Set objUOM = objpartDoc.UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim strLength As String&lt;BR /&gt;
&lt;BR /&gt;
    Dim strWidth As String&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    strLength = objUOM.GetStringFromValue(length,&lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
    strWidth = objUOM.GetStringFromValue(width,&lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call MsgBox("Width = " + strWidth + vbCrLf + "Length = " + strLength,&lt;BR /&gt;
vbOKOnly, "Sheet Metal Flat Pattern")&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("width", strWidth)&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("length", strLength)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub Create_ext_prop(prop As String, prop_value As String)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dim opropsets As PropertySets&lt;BR /&gt;
&lt;BR /&gt;
Dim opropset As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
Dim oUserPropertySet As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Set opropsets = ThisApplication.ActiveDocument.PropertySets&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
For Each opropset In opropsets&lt;BR /&gt;
&lt;BR /&gt;
    If opropset.Name = "Inventor User Defined Properties" Then Set&lt;BR /&gt;
oUserPropertySet = opropset&lt;BR /&gt;
&lt;BR /&gt;
Next opropset&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
' If Property does not exist then add the new Property&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
        Call oUserPropertySet.Add(prop_value, prop)&lt;BR /&gt;
&lt;BR /&gt;
' Try to set the Property value if it already exists&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 For i = 1 To oUserPropertySet.Count&lt;BR /&gt;
&lt;BR /&gt;
   If oUserPropertySet.Item(i).Name = prop Then&lt;BR /&gt;
oUserPropertySet.Item(i).Value = prop_value&lt;BR /&gt;
&lt;BR /&gt;
 Next i&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
*******************************************************************************&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;/SENDMAIL&gt;&lt;/SENDMAIL&gt;&lt;/BRIAN.EKINS&gt;&lt;/SENDMAIL&gt;&lt;/KENTKSTROBEDATA.COM&gt;</description>
      <pubDate>Tue, 13 Feb 2007 20:20:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885439#M155593</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-13T20:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885440#M155594</link>
      <description>Hi Brian,&lt;BR /&gt;
&lt;BR /&gt;
I did not realize that I can search for older posts on the web side of the &lt;BR /&gt;
newsgroup - duhhh.  I found a reply from you in 2002 that has exactly what I &lt;BR /&gt;
am looking for. &lt;BR /&gt;
http://discussion1.autodesk.com/thread.jspa?messageID=1071518  It seems to &lt;BR /&gt;
work perfectly fine on Inventor 11.  I have placed it in my sheet metal &lt;BR /&gt;
template.  Is there any reason I should not be doing it this way?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Brian Ekins (Autodesk)" &lt;BRIAN.EKINS&gt; wrote in message &lt;BR /&gt;
news:5485402@discussion.autodesk.com...&lt;BR /&gt;
I agree with Kent.  Those are the two options.&lt;BR /&gt;
&lt;BR /&gt;
Everything gets a little more complicated when you need to program some&lt;BR /&gt;
associativity, which is what you're doing in this case.  You want the&lt;BR /&gt;
parameters or properties to be associated with the extent of the flat.&lt;BR /&gt;
Basically, you want something to update in reaction to a change to something&lt;BR /&gt;
else.  To do this you need a program to be watching for the change and then&lt;BR /&gt;
recompute the dependencies.  In your case a slightly delayed associativity&lt;BR /&gt;
may be ok and you can listen to the event that notifies you when the&lt;BR /&gt;
document is saved and update the data then.  The alternative is to watch for&lt;BR /&gt;
whenever the model changes and update with each change.&lt;BR /&gt;
&lt;BR /&gt;
Add-Ins are much better suited for this than VBA macros, but it is possible&lt;BR /&gt;
using VBA.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
&lt;BR /&gt;
"Kent Keller" &lt;KENTKSTROBEDATA.COM add="" the=""&gt; wrote in message&lt;BR /&gt;
news:5485372@discussion.autodesk.com...&lt;BR /&gt;
Rob&lt;BR /&gt;
&lt;BR /&gt;
IMO Best Option 1 is to make a Addin.  Best Option 2 is to use the&lt;BR /&gt;
VBAAutoMacros program found in the SDK folder&lt;BR /&gt;
&lt;BR /&gt;
Either way you are going to have to set up a OnSave event to fire your code.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
___________________&lt;BR /&gt;
Kent Keller&lt;BR /&gt;
www.kwikmcad.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message&lt;BR /&gt;
news:5485284@discussion.autodesk.com...&lt;BR /&gt;
Hi Brian,&lt;BR /&gt;
&lt;BR /&gt;
I remember you saying at AU that most VBA should be put in an external&lt;BR /&gt;
project and not in a part file but for this program where would you put it&lt;BR /&gt;
and what needs to be changed in the code to allow it to be run upon a save&lt;BR /&gt;
(or update)?&lt;BR /&gt;
&lt;BR /&gt;
I guess what I am after is the VBA code that will save the two extent&lt;BR /&gt;
variables as length and width, be always up to date, and without any&lt;BR /&gt;
messagebox.  I would guess the code would have to be placed in the sheet&lt;BR /&gt;
metal template file to do this.  Am I correct?&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help,&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Brian Ekins (Autodesk)" &lt;BRIAN.EKINS&gt; wrote in message&lt;BR /&gt;
news:5483813@discussion.autodesk.com...&lt;BR /&gt;
The reason it fails for parts in an assembly is that the program is getting&lt;BR /&gt;
the active document.  Even though you've in-place activated a part, the&lt;BR /&gt;
assembly is still the active document.  Instead of using the ActiveDocument,&lt;BR /&gt;
you  should use the ActiveEditObject property instead.  This will return&lt;BR /&gt;
whatever object the end-user is currently editing.  This can be a document,&lt;BR /&gt;
sketch, or sheet.  In the case where a part is in-place activated, the part&lt;BR /&gt;
document is the active edit object since any edits made will take place&lt;BR /&gt;
within the part.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message&lt;BR /&gt;
news:5480280@discussion.autodesk.com...&lt;BR /&gt;
Also what do I have to change with the code to allow me to run it on parts&lt;BR /&gt;
that are in an assembly?  (It runs into errors unless I explicitly open the&lt;BR /&gt;
part in a separate window.)&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message&lt;BR /&gt;
news:5480176@discussion.autodesk.com...&lt;BR /&gt;
I cannot understand why Autodesk does not have the sheet metal extents and&lt;BR /&gt;
sheet metal style as parameters so we do not have to resort to VBA or&lt;BR /&gt;
addins.  (I know of the great program Yippee etc.)&lt;BR /&gt;
&lt;BR /&gt;
Anyways, I have included the code from someone at Autodesk for the length&lt;BR /&gt;
and width.  What I do not understand is where to put this code so that it&lt;BR /&gt;
will be updated every time the sheet metal part is changed.  Is there a way&lt;BR /&gt;
to do this?  Do I place it in my sheet metal template file?  I am a little&lt;BR /&gt;
unclear as to where I put it.  Also does somebody have the code for the&lt;BR /&gt;
style?&lt;BR /&gt;
&lt;BR /&gt;
(I know how to put it in the template file and run the macro but it does not&lt;BR /&gt;
update unless this is done.)&lt;BR /&gt;
&lt;BR /&gt;
It has been a while since I have done any programming in VB and have never&lt;BR /&gt;
done any inside Inventor so any help on this would be greatly appreciated!.&lt;BR /&gt;
&lt;BR /&gt;
**************************************************************&lt;BR /&gt;
Public Sub extents_to_custom_props()&lt;BR /&gt;
   Dim objpartDoc As PartDocument&lt;BR /&gt;
&lt;BR /&gt;
    Set objpartDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
    Dim objCompDef As SheetMetalComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Set objCompDef = objpartDoc.ComponentDefinition&lt;BR /&gt;
&lt;BR /&gt;
    Dim fpBox As Variant&lt;BR /&gt;
&lt;BR /&gt;
    Set fpBox = objCompDef.FlatPattern.Body.RangeBox&lt;BR /&gt;
&lt;BR /&gt;
    Dim width As Double&lt;BR /&gt;
&lt;BR /&gt;
    Dim length As Double&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    length = fpBox.MaxPoint.X - fpBox.MinPoint.X&lt;BR /&gt;
&lt;BR /&gt;
    width = fpBox.MaxPoint.Y - fpBox.MinPoint.Y&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim objUOM As UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
    Set objUOM = objpartDoc.UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Dim strLength As String&lt;BR /&gt;
&lt;BR /&gt;
    Dim strWidth As String&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    strLength = objUOM.GetStringFromValue(length,&lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
    strWidth = objUOM.GetStringFromValue(width,&lt;BR /&gt;
UnitsTypeEnum.kDefaultDisplayLengthUnits)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call MsgBox("Width = " + strWidth + vbCrLf + "Length = " + strLength,&lt;BR /&gt;
vbOKOnly, "Sheet Metal Flat Pattern")&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("width", strWidth)&lt;BR /&gt;
&lt;BR /&gt;
    Call Create_ext_prop("length", strLength)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sub Create_ext_prop(prop As String, prop_value As String)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dim opropsets As PropertySets&lt;BR /&gt;
&lt;BR /&gt;
Dim opropset As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
Dim oUserPropertySet As PropertySet&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Set opropsets = ThisApplication.ActiveDocument.PropertySets&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
For Each opropset In opropsets&lt;BR /&gt;
&lt;BR /&gt;
    If opropset.Name = "Inventor User Defined Properties" Then Set&lt;BR /&gt;
oUserPropertySet = opropset&lt;BR /&gt;
&lt;BR /&gt;
Next opropset&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
' If Property does not exist then add the new Property&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
        Call oUserPropertySet.Add(prop_value, prop)&lt;BR /&gt;
&lt;BR /&gt;
' Try to set the Property value if it already exists&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 For i = 1 To oUserPropertySet.Count&lt;BR /&gt;
&lt;BR /&gt;
   If oUserPropertySet.Item(i).Name = prop Then&lt;BR /&gt;
oUserPropertySet.Item(i).Value = prop_value&lt;BR /&gt;
&lt;BR /&gt;
 Next i&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
*******************************************************************************&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;/SENDMAIL&gt;&lt;/SENDMAIL&gt;&lt;/BRIAN.EKINS&gt;&lt;/SENDMAIL&gt;&lt;/KENTKSTROBEDATA.COM&gt;&lt;/BRIAN.EKINS&gt;</description>
      <pubDate>Fri, 16 Feb 2007 00:37:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885440#M155594</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-16T00:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885441#M155595</link>
      <description>This does work but I wouldn't recommend this approach anymore.  VBA projects &lt;BR /&gt;
that live in the Inventor documents have caused some problems in the past. &lt;BR /&gt;
Primarily when you use these parts in assemblies.  If you have a lot of &lt;BR /&gt;
parts open that contain VBA macros you can exceed some VBA resources.&lt;BR /&gt;
&lt;BR /&gt;
There are two other approaches.  One is to write an Add-In that does the &lt;BR /&gt;
equivalent.  The second is to use an existing Add-In that will execute a &lt;BR /&gt;
macro in your application VBA project.  I've attached an Add-In and a sample &lt;BR /&gt;
macro that demonstrates this.  It currently writes out some mass property &lt;BR /&gt;
information to an iProperty when a document is saved, but it could easily be &lt;BR /&gt;
modifed to write out the sheet metal extents.  If you have trouble figuring &lt;BR /&gt;
it out, let me know and I can make the changes to do this.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API</description>
      <pubDate>Fri, 16 Feb 2007 02:13:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885441#M155595</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-16T02:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885442#M155596</link>
      <description>Hi Brian,&lt;BR /&gt;
&lt;BR /&gt;
I would very much appreciate if you could make the changes to do this for &lt;BR /&gt;
me.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Brian Ekins (Autodesk)" &lt;BRIAN.EKINS&gt; wrote in message &lt;BR /&gt;
news:5488877@discussion.autodesk.com...&lt;BR /&gt;
This does work but I wouldn't recommend this approach anymore.  VBA projects&lt;BR /&gt;
that live in the Inventor documents have caused some problems in the past.&lt;BR /&gt;
Primarily when you use these parts in assemblies.  If you have a lot of&lt;BR /&gt;
parts open that contain VBA macros you can exceed some VBA resources.&lt;BR /&gt;
&lt;BR /&gt;
There are two other approaches.  One is to write an Add-In that does the&lt;BR /&gt;
equivalent.  The second is to use an existing Add-In that will execute a&lt;BR /&gt;
macro in your application VBA project.  I&lt;BR /&gt;
've attached an Add-In and a sample&lt;BR /&gt;
macro that demonstrates this.  It currently writes out some mass property&lt;BR /&gt;
information to an iProperty when a document is saved, but it could easily be&lt;BR /&gt;
modifed to write out the sheet metal extents.  If you have trouble figuring&lt;BR /&gt;
it out, let me know and I can make the changes to do this.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;/BRIAN.EKINS&gt;</description>
      <pubDate>Wed, 21 Feb 2007 20:09:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885442#M155596</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-21T20:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885443#M155597</link>
      <description>Hi Brian,&lt;BR /&gt;
&lt;BR /&gt;
I have tried to do some more investigation into this and have installed the &lt;BR /&gt;
automacros but do not see or understand where the program is located that &lt;BR /&gt;
writes out the mass property - is this included?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Brian Ekins (Autodesk)" &lt;BRIAN.EKINS&gt; wrote in message &lt;BR /&gt;
news:5488877@discussion.autodesk.com...&lt;BR /&gt;
This does work but I wouldn't recommend this approach anymore.  VBA projects&lt;BR /&gt;
that live in the Inventor documents have caused some problems in the past.&lt;BR /&gt;
Primarily when you use these parts in assemblies.  If you have a lot of&lt;BR /&gt;
parts open that contain VBA macros you can exceed some VBA resources.&lt;BR /&gt;
&lt;BR /&gt;
There are two other approaches.  One is to write an Add-In that does the&lt;BR /&gt;
equivalent.  The second is to use an existing Add-In that will execute a&lt;BR /&gt;
macro in your application VBA project.  I&lt;BR /&gt;
've attached an Add-In and a sample&lt;BR /&gt;
macro that demonstrates this.  It currently writes out some mass property&lt;BR /&gt;
information to an iProperty when a document is saved, but it could easily be&lt;BR /&gt;
modifed to write out the sheet metal extents.  If you have trouble figuring&lt;BR /&gt;
it out, let me know and I can make the changes to do this.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;/BRIAN.EKINS&gt;</description>
      <pubDate>Fri, 23 Mar 2007 22:39:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885443#M155597</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-23T22:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885444#M155598</link>
      <description>This request has come up several times so I decided it was probably best to &lt;BR /&gt;
just go ahead and write and Add-In that does this.  The attached zip file &lt;BR /&gt;
contains the Add-In and the VB 6 source code.  I've done some testing but &lt;BR /&gt;
I'll be happy to fix any problems that you find.  Here are the contents of &lt;BR /&gt;
the readme file that describes the Add-In.&lt;BR /&gt;
&lt;BR /&gt;
** Description&lt;BR /&gt;
This is an Add-In that when installed will automatically create and update &lt;BR /&gt;
three custom iProperties.  It should work for Inventor version 10 and later. &lt;BR /&gt;
The iProperties created are:&lt;BR /&gt;
&lt;BR /&gt;
SheetMetalLength - The length of the sheet metal flat pattern.&lt;BR /&gt;
SheetMetalWidth - The width of the sheet metal flat pattern.&lt;BR /&gt;
SheetMetalStyle - The active sheet metal style.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
** Installation&lt;BR /&gt;
Unzip the files anywhere on your computer, make sure Inventor is not running &lt;BR /&gt;
and run the Register.bat file.  When you run Inventor you should now see &lt;BR /&gt;
"Sheet Metal Extents" listed as a loaded Add-In.  To uninstall, run &lt;BR /&gt;
UnRegister.bat.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message &lt;BR /&gt;
news:5529514@discussion.autodesk.com...&lt;BR /&gt;
Hi Brian,&lt;BR /&gt;
&lt;BR /&gt;
I have tried to do some more investigation into this and have installed the&lt;BR /&gt;
automacros but do not see or understand where the program is located that&lt;BR /&gt;
writes out the mass property - is this included?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Brian Ekins (Autodesk)" &lt;BRIAN.EKINS&gt; wrote in message&lt;BR /&gt;
news:5488877@discussion.autodesk.com...&lt;BR /&gt;
This does work but I wouldn't recommend this approach anymore.  VBA projects&lt;BR /&gt;
that live in the Inventor documents have caused some problems in the past.&lt;BR /&gt;
Primarily when you use these parts in assemblies.  If you have a lot of&lt;BR /&gt;
parts open that contain VBA macros you can exceed some VBA resources.&lt;BR /&gt;
&lt;BR /&gt;
There are two other approaches.  One is to write an Add-In that does the&lt;BR /&gt;
equivalent.  The second is to use an existing Add-In that will execute a&lt;BR /&gt;
macro in your application VBA project.  I&lt;BR /&gt;
've attached an Add-In and a sample&lt;BR /&gt;
macro that demonstrates this.  It currently writes out some mass property&lt;BR /&gt;
information to an iProperty when a document is saved, but it could easily be&lt;BR /&gt;
modifed to write out the sheet metal extents.  If you have trouble figuring&lt;BR /&gt;
it out, let me know and I can make the changes to do this.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;/BRIAN.EKINS&gt;&lt;/SENDMAIL&gt;</description>
      <pubDate>Mon, 26 Mar 2007 20:36:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885444#M155598</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-26T20:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885445#M155599</link>
      <description>Thanks Brian - look forward to using it!!!!  I'll let you know if I come up &lt;BR /&gt;
against any issues.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Brian Ekins (Autodesk)" &lt;BRIAN.EKINS&gt; wrote in message &lt;BR /&gt;
news:5531286@discussion.autodesk.com...&lt;BR /&gt;
This request has come up several times so I decided it was probably best to&lt;BR /&gt;
just go ahead and write and Add-In that does this.  The attached zip file&lt;BR /&gt;
contains the Add-In and the VB 6 source code.  I've done some testing but&lt;BR /&gt;
I'll be happy to fix any problems that you find.  Here are the contents of&lt;BR /&gt;
the readme file that describes the Add-In.&lt;BR /&gt;
&lt;BR /&gt;
** Description&lt;BR /&gt;
This is an Add-In that when installed will automatically create and update&lt;BR /&gt;
three custom iProperties.  It should wo&lt;BR /&gt;
rk for Inventor version 10 and later&lt;BR /&gt;
The iProperties created are:&lt;BR /&gt;
&lt;BR /&gt;
SheetMetalLength - The length of the sheet metal flat pattern.&lt;BR /&gt;
SheetMetalWidth - The width of the sheet metal flat pattern.&lt;BR /&gt;
SheetMetalStyle - The active sheet metal style.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
** Installation&lt;BR /&gt;
Unzip the files anywhere on your computer, make sure Inventor is not running&lt;BR /&gt;
and run the Register.bat file.  When you run Inventor you should now see&lt;BR /&gt;
"Sheet Metal Extents" listed as a loaded Add-In.  To uninstall, run&lt;BR /&gt;
UnRe&lt;BR /&gt;
gister.bat.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message&lt;BR /&gt;
news:5529514@discussion.autodesk.com...&lt;BR /&gt;
Hi Brian,&lt;BR /&gt;
&lt;BR /&gt;
I have tried to do some more investigation into this and have installed the&lt;BR /&gt;
automacros but do not see or understand where the program is located that&lt;BR /&gt;
writes out the mass property - is this included?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Brian Ekins (Autodesk)" &lt;BRIAN.EKINS&gt; wrote in messag&lt;BR /&gt;
e&lt;BR /&gt;
news:5488877@discussion.autodesk.com...&lt;BR /&gt;
This does work but I wouldn't recommend this approach anymore.  VBA projects&lt;BR /&gt;
that live in the Inventor documents have caused some problems in the past.&lt;BR /&gt;
Primarily when you use these parts in assemblies.  If you have a lot of&lt;BR /&gt;
parts open that contain VBA macros you can exceed some VBA resources.&lt;BR /&gt;
&lt;BR /&gt;
There are two other approaches.  One is to write an Add-In that does the&lt;BR /&gt;
equivalent.  The second is to use an existing Add-In that will execute a&lt;BR /&gt;
macro in your a&lt;BR /&gt;
pplication VBA project.  I&lt;BR /&gt;
've attached an Add-In and a sample&lt;BR /&gt;
macro that demonstrates this.  It currently writes out some mass property&lt;BR /&gt;
information to an iProperty when a document is saved, but it could easily be&lt;BR /&gt;
modifed to write out the sheet metal extents.  If you have trouble figuring&lt;BR /&gt;
it out, let me know and I can make the changes to do this.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;/BRIAN.EKINS&gt;&lt;/SENDMAIL&gt;&lt;/BRIAN.EKINS&gt;</description>
      <pubDate>Mon, 26 Mar 2007 23:41:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885445#M155599</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-26T23:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885446#M155600</link>
      <description>Been using it every day.  I love it!&lt;BR /&gt;
&lt;BR /&gt;
Have had a few crashes lately when switching between sheet metal and &lt;BR /&gt;
modelling and then performing some additional commands but may be totally &lt;BR /&gt;
unrelated as I cannot reproduce.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message &lt;BR /&gt;
news:5531459@discussion.autodesk.com...&lt;BR /&gt;
Thanks Brian - look forward to using it!!!!  I'll let you know if I come up&lt;BR /&gt;
against any issues.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Brian Ekins (Autodesk)" &lt;BRIAN.EKINS&gt; wrote in message&lt;BR /&gt;
news:5531286@discussion.autodesk.com...&lt;BR /&gt;
This request has come up several times so I decided it was probably best to&lt;BR /&gt;
just go ahead and write and Add-In that does this.  The attached zip file&lt;BR /&gt;
contains the Add-In and the VB 6 source code.  I've done some testing but&lt;BR /&gt;
I'll be happy to fix any problems that you find.  Here are the contents of&lt;BR /&gt;
the readme file that describes the Add-In.&lt;BR /&gt;
&lt;BR /&gt;
** Description&lt;BR /&gt;
This is an Add-In that when installed will automatically create and update&lt;BR /&gt;
three custom iProperties.  It should wo&lt;BR /&gt;
rk for Inventor version 10 and later&lt;BR /&gt;
The iProperties created are:&lt;BR /&gt;
&lt;BR /&gt;
SheetMetalLength - The length of the sheet metal flat pattern.&lt;BR /&gt;
SheetMetalWidth - The width of the sheet metal flat pattern.&lt;BR /&gt;
SheetMetalStyle - The active sheet metal style.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
** Installation&lt;BR /&gt;
Unzip the files anywhere on your computer, make sure Inventor is not running&lt;BR /&gt;
and run the Register.bat file.  When you run Inventor you should now see&lt;BR /&gt;
"Sheet Metal Extents" listed as a loaded Add-In.  To uninstall, run&lt;BR /&gt;
UnRe&lt;BR /&gt;
gister.bat.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"RobV" &lt;SENDMAIL&gt; wrote in message&lt;BR /&gt;
news:5529514@discussion.autodesk.com...&lt;BR /&gt;
Hi Brian,&lt;BR /&gt;
&lt;BR /&gt;
I have tried to do some more investigation into this and have installed the&lt;BR /&gt;
automacros but do not see or understand where the program is located that&lt;BR /&gt;
writes out the mass property - is this included?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Brian Ekins (Autodesk)" &lt;BRIAN.EKINS&gt; wrote in messag&lt;BR /&gt;
e&lt;BR /&gt;
news:5488877@discussion.autodesk.com...&lt;BR /&gt;
This does work but I wouldn't recommend this approach anymore.  VBA projects&lt;BR /&gt;
that live in the Inventor documents have caused some problems in the past.&lt;BR /&gt;
Primarily when you use these parts in assemblies.  If you have a lot of&lt;BR /&gt;
parts open that contain VBA macros you can exceed some VBA resources.&lt;BR /&gt;
&lt;BR /&gt;
There are two other approaches.  One is to write an Add-In that does the&lt;BR /&gt;
equivalent.  The second is to use an existing Add-In that will execute a&lt;BR /&gt;
macro in your a&lt;BR /&gt;
pplication VBA project.  I&lt;BR /&gt;
've attached an Add-In and a sample&lt;BR /&gt;
macro that demonstrates this.  It currently writes out some mass property&lt;BR /&gt;
information to an iProperty when a document is saved, but it could easily be&lt;BR /&gt;
modifed to write out the sheet metal extents.  If you have trouble figuring&lt;BR /&gt;
it out, let me know and I can make the changes to do this.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;/BRIAN.EKINS&gt;&lt;/SENDMAIL&gt;&lt;/BRIAN.EKINS&gt;&lt;/SENDMAIL&gt;</description>
      <pubDate>Wed, 04 Apr 2007 22:20:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885446#M155600</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-04-04T22:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885447#M155601</link>
      <description>I'm glad it's working.  If anyone finds any reproducable problems I'll be &lt;BR /&gt;
happy to take a look at them and fix the program.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API</description>
      <pubDate>Wed, 04 Apr 2007 23:33:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885447#M155601</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-04-04T23:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885448#M155602</link>
      <description>Brian, This is excellent. &lt;BR /&gt;
&lt;BR /&gt;
But do you think you could extend your addin to also work on non-sheetmetal parts?&lt;BR /&gt;
&lt;BR /&gt;
I would think it could be easy to add three more custom parameters with the total length of a parts bounding box. Something like TotX, TotY and TotZ.&lt;BR /&gt;
&lt;BR /&gt;
This would be great to use in property expressions on parts like plates, beams etc. If defined in a templatefile this would give us fully automatic BOM-info.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I have previously done something like this with VBA using the following code (I think I may have gotten it from you in the first place):&lt;BR /&gt;
&lt;BR /&gt;
--------------------------------------------------------------&lt;BR /&gt;
'Get the RangeBox data of the primary solid body.&lt;BR /&gt;
'Die if solid body is not defined.&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
    Set oBox = oDoc.ComponentDefinition.SurfaceBodies.Item(1).RangeBox&lt;BR /&gt;
    If Err Then&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    On Error GoTo 0&lt;BR /&gt;
    Call oBox.GetBoxData(MinPoint, MaxPoint)&lt;BR /&gt;
&lt;BR /&gt;
'Calculate X,Y,Z displacement&lt;BR /&gt;
    For i = 1 To 3&lt;BR /&gt;
        dBlockSize(i) = MaxPoint(i) - MinPoint(i)&lt;BR /&gt;
    Next&lt;BR /&gt;
&lt;BR /&gt;
' Set a reference to the UnitsOfMeasure object of the active document.&lt;BR /&gt;
    Dim oUOM As UnitsOfMeasure&lt;BR /&gt;
    Set oUOM = ThisDocument.UnitsOfMeasure&lt;BR /&gt;
&lt;BR /&gt;
' Get the enum value that defines the current default length units.&lt;BR /&gt;
    Dim eLengthUnit As UnitsTypeEnum&lt;BR /&gt;
    eLengthUnit = oUOM.LengthUnits&lt;BR /&gt;
&lt;BR /&gt;
' Get the equivalent string of the enum value.&lt;BR /&gt;
    Dim sLengthUnit As String&lt;BR /&gt;
    sLengthUnit = oUOM.GetStringFromType(eLengthUnit)&lt;BR /&gt;
&lt;BR /&gt;
' Create a string array showing the X,Y,Z lengths in the current units.&lt;BR /&gt;
    Dim sBlockSize(1 To 3)&lt;BR /&gt;
    For i = 1 To 3&lt;BR /&gt;
        sBlockSize(i) = oUOM.GetStringFromValue(dBlockSize(i), sLengthUnit)&lt;BR /&gt;
    Next&lt;BR /&gt;
&lt;BR /&gt;
'Isolate numerical values and get units suffix&lt;BR /&gt;
    For i = 1 To 3&lt;BR /&gt;
        sTemp() = Split(sBlockSize(i), " ", 2, 1)&lt;BR /&gt;
        sValues(i) = sTemp(0)&lt;BR /&gt;
    Next&lt;BR /&gt;
&lt;BR /&gt;
    sValues(4) = sTemp(1)</description>
      <pubDate>Sat, 14 Apr 2007 14:19:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885448#M155602</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-04-14T14:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885449#M155603</link>
      <description>This addin is exactly what I have been looking for. I downloaded it, and it works fine.  However the are 3 items I do need the addin to do.  They are 1  Display fractional units. 2  Work in for an assembly. 3  Length &amp;amp; Width to up date if the flat pattern alignment is changed.  This sure would be nice if I could find such an addin.</description>
      <pubDate>Sat, 05 May 2007 21:16:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885449#M155603</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-05T21:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885450#M155604</link>
      <description>1. Just format the units in your partslist to fractional - no need to have &lt;BR /&gt;
the addin do it that I can see.&lt;BR /&gt;
2. Not sure what you mean by "work in for an assembly".&lt;BR /&gt;
3. Not sure why you would be changing the alignment.&lt;BR /&gt;
&lt;BR /&gt;
The code is there - you can add to it if you need.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
---------------&lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
ATI FireGL X2 AGP Pro&lt;BR /&gt;
Graphics Driver: 8.223.0.0&lt;BR /&gt;
(2 Monitors at 1280x1024)&lt;BR /&gt;
Using Direct 3D&lt;BR /&gt;
---------------&lt;BR /&gt;
&lt;JERR72&gt; wrote in message news:5576388@discussion.autodesk.com...&lt;BR /&gt;
This addin is exactly what I have been looking for. I downloaded it, and it &lt;BR /&gt;
works fine.  However the are 3 items I do need the addin to do.  They are 1 &lt;BR /&gt;
Display fractional units. 2  Work in for an assembly. 3  Length &amp;amp; Width to &lt;BR /&gt;
up date if the flat pattern alignment is changed.  This sure would be nice &lt;BR /&gt;
if I could find such an addin.&lt;/JERR72&gt;</description>
      <pubDate>Mon, 07 May 2007 17:25:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885450#M155604</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-07T17:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885451#M155605</link>
      <description>Sorry, I was asking if I have an assembly and I create a parts list for the entire assembly on one parts list, does this work.  I tried this on one assembly, but the addin only pick up the extents of one part.  As for the alignment, we work with stainless steel which does have grain direction.  The company policy is that the grain direction must be the first dimension listed, hence the alignment issue.</description>
      <pubDate>Tue, 08 May 2007 02:49:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885451#M155605</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-08T02:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885452#M155606</link>
      <description>It will work on the entire assembly if you indeed have flat patterns for all &lt;BR /&gt;
the parts and they are all checked out of the vault.  You may have to look &lt;BR /&gt;
at the code if you need specific width and length dimensions to change.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
---------------&lt;BR /&gt;
Rob&lt;BR /&gt;
Inventor 11 SP2 Build 344a&lt;BR /&gt;
Vault 5.0 Build 11.1.145.0&lt;BR /&gt;
ATI FireGL X2 AGP Pro&lt;BR /&gt;
Graphics Driver: 8.223.0.0&lt;BR /&gt;
(2 Monitors at 1280x1024)&lt;BR /&gt;
Using Direct 3D&lt;BR /&gt;
---------------&lt;BR /&gt;
&lt;JERR72&gt; wrote in message news:5578091@discussion.autodesk.com...&lt;BR /&gt;
Sorry, I was asking if I have an assembly and I create a parts list for the &lt;BR /&gt;
entire assembly on one parts list, does this work.  I tried this on one &lt;BR /&gt;
assembly, but the addin only pick up the extents of one part.  As for the &lt;BR /&gt;
alignment, we work with stainless steel which does have grain direction. &lt;BR /&gt;
The company policy is that the grain direction must be the first dimension &lt;BR /&gt;
listed, hence the alignment issue.&lt;/JERR72&gt;</description>
      <pubDate>Tue, 08 May 2007 19:03:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885452#M155606</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-08T19:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal Extents</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885453#M155607</link>
      <description>A simple solution without VBA is to create a sketch on one side of the part &amp;amp; "project flat pattern". These projected edges cannot be dimensioned so draw a rectangle and constrain to the outermost edges of the projection, then dimmension the rectangle. Go to the parameters and change the name to length &amp;amp; width (or whatever you use in the parts list). This parameter updates with any changes but, if you add a new feature such as an additional flange you need to repeat the process.</description>
      <pubDate>Tue, 08 May 2007 21:44:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/sheet-metal-extents/m-p/1885453#M155607</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-08T21:44:45Z</dc:date>
    </item>
  </channel>
</rss>

