<?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: Please look at this code in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358875#M149243</link>
    <description>&lt;DIV id="jive-html-wrapper-div"&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;I don't know about the recent changes to the &lt;BR /&gt;
forum.&amp;nbsp; I'm just a user of the forum like all of you.&amp;nbsp; What are you &lt;BR /&gt;
using the read the newsgroup?&amp;nbsp; I've inserted the code below that I added as &lt;BR /&gt;
an attachment before.&amp;nbsp; I'm using Outlook Express and have the format set to &lt;BR /&gt;
"Rich Text".&amp;nbsp; It looks good in my editor, we'll see what it looks like when &lt;BR /&gt;
I post it.&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Public Sub AutoSave()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim &lt;BR /&gt;
oFlatPattern As FlatPattern&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oFlatPattern = &lt;BR /&gt;
ThisDocument.ComponentDefinition.FlatPattern&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Check to see if the flat exists.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
If Not oFlatPattern Is Nothing &lt;BR /&gt;
Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Get the extent of the &lt;BR /&gt;
face.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oExtent As &lt;BR /&gt;
Box&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oExtent = &lt;BR /&gt;
oFlatPattern.Body.RangeBox&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Extract the width and length &lt;BR /&gt;
from the range.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dLength As &lt;BR /&gt;
Double&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dWidth As &lt;BR /&gt;
Double&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dMaxX As &lt;BR /&gt;
Double&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dMaxX = &lt;BR /&gt;
oExtent.MaxPoint.X&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dMinX As &lt;BR /&gt;
Double&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dMinX = &lt;BR /&gt;
oExtent.MinPoint.X&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dLength = dMaxX &lt;BR /&gt;
- dMinX&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dMaxY As &lt;BR /&gt;
Double&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dMaxY = &lt;BR /&gt;
oExtent.MaxPoint.Y&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dMinY As &lt;BR /&gt;
Double&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dMinY = &lt;BR /&gt;
oExtent.MinPoint.Y&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dWidth = dMaxY &lt;BR /&gt;
- dMinY&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Convert these values into the &lt;BR /&gt;
document units.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' This will result &lt;BR /&gt;
in strings that are identical&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' to &lt;BR /&gt;
the strings shown in the Extent &lt;BR /&gt;
dialog.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oUOM As &lt;BR /&gt;
UnitsOfMeasure&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oUOM = &lt;BR /&gt;
ThisDocument.UnitsOfMeasure&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim &lt;BR /&gt;
strWidth As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim strLength &lt;BR /&gt;
As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strWidth = &lt;BR /&gt;
oUOM.GetStringFromValue(dWidth, &lt;BR /&gt;
kDefaultDisplayLengthUnits)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
strLength = oUOM.GetStringFromValue(dLength, &lt;BR /&gt;
kDefaultDisplayLengthUnits)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Write these string as custom &lt;BR /&gt;
properties. If the properties already ' exist, then just update &lt;BR /&gt;
them.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oCustomPropSet As &lt;BR /&gt;
PropertySet&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oCustomPropSet = &lt;BR /&gt;
ThisDocument.PropertySets.Item("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strWidth = &lt;BR /&gt;
oCustomPropSet.Item("SheetMetal &lt;BR /&gt;
Width").Value&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err &lt;BR /&gt;
Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
Err.Clear&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
Call oCustomPropSet.Add(strWidth, "SheetMetal &lt;BR /&gt;
Width")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End &lt;BR /&gt;
If&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLength = &lt;BR /&gt;
oCustomPropSet.Item("SheetMetal &lt;BR /&gt;
Length").Value&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err &lt;BR /&gt;
Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
Err.Clear&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
Call oCustomPropSet.Add(strLength, "SheetMetal &lt;BR /&gt;
Length")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End &lt;BR /&gt;
If&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else ' The flat doesn't exist so delete the properties, &lt;BR /&gt;
if they exist.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error Resume &lt;BR /&gt;
Next&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oCustomPropSet = &lt;BR /&gt;
ThisDocument.PropertySets.Item("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
oCustomPropSet.Item("SheetMetal &lt;BR /&gt;
Width").Delete&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
oCustomPropSet.Item("SheetMetal Length").Delete&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End &lt;BR /&gt;
If&lt;BR /&gt;End Sub&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;BR /&gt;-- &lt;BR /&gt;Brian Ekins&lt;BR /&gt;Autodesk Inventor &lt;BR /&gt;
API&lt;BR /&gt;&lt;A&gt;&lt;BR /&gt;
href="http://blogs.autodesk.com/modthemachine"&amp;gt;http://blogs.autodesk.com/modthemachine&lt;/A&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Fri, 10 Oct 2008 14:43:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-10-10T14:43:25Z</dc:date>
    <item>
      <title>Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358865#M149233</link>
      <description>I copy/pasted this code to get sheet metal extents from a post but all the syntax is mashed together (tyvm Adesk). I tried to clean it up but I get errors upon debub. Can someone plz look at it &amp;amp; let me know what I missed?</description>
      <pubDate>Thu, 09 Oct 2008 18:32:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358865#M149233</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-09T18:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358866#M149234</link>
      <description>I can't view your attached file. This site gives me an error. &lt;BR /&gt;
can you email it to me, so I can look at it for you?&lt;BR /&gt;
thanks&lt;BR /&gt;
&lt;BR /&gt;
aboord@motorcontrols.com&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Oct 2008 18:38:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358866#M149234</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-09T18:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358867#M149235</link>
      <description>Ok, maybe a zip file will work?</description>
      <pubDate>Thu, 09 Oct 2008 18:51:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358867#M149235</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-09T18:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358868#M149236</link>
      <description>Zip file still gave me errors. =\   &lt;BR /&gt;
Anyone else having this issue with attached files?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
... but to not get this thread off topic.... back to the real issue here....&lt;BR /&gt;
I received your email and responded... please give me some time to find out what's going on in your sample.&lt;BR /&gt;
&lt;BR /&gt;
-Addam&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
and p.s. to everyone.... if you dont want your post to look jumbled... select the "Rich Text" tab and create your post.&lt;BR /&gt;
&lt;BR /&gt;
easier on the eyes... thanks.</description>
      <pubDate>Thu, 09 Oct 2008 19:00:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358868#M149236</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-09T19:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358869#M149237</link>
      <description>http://discussion.autodesk.com/forums/thread.jspa?messageID=5531286&lt;BR /&gt;
&lt;BR /&gt;
Mind you, the new forum software has screwed up all the new lines in the code!!  Thank you Autodesk!</description>
      <pubDate>Thu, 09 Oct 2008 20:29:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358869#M149237</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-09T20:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358870#M149238</link>
      <description>I beleive that's the post I copy/pasted from. As I posted above it's all mashed up. Can someone plz post a .txt file of that code that isn't mangled?</description>
      <pubDate>Thu, 09 Oct 2008 20:38:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358870#M149238</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-09T20:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358871#M149239</link>
      <description>Try this -&lt;BR /&gt;
(still not a perfect display even with the Rich Text editor)&lt;BR /&gt;
&lt;BR /&gt;
Public Sub AutoSave() &lt;BR /&gt;
Dim oFlatPattern As FlatPattern &lt;BR /&gt;
Set oFlatPattern = ThisDocument.ComponentDefinition.FlatPattern ' Check to see if the flat exists. &lt;BR /&gt;
If Not oFlatPattern Is Nothing Then ' Get the extent of the face. &lt;BR /&gt;
Dim oExtent As Box &lt;BR /&gt;
Set oExtent = oFlatPattern.Body.RangeBox ' Extract the width and length from the range. &lt;BR /&gt;
Dim dLength As Double &lt;BR /&gt;
Dim dWidth As Double &lt;BR /&gt;
dLength = oExtent.MaxPoint.X - oExtent.MinPoint.X &lt;BR /&gt;
dWidth = oExtent.MaxPoint.Y - oExtent.MinPoint.Y &lt;BR /&gt;
' Convert these values into the document units. &lt;BR /&gt;
' This will result in strings that are identical &lt;BR /&gt;
' to the strings shown in the Extent dialog. &lt;BR /&gt;
Dim oUOM As UnitsOfMeasure &lt;BR /&gt;
Set oUOM = ThisDocument.UnitsOfMeasure &lt;BR /&gt;
Dim strWidth As String &lt;BR /&gt;
Dim strLength As String &lt;BR /&gt;
strWidth = oUOM.GetStringFromValue(dWidth, kDefaultDisplayLengthUnits) &lt;BR /&gt;
strLength = oUOM.GetStringFromValue(dLength, kDefaultDisplayLengthUnits) &lt;BR /&gt;
' Write these string as custom properties. If the properties already &lt;BR /&gt;
' exist, then just update them. &lt;BR /&gt;
Dim oCustomPropSet As PropertySet &lt;BR /&gt;
Set oCustomPropSet = ThisDocument.PropertySets.Item("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}") &lt;BR /&gt;
On Error Resume Next &lt;BR /&gt;
oCustomPropSet.Item("SheetMetal Width").Value = strWidth &lt;BR /&gt;
If Err &lt;BR /&gt;
Then Err.Clear &lt;BR /&gt;
Call oCustomPropSet.Add(strWidth, "SheetMetal Width") &lt;BR /&gt;
End if&lt;BR /&gt;
oCustomPropSet.Item("SheetMetal Length").Value = strLength &lt;BR /&gt;
If Err Then &lt;BR /&gt;
Err.Clear &lt;BR /&gt;
Call oCustomPropSet.Add(strLength, "SheetMetal Length") &lt;BR /&gt;
End If &lt;BR /&gt;
Else ' The flat doesn't exist so delete the properties, if they exist. &lt;BR /&gt;
On Error Resume Next &lt;BR /&gt;
Set oCustomPropSet = ThisDocument.PropertySets.Item("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}") &lt;BR /&gt;
oCustomPropSet.Item("SheetMetal Width").Delete &lt;BR /&gt;
oCustomPropSet.Item("SheetMetal Length").Delete &lt;BR /&gt;
End If&lt;BR /&gt;
End

Edited by: petercharles on Oct 9, 2008 9:44 PM</description>
      <pubDate>Thu, 09 Oct 2008 21:43:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358871#M149239</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-09T21:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358872#M149240</link>
      <description>Thank you, I was able to compile the code, but when I run it I get &lt;BR /&gt;
"Run-time error '16' - Expression too complex"&lt;BR /&gt;
and it points to dLength = oExtent.MaxPoint.X - oExtent.MinPoint.X&lt;BR /&gt;
Ideas?</description>
      <pubDate>Thu, 09 Oct 2008 21:58:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358872#M149240</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-09T21:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358873#M149241</link>
      <description>&lt;DIV id="jive-html-wrapper-div"&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;I would highly recommend not doing this in a &lt;BR /&gt;
document automatic macro.&amp;nbsp; I have some recent postings on my blog that &lt;BR /&gt;
discuss this and show how to create an add-in to do the same thing.&amp;nbsp; Having &lt;BR /&gt;
said that I did clean up your macro so that it works now.&amp;nbsp; Now you can &lt;BR /&gt;
convert it to an add-in. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;-- &lt;BR /&gt;Brian Ekins&lt;BR /&gt;Autodesk Inventor &lt;BR /&gt;
API&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;
style="FONT-SIZE: 11pt; COLOR: red; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&amp;gt;&lt;A&gt;&lt;BR /&gt;
href="http://blogs.autodesk.com/modthemachine"&amp;gt;&lt;FONT&gt;&lt;BR /&gt;
color=#800080&amp;gt;http://blogs.autodesk.com/modthemachine&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 10 Oct 2008 00:46:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358873#M149241</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-10T00:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358874#M149242</link>
      <description>Brian,&lt;BR /&gt;
&lt;BR /&gt;
Is there any way to post "readable" code on this forum??</description>
      <pubDate>Fri, 10 Oct 2008 07:43:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358874#M149242</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-10T07:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358875#M149243</link>
      <description>&lt;DIV id="jive-html-wrapper-div"&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;I don't know about the recent changes to the &lt;BR /&gt;
forum.&amp;nbsp; I'm just a user of the forum like all of you.&amp;nbsp; What are you &lt;BR /&gt;
using the read the newsgroup?&amp;nbsp; I've inserted the code below that I added as &lt;BR /&gt;
an attachment before.&amp;nbsp; I'm using Outlook Express and have the format set to &lt;BR /&gt;
"Rich Text".&amp;nbsp; It looks good in my editor, we'll see what it looks like when &lt;BR /&gt;
I post it.&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Public Sub AutoSave()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim &lt;BR /&gt;
oFlatPattern As FlatPattern&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oFlatPattern = &lt;BR /&gt;
ThisDocument.ComponentDefinition.FlatPattern&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Check to see if the flat exists.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
If Not oFlatPattern Is Nothing &lt;BR /&gt;
Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Get the extent of the &lt;BR /&gt;
face.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oExtent As &lt;BR /&gt;
Box&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oExtent = &lt;BR /&gt;
oFlatPattern.Body.RangeBox&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Extract the width and length &lt;BR /&gt;
from the range.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dLength As &lt;BR /&gt;
Double&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dWidth As &lt;BR /&gt;
Double&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dMaxX As &lt;BR /&gt;
Double&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dMaxX = &lt;BR /&gt;
oExtent.MaxPoint.X&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dMinX As &lt;BR /&gt;
Double&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dMinX = &lt;BR /&gt;
oExtent.MinPoint.X&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dLength = dMaxX &lt;BR /&gt;
- dMinX&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dMaxY As &lt;BR /&gt;
Double&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dMaxY = &lt;BR /&gt;
oExtent.MaxPoint.Y&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dMinY As &lt;BR /&gt;
Double&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dMinY = &lt;BR /&gt;
oExtent.MinPoint.Y&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dWidth = dMaxY &lt;BR /&gt;
- dMinY&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Convert these values into the &lt;BR /&gt;
document units.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' This will result &lt;BR /&gt;
in strings that are identical&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' to &lt;BR /&gt;
the strings shown in the Extent &lt;BR /&gt;
dialog.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oUOM As &lt;BR /&gt;
UnitsOfMeasure&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oUOM = &lt;BR /&gt;
ThisDocument.UnitsOfMeasure&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim &lt;BR /&gt;
strWidth As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim strLength &lt;BR /&gt;
As String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strWidth = &lt;BR /&gt;
oUOM.GetStringFromValue(dWidth, &lt;BR /&gt;
kDefaultDisplayLengthUnits)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
strLength = oUOM.GetStringFromValue(dLength, &lt;BR /&gt;
kDefaultDisplayLengthUnits)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Write these string as custom &lt;BR /&gt;
properties. If the properties already ' exist, then just update &lt;BR /&gt;
them.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oCustomPropSet As &lt;BR /&gt;
PropertySet&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oCustomPropSet = &lt;BR /&gt;
ThisDocument.PropertySets.Item("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strWidth = &lt;BR /&gt;
oCustomPropSet.Item("SheetMetal &lt;BR /&gt;
Width").Value&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err &lt;BR /&gt;
Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
Err.Clear&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
Call oCustomPropSet.Add(strWidth, "SheetMetal &lt;BR /&gt;
Width")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End &lt;BR /&gt;
If&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLength = &lt;BR /&gt;
oCustomPropSet.Item("SheetMetal &lt;BR /&gt;
Length").Value&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err &lt;BR /&gt;
Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
Err.Clear&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
Call oCustomPropSet.Add(strLength, "SheetMetal &lt;BR /&gt;
Length")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End &lt;BR /&gt;
If&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else ' The flat doesn't exist so delete the properties, &lt;BR /&gt;
if they exist.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error Resume &lt;BR /&gt;
Next&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oCustomPropSet = &lt;BR /&gt;
ThisDocument.PropertySets.Item("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
oCustomPropSet.Item("SheetMetal &lt;BR /&gt;
Width").Delete&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
oCustomPropSet.Item("SheetMetal Length").Delete&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End &lt;BR /&gt;
If&lt;BR /&gt;End Sub&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;BR /&gt;-- &lt;BR /&gt;Brian Ekins&lt;BR /&gt;Autodesk Inventor &lt;BR /&gt;
API&lt;BR /&gt;&lt;A&gt;&lt;BR /&gt;
href="http://blogs.autodesk.com/modthemachine"&amp;gt;http://blogs.autodesk.com/modthemachine&lt;/A&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 10 Oct 2008 14:43:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358875#M149243</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-10T14:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358876#M149244</link>
      <description>The code in the posting looks good, both in Outlook Express and the web reader.  Here's some other code created through the web interface.&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ThisIsJunk()&lt;BR /&gt;
    Dim oFlatPattern As FlatPattern&lt;BR /&gt;
    Set oFlatPattern = ThisDocument.ComponentDefinition.FlatPattern&lt;BR /&gt;
    &lt;BR /&gt;
    ' Check to see if the flat exists.&lt;BR /&gt;
    If Not oFlatPattern Is Nothing Then&lt;BR /&gt;
        ' Get the extent of the face.&lt;BR /&gt;
        Dim oExtent As Box&lt;BR /&gt;
        Set oExtent = oFlatPattern.Body.RangeBox&lt;BR /&gt;
    End If&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
-Brian</description>
      <pubDate>Fri, 10 Oct 2008 14:54:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358876#M149244</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2008-10-10T14:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358877#M149245</link>
      <description>The last posting was posted through the web interface using "Plain Text" and it's obviously bad. Here's another attempt using "Rich Text".&lt;BR /&gt;
&lt;BR /&gt;
&lt;P&gt;
Public Sub AutoSave()&lt;BR /&gt;
    Dim oFlatPattern As FlatPattern&lt;BR /&gt;
    Set oFlatPattern = ThisDocument.ComponentDefinition.FlatPattern&lt;BR /&gt;
&lt;BR /&gt;
    ' Check to see if the flat exists.&lt;BR /&gt;
    If Not oFlatPattern Is Nothing Then&lt;BR /&gt;
        ' Get the extent of the face.&lt;BR /&gt;
        Dim oExtent As Box&lt;BR /&gt;
        Set oExtent = oFlatPattern.Body.RangeBox&lt;BR /&gt;
    End If&lt;BR /&gt;
End Sub 
&lt;/P&gt;</description>
      <pubDate>Fri, 10 Oct 2008 14:59:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358877#M149245</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2008-10-10T14:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358878#M149246</link>
      <description>Rich text is better in that it left the lines but it still took out the spaces.  I'll see what I can find out.&lt;BR /&gt;
&lt;BR /&gt;
-Brian</description>
      <pubDate>Fri, 10 Oct 2008 15:00:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358878#M149246</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2008-10-10T15:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358879#M149247</link>
      <description>I always use Firefox as I usually go from one site to another.</description>
      <pubDate>Fri, 10 Oct 2008 18:00:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358879#M149247</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-10T18:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358880#M149248</link>
      <description>Thanks Brian, &lt;BR /&gt;
&lt;BR /&gt;
I followed your blog and adjusted the code accordingly, but I'm not exactly sure how to build the add-in. I understand creating batch files for register &amp;amp; unregister but not how to make the dll.&lt;BR /&gt;
&lt;BR /&gt;
I have a couple of questions for the code. Can the code be changed so that you can specify the precision of the units (ie 100.000 to 100). Can the code be modified so that instead of iProperties being created, the values create reference parameters?

Edited by: IOMATT on Oct 10, 2008 11:17 AM</description>
      <pubDate>Fri, 10 Oct 2008 18:15:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358880#M149248</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-10T18:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358881#M149249</link>
      <description>&lt;DIV id="jive-html-wrapper-div"&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;To create the dll use the Build command in the &lt;BR /&gt;
Build menu.&amp;nbsp; It will be created in the bin directory of your project.&lt;BR /&gt;-- &lt;BR /&gt;
&lt;BR /&gt;Brian Ekins&lt;BR /&gt;Autodesk Inventor API&lt;BR /&gt;&lt;A&gt;&lt;BR /&gt;
href="http://blogs.autodesk.com/modthemachine"&amp;gt;http://blogs.autodesk.com/modthemachine&lt;/A&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 10 Oct 2008 21:54:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358881#M149249</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-10T21:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358882#M149250</link>
      <description>Ok, the 'Build' commands are all greyed out. &lt;BR /&gt;
&lt;BR /&gt;
I also modified the code to adjust precision to '0'. I have the extents outputing millimeters but I want to omit the units. Is this possible?</description>
      <pubDate>Tue, 14 Oct 2008 22:00:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358882#M149250</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-14T22:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Please look at this code</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358883#M149251</link>
      <description>Ok nevermind. I was able to create a build after all. I also found some code that will output the values to parameters instead, so I can format the values the way I want. Thanks for all the help.&lt;BR /&gt;
&lt;BR /&gt;
&lt;P&gt;
Public Sub AutoSave()
&lt;/P&gt;
&lt;BR /&gt;
&lt;P&gt;
    Dim oFlatPattern As FlatPattern&lt;BR /&gt;
    Set oFlatPattern = ThisDocument.ComponentDefinition.FlatPattern&lt;BR /&gt;
                ' Check to see if the flat exists.&lt;BR /&gt;
    If Not oFlatPattern Is Nothing Then&lt;BR /&gt;
                ' Get the extent of the face.&lt;BR /&gt;
        Dim oExtent As Box&lt;BR /&gt;
        Set oExtent = oFlatPattern.Body.RangeBox&lt;BR /&gt;
                ' Extract the width and length from the range.&lt;BR /&gt;
        Dim dLength As Double&lt;BR /&gt;
        Dim dWidth As Double&lt;BR /&gt;
        Dim dMaxX As Double&lt;BR /&gt;
        dMaxX = oExtent.MaxPoint.X&lt;BR /&gt;
        Dim dMinX As Double&lt;BR /&gt;
        dMinX = oExtent.MinPoint.X&lt;BR /&gt;
        dLength = dMaxX - dMinX&lt;BR /&gt;
                Dim dMaxY As Double&lt;BR /&gt;
        dMaxY = oExtent.MaxPoint.Y&lt;BR /&gt;
        Dim dMinY As Double&lt;BR /&gt;
        dMinY = oExtent.MinPoint.Y&lt;BR /&gt;
        dWidth = dMaxY - dMinY&lt;BR /&gt;
&lt;BR /&gt;
 Dim LengthParameter As Inventor.Parameter&lt;BR /&gt;
 Set LengthParameter = ThisApplication.ActiveDocument.ComponentDefinition.Parameters.Item("Length")&lt;BR /&gt;
 LengthParameter.Value = dLength&lt;BR /&gt;
&lt;BR /&gt;
 Dim WidthParameter As Inventor.Parameter&lt;BR /&gt;
 Set WidthParameter = ThisApplication.ActiveDocument.ComponentDefinition.Parameters.Item("Width")&lt;BR /&gt;
 WidthParameter.Value = dWidth&lt;BR /&gt;
 
&lt;/P&gt;
&lt;P&gt;
    End If&lt;BR /&gt;
&lt;BR /&gt;
End Sub
&lt;/P&gt;</description>
      <pubDate>Wed, 15 Oct 2008 21:33:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/please-look-at-this-code/m-p/2358883#M149251</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-10-15T21:33:44Z</dc:date>
    </item>
  </channel>
</rss>

