<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tick Talk on EsoxRepublic.com &#187; API</title>
	<atom:link href="http://esoxrepublic.com/blog/index.php/category/api/feed/" rel="self" type="application/rss+xml" />
	<link>http://esoxrepublic.com/blog</link>
	<description>I suppose this means I'm famous</description>
	<lastBuildDate>Thu, 06 May 2010 17:32:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Esox &#8220;Copy Custom Info&#8221; revived and updated guts</title>
		<link>http://esoxrepublic.com/blog/2010/05/01/esox-copy-custom-info-revived-and-updated-guts/</link>
		<comments>http://esoxrepublic.com/blog/2010/05/01/esox-copy-custom-info-revived-and-updated-guts/#comments</comments>
		<pubDate>Sat, 01 May 2010 13:07:17 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Esox Software]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://esoxrepublic.com/blog/?p=46</guid>
		<description><![CDATA[You just never know how popular some things are until they break.  This apparently is true for my "Copy Custom Info" macro.  The macro seems to have stopped working for many SW 2010 users.  New version will be out this week.]]></description>
			<content:encoded><![CDATA[<p>You just never know how popular some things are until they break.  This apparently is true for my &#8220;Copy Custom Info&#8221; macro.  The macro seems to have stopped working for many SW 2010 users.</p>
<p>The macro is ancient, by API standards.  It is one of my first published macros, and was written in SW2003.  Judging by the code, I wrote it before I was aware of <a title="Early Binding" href="http://esoxrepublic.com/blog/2008/07/24/early-binding-speeds-api-programming/" target="_blank">early binding</a>.  Also, SW&#8217;s API has come a long way and there were many ways to streamline the code.</p>
<p>I was able to do away with much embarrassing sophomoric hacksmanship. Glad to get that behind me.  Most notable improvement is that the program no longer needs to make duplicates of the files it is copying from (do not judge, I had my reasons!).  Assemblies and drawings selected for copying will open much faster.</p>
<p>The interface is about the same.  The only visible improvement will be in the preview windows.  There will be some indication that this is the SW2009 version.</p>
<p>The program will be posted on EsoxRepublic.com in the coming week.  Notices to be placed in popular forums that your less-popular author frequents.</p>
]]></content:encoded>
			<wfw:commentRss>http://esoxrepublic.com/blog/2010/05/01/esox-copy-custom-info-revived-and-updated-guts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shapeshifting Through SW Dimension API</title>
		<link>http://esoxrepublic.com/blog/2008/10/21/shapeshifting-through-sw-dimension-api/</link>
		<comments>http://esoxrepublic.com/blog/2008/10/21/shapeshifting-through-sw-dimension-api/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 17:43:17 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[API]]></category>

		<guid isPermaLink="false">http://esoxrepublic.com/blog/2008/10/21/shapeshifting-through-sw-dimension-api/</guid>
		<description><![CDATA[The SolidWorks API object structure for dimensions is a bit convoluted.  Here's how to navigate through the various objects.]]></description>
			<content:encoded><![CDATA[<p>One of the sticky things about working with SolidWorks API is the fragmented object structure.  Often, it takes more than one object type to deal with a single object.  The most common example is the <i>ModelDoc/PartDoc/AssemblyDoc/DrawingDoc</i> objects.  All SW files are ModelDocs, but many API functions are only available in the type-specific objects, and accessing those functions may require setting a second PartDoc or AssemblyDoc or DrawingDoc object after the ModelDoc object is already set.</p>
<p>A less common but more convoluted set of objects is the ones that deal with dimensions.  There are as many as four different objects that deal with a SolidWorks dimension:</p>
<ul>
<li><b><u>Dimension:</u></b> Properties and methods for the dimension parameter, such as name, value, driven state</li>
<li><b><u>Tolerance:</u></b> A sub-object of Dimension, used to access tolerance info</li>
<li><b><u>Display Dimension:</u></b> Dimesnions can be displayed in more than one place, DisplayDimension is a single display instance.</li>
<li><b><u>Annotation:</u></b> DisplayDimension is a sub-object of the Annotation object.  You would need the Annotation object to access layers and leaders.</li>
</ul>
<table>
<tr>
<td><a href="http://esoxrepublic.com/blog/wp-content/uploads/2008/10/disdim.jpg" target="_blank"><img src="http://esoxrepublic.com/blog/wp-content/uploads/2008/10/disdim.jpg" alt="Dimension object chart" width=450></a>
</td>
</tr>
<tr>
<td><i>Hierarchy of dimension-related objects.</i></td>
</tr>
</table>
<h3>Selecting Dimensions</h3>
<p>When Accessing selected dimensions, the SW <i>SelectionMgr</i> object passes selected dimensions as DisplayDimension object.  This means that it is necessary to pass the DisplayDimension object to a Dimension object to change its value.  It would be necessary to pass the DisplayDimension to an Annotation object to change its layer.  To change a tolerance, one may need to access the Tolerance object (though there are some unlisted Dimension object API&#8217;s that access tolerance data).</p>
<p>The example code below shows how to take a DisplayDimension from the SelectionMgr, pass it to a Dimension object, and then change the dimension value.</p>
<blockquote><p>Set swApp = Application.SldWorks<br />
Dim swApp As SldWorks.SldWorks<br />
Dim ActDoc As SldWorks.ModelDoc2<br />
Dim SelMgr As SldWorks.SelectionMgr<br />
Dim DispDim As SldWorks.DisplayDimension<br />
Dim DimToEdit As SldWorks.Dimension</p>
<p>Set ActDoc = swApp.ActiveDoc<br />
Set SelMgr = ActDoc.SelectionManager</p>
<p><font color="forestgreen">&#8216;get selected DisplayDimension object</font><br />
Set DispDim = SelMgr.GetSelectedObject6(1)<br />
<font color="forestgreen">&#8216;pass selection to a Dimension object</font><br />
Set DimToEdit = DispDim.GetDimension<br />
&#8216;<font color="forestgreen">change value of Dimension object</font><br />
DimToEdit.SetUserValueIn2 ActDoc, CDbl(2.78), swSetValue_UseCurrentSetting</p>
</blockquote>
<h3>OT: Football pool</h3>
<p>Once again, I&#8217;m in a football pool.  Once again, I was off to an abysmal start, 4-5 right per week.  Until last week, that is.  I changed my pick strategy.  For the last two weeks, I have picked the team whose home city has the highest crime rate.  Got 10 right last week and 7 this week (our winner only had 9).  I&#8217;ll go with this strategy for a while longer and see how it pans out.</p>
]]></content:encoded>
			<wfw:commentRss>http://esoxrepublic.com/blog/2008/10/21/shapeshifting-through-sw-dimension-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;ShellExecute&#8221; to Open a File in Its Default App</title>
		<link>http://esoxrepublic.com/blog/2008/09/26/shellexecute-to-open-a-file-in-its-default-app/</link>
		<comments>http://esoxrepublic.com/blog/2008/09/26/shellexecute-to-open-a-file-in-its-default-app/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 15:35:07 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[API]]></category>

		<guid isPermaLink="false">http://esoxrepublic.com/blog/2008/09/26/shellexecute-to-open-a-file-in-its-default-app/</guid>
		<description><![CDATA[To introduce using Windows API in macros, I picked the simplest example I have in my toolbox: opening a file in its default application.]]></description>
			<content:encoded><![CDATA[<p>To introduce using Windows API in macros, I picked the simplest example I have in my toolbox: opening a file in its default application.  Using the <i>ShellExecute</i> command, one can call a file to simply open in its default application, much the same way that double-clicking a file icon in an explorer window would do.  I use it to add hyperlinks to my website in my published macros.</p>
<h3>The &#8220;Declare&#8221; Statement</h3>
<p>To use a Windows API function in a SolidWorks macro, one must first add the function to the macro code using a <i>Declare</i> statement.   A declare statement acceesses and names a function in a Windows DLL library for use in VB code.  Elements of a Declare statement are thus:</p>
<ul>
<li>Name of function or sub</li>
<li>&#8220;Lib: name of DLL library containing function or sub</li>
<li>&#8220;Alias&#8221;: a user-defined alternate name for the function</li>
<li>function parameters</li>
<li>Return variable</li>
</ul>
<p>An example of the <a href="http://msdn.microsoft.com/en-us/library/aa165080(office.10).aspx">declare statement</a> for ShellExecute would look like this:</p>
<blockquote><p>Public Declare Function ShellExecute <br />
    Lib &#8220;shell32.dll&#8221; _<br />
    Alias &#8220;ShellExecuteA&#8221;<br />
    (ByVal hwnd As Long, _<br />
    ByVal lpOperation As String, _<br />
    ByVal lpFile As String, _<br />
    ByVal lpParameters As String, _<br />
    ByVal lpDirectory As String, _<br />
    ByVal nShowCmd As Long) _<br />
As Long</p>
</blockquote>
<h3>Using ShellExecute for Hyperlink</h3>
<p>To make a hyperlink, I use <a href="http://allapi.mentalis.org/apilist/ShellExecute.shtml">ShellExecute</a> to open a web page.  The user&#8217;s operating system determines the default application with which to open the web page.</p>
<blockquote><p>Public Sub OpenEsoxWeb()<br />
ShellExecute 0, vbNullString, &#8220;http://www.EsoxRepublic.com&#8221;, vbNullString, &#8220;C:\&#8221;, SW_SHOWNORMAL<br />
End Sub</p>
</blockquote>
<p>Connect the <i>OpenEsoxWeb</i> sub to an object in a form to give that object a &#8220;hyperlink&#8221;.</p>
<blockquote><p>Private Sub lblWebLink_Click()<br />
OpenEsoxWeb<br />
End Sub</p>
</blockquote>
<p>You can find an implementation of this in my <a href="http://www.EsoxRepublic.com/freeware/"><b>Delete Custom Info</b></a> macro.</p>
<h3>Works with any file</h3>
<p>Use ShellExecute with any file you want to open: web pages, MS Word, Excel, or PowerPoint Docs, images.  Wherever you need the effect of a &#8220;double-click&#8221;.</p>
<p>Links:<br />
<a href="http://allapi.mentalis.org/apilist/ShellExecute.shtml">AllAPI.net archive on Mentalis.org</a><br />
<a href="http://msdn.microsoft.com/en-us/library/aa165080(office.10).aspx">The Borg</a></p>
<h3>Thought for the day</h3>
<p>The two best things to bring to a gunfight: a gun, and a friend with a gun.</p>
]]></content:encoded>
			<wfw:commentRss>http://esoxrepublic.com/blog/2008/09/26/shellexecute-to-open-a-file-in-its-default-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SW BOM to Excel Macro</title>
		<link>http://esoxrepublic.com/blog/2008/09/11/sw-bom-to-excel-macro/</link>
		<comments>http://esoxrepublic.com/blog/2008/09/11/sw-bom-to-excel-macro/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 13:54:14 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Esox Software]]></category>

		<guid isPermaLink="false">http://esoxrepublic.com/blog/2008/09/11/sw-bom-to-excel-macro/</guid>
		<description><![CDATA[“Copy BOM to Clipboard” macro does exactly what it says: it copies a table-style BOM from a SolidWorks drawing to the clipboard in a format that can readily be pasted into MS Excel.]]></description>
			<content:encoded><![CDATA[<p>&#8230;not quite, but a fast way from here to there.</p>
<p>I just released a macro I have been using for a few months.  &#8220;Copy BOM to Clipboard&#8221; macro does exactly what it says: it copies a table-style BOM from a SW drawing to the clipboard in a format that can readily be pasted into MS Excel.  <a href="http://www.esoxrepublic.com/freeware"> Download here.</a></p>
<p>Just run the macro with a SW drawing open.  If successful, there will be a message like that shown below.  Then go to an Excel worksheet, select a cell, and paste (&#8221;ctrl-v&#8221;).</p>
<table>
<tr>
<td><a href="http://www.esoxrepublic.com/freeware/macros/BOMclippy.JPG" target="_blank"><img src="http://www.esoxrepublic.com/freeware/macros/BOMclippy.JPG" alt="BOM to Clipboard message window" width=450></a>
</td>
</tr>
<tr>
<td><i>Message box indicating successful acquisition of BOM.</i></td>
</tr>
</table>
<h3>Developer&#8217;s notes</h3>
<p>It&#8217;s been a while, but I am trying to remember some of the specific challenges of writing this.  It took about two hours of fumbling until the error-to-trial ratio dropped below 1.0.</p>
<p>Application writing is often mostly about validation.  Checking to see if there is an active document, is it a drawing, does it have a BOM (or more than one).  That took most of the time.</p>
<p>There was a hook to getting ahold of the table data.  I put the BOM data first into a <i>SldWorks.BomTableAnnotation</i> object, then moved it to a <i>SldWorks.TableAnnotation</i> object which could then be parsed into an array.  The final array is then written to a tab-delimited string which pastes so nicely into Excel.</p>
<p>It could have been more elegant, but it &#8220;works fine, lasts long time&#8221;.</p>
<h3>Thought for the day</h3>
<p>Speak softly and carry a big stick.  Some folks out there can take a punch much better than they can take an insult.</p>
]]></content:encoded>
			<wfw:commentRss>http://esoxrepublic.com/blog/2008/09/11/sw-bom-to-excel-macro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AllAPI lives</title>
		<link>http://esoxrepublic.com/blog/2008/08/29/allapi-lives/</link>
		<comments>http://esoxrepublic.com/blog/2008/08/29/allapi-lives/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 14:37:50 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[API]]></category>

		<guid isPermaLink="false">http://esoxrepublic.com/blog/2008/08/29/allapi-lives/</guid>
		<description><![CDATA[Rumors of AllAPI's demise have been greatly exaggerated.]]></description>
			<content:encoded><![CDATA[<p>Long live AllAPI.</p>
<p>Yesterday I reported that AllAPI.net was gone.  The domain is gone, but the site lives on.  It has moved to <a href="http://allapi.mentalis.org/">http://allapi.mentalis.org/</a>.  This is my go-to site for Windows API snippets.</p>
<p>Also recommended: <a href="http://www.codetoad.com">codetoad.com</a>.  My <a href="http://www.esoxrepublic.com/devtools/">registry utilities</a> VBA code module came from here.</p>
<p>In upcoming weeks, I will be discussing using Windows API to enhance VBA macros with functions like</p>
<ul>
<li>&#8220;Save&#8221; and &#8220;Open&#8221; dialogs</li>
<li>Folder browsing dialogs</li>
<li>File security</li>
<li>Registry tools</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://esoxrepublic.com/blog/2008/08/29/allapi-lives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>R.I.P. AllAPI.net</title>
		<link>http://esoxrepublic.com/blog/2008/08/28/rip-allapinet/</link>
		<comments>http://esoxrepublic.com/blog/2008/08/28/rip-allapinet/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 14:54:52 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://esoxrepublic.com/blog/2008/08/28/rip-allapinet/</guid>
		<description><![CDATA[I was going to lead off with a brief article about one of my favorite resources, <i>AllAPI.net</i>.  Unfortunately, that article has turned into an obituary.]]></description>
			<content:encoded><![CDATA[<p>I was gearing up for a set of articles on using Windows API in macros.  I was going to lead off with a brief article about one of my favorite resources, <i>AllAPI.net</i>.  Unfortunately, that article has turned into an obituary.</p>
<p>For years, <i>AllAPI.net</i> was my first stop for Windows API help.  I first discovered it in 2003.  Already, the site had been relegated to archive status, available but no longer updated.  Still, it was an indispensible resource for adding Windows API functions to code.</p>
<p>I&#8217;m verklempt.  I&#8217;m lost.  I don&#8217;t know where to go, now.  <b>If anyone has links to good online Windows API examples, I would appreciate a heads-up!</b></p>
<h3>Windows API to extend macro functionality</h3>
<p>Often, questions come up about adding certain functions to a SolidWorks macro.  File open/save and folder browsing are the most popular.  Since the dialog objects for these tasks are not licensed to VBA, one must take a backdoor approach via Windows API.  I also use Windows API for Windows file security, registry functions, and opening documents.</p>
]]></content:encoded>
			<wfw:commentRss>http://esoxrepublic.com/blog/2008/08/28/rip-allapinet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Early Binding Speeds API Programming</title>
		<link>http://esoxrepublic.com/blog/2008/07/24/early-binding-speeds-api-programming/</link>
		<comments>http://esoxrepublic.com/blog/2008/07/24/early-binding-speeds-api-programming/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 18:27:16 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[API]]></category>

		<guid isPermaLink="false">http://esoxrepublic.com/blog/2008/07/24/early-binding-speeds-api-programming/</guid>
		<description><![CDATA[One of the challenges when writing API code is keeping track of objects and their methods and properties.  Early binding can help with that.
&#8220;Early binding&#8221; simply refers to the way that object variables are defined.  Instead of defining an object variable with &#8220;Dim swApp as Object&#8221;, define it as the specific object type, [...]]]></description>
			<content:encoded><![CDATA[<p>One of the challenges when writing API code is keeping track of objects and their methods and properties.  Early binding can help with that.</p>
<p>&#8220;Early binding&#8221; simply refers to the way that object variables are defined.  Instead of defining an object variable with <i>&#8220;Dim swApp as Object&#8221;</i>, define it as the specific object type, i.e. <i>&#8220;Dim swApp as SldWorks.SldWorks&#8221;</i>.</p>
<p>Here is what SW gives you when you record a macro:</p>
<blockquote><p>Dim swApp As Object<br />
Dim Part As Object<br />
Dim SelMgr As Object<br />
Dim boolstatus As Boolean<br />
Dim longstatus As Long, longwarnings As Long<br />
Dim Feature As Object</p>
</blockquote>
<p>This is what the same code would look like adjusted for early binding:</p>
<blockquote><p>Dim swApp As <b>SldWorks.SldWorks</b><br />
Dim Part As <b>SldWorks.ModelDoc2</b><br />
Dim SelMgr As <b>SelectionMgr</b><br />
Dim boolstatus As Boolean<br />
Dim longstatus As Long, longwarnings As Long<br />
Dim Feature As <b>SldWorks.Feature</b></p>
</blockquote>
<h3>Ctrl+J and Intellisense</h3>
<p>One of the handy features in the VBA editor (macro editor) is a list of available commands that pops up when typing, known as &#8220;intellisense&#8221;.  Details can be found in the VBA help under &#8220;List Properties/Methods Command (Edit Menu)&#8221;.  With intellisense, there is no need to commit an endless list of commands, objects, methods and properties to memory.  It&#8217;s all right there.</p>
<table>
<tr>
<td><img src="http://esoxrepublic.com/blog/wp-content/uploads/2008/07/intellisense.JPG" alt="Screenshot of Intellisense drop-down list" width=450>
</td>
</tr>
<tr>
<td><i>Screen shot of intellisense Pop-up drop-down menu.  Menu pops up after typing &#8220;.&#8221; after a valid object name or &#8220;ctrl+J&#8221;</i></td>
</tr>
</table>
<p>Intellisense pops up immediately when one types a period following the name of an existing object.  But, there&#8217;s a catch: if the object is defined with a Dim statement using <i>&#8220;As Object&#8221;</i> instead of as a specific type, it is not available.</p>
<p>Also, intellisense is available to add commands and objects by pressing <b><i>ctrl+J</i></b>.</p>
<p>The other advantage to early binding comes when a program is run.  Early binding decreases the time it takes to set an object.  Not a big deal for small macros, but it could add up for larger program.</p>
]]></content:encoded>
			<wfw:commentRss>http://esoxrepublic.com/blog/2008/07/24/early-binding-speeds-api-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comparing files&#8217; internal ID&#8217;s</title>
		<link>http://esoxrepublic.com/blog/2008/05/22/comparing-files-internal-ids/</link>
		<comments>http://esoxrepublic.com/blog/2008/05/22/comparing-files-internal-ids/#comments</comments>
		<pubDate>Thu, 22 May 2008 14:54:07 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Internal ID]]></category>

		<guid isPermaLink="false">http://esoxrepublic.com/blog/2008/05/22/comparing-files-internal-ids/</guid>
		<description><![CDATA[Originally posted on the SW website API forum, forums.solidworks.com
Compare file internal ID&#8217;s
There is no way in SW API to get a document&#8217;s internal ID (&#8221;IID&#8221;). SW doesn&#8217;t make that data publicly available, apparently because it would be too convenient for programmers who need that information. Still, there is a way to divine some useful information [...]]]></description>
			<content:encoded><![CDATA[<p><i>Originally posted on the SW website API forum, forums.solidworks.com</i><br />
<a href="https://forum.solidworks.com/forum/messageview.cfm?catid=11&#038;threadid=8064&#038;enterthread=y">Compare file internal ID&#8217;s</a></p>
<p>There is no way in SW API to get a document&#8217;s internal ID (&#8221;IID&#8221;). SW doesn&#8217;t make that data publicly available, apparently because it would be too convenient for programmers who need that information. Still, there is a way to divine some useful information about a file&#8217;s internal ID.</p>
<p>SW recognizes two files as having the same IID if <br />
1.) they were created at the exact same second <br />
2.) they were created by the same installation of SW </p>
<p>Very difficult to ascertain #2, but #1 comes easy. </p>
<p>To answer the question, <i>&#8220;Do these two files have the same internal ID?&#8221;</i>, one need only check the creation date. But, not just any creation date. There are many ways to check creation date, and most will not work for this purpose. The creation date of interest is the one generated the instant a user clicked the final &#8220;OK&#8221; when creating a new file in SW. <b>What&#8217;s the right way? Use DSOfile.dll</b>. The property <i>&#8220;SummaryProperties.DateCreated&#8221;</i> records the moment SW brought this file into being. It does not change when a SW file is moved, renamed, or copied. It is the &#8220;mitochondrial DNA&#8221; date stamp, passed down intact through generations of saves, moves, and copies.</p>
<p>What&#8217;s the wrong way? Nearly any other creation date property or method. SW&#8217;s custom property &#8220;SW-Created Date&#8221; can change due to a Save As operation. Windows API methods creation dates can change depending on how and where a file is moved or copied.</p>
<p>How reliable is the DSOfile create date for determining if two files share an IID? The inverse of the probability that two files of interest were created by two separate people at the exact same second. Good enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://esoxrepublic.com/blog/2008/05/22/comparing-files-internal-ids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Things API teaches about SW</title>
		<link>http://esoxrepublic.com/blog/2008/05/21/things-api-teaches-about-sw/</link>
		<comments>http://esoxrepublic.com/blog/2008/05/21/things-api-teaches-about-sw/#comments</comments>
		<pubDate>Wed, 21 May 2008 18:00:04 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Internal ID]]></category>

		<guid isPermaLink="false">http://esoxrepublic.com/blog/2008/05/21/things-api-teaches-about-sw/</guid>
		<description><![CDATA[Part 1 of ?
One of the things I like about learning the API of SW is that it gives great insight into what is going on deep inside SW.  The insight is not limited to just the SW application, either.  I believe that the API also reveals some of the goings-on at the [...]]]></description>
			<content:encoded><![CDATA[<h3>Part 1 of ?</h3>
<p>One of the things I like about learning the API of SW is that it gives great insight into what is going on deep inside SW.  The insight is not limited to just the SW application, either.  I believe that the API also reveals some of the goings-on at the SW development offices.</p>
<h3>Internal confusion about Internal ID</h3>
<p>It&#8217;s a subject that has come up many times, in many places.  API programmers working with SW drawings and assemblies need access to the internal ID (&#8221;IID&#8221;) of SW files.  Without fail, they fail to find an answer.  The answer I got from SW API support was in two parts:</p>
<ol>
<li><i>&#8220;SW API does not give access to IID information.&#8221;</i></li>
<li><i>&#8220;You shouldn&#8217;t need it.  If you needed it we would have given it to you.&#8221;</i></li>
</ol>
<p>But we <u>do</u> need it.  It comes up quite often, for many reasons.  It is needed when swapping references.  It is needed when attempting to repair lost references.  It is needed when (re)organizing a non-PDM-using company&#8217;s SW file pile.</p>
</p>
<p>Access to IID data is a basic (if not primal) requirement for managing references.  Yet, SW has done <b>nothing</b> to open it up to public API users.  SW won&#8217;t even acknowledge its importance.  Version after version is released without any tools for even comparing file IID&#8217;s.  This clearly is a case where SW is 180° out of phase with the want and needs of the API user.</p>
<h3>A partial solution exists</h3>
<p>Recently, I posted a partial solution to the IID problem in <a href="http://forum.solidworks.com/">forum.solidworks.com</a>.  Once I track it down, I will repost it here.  There is a method to retrieve creation date information of a file which provides a means of reliably comparing SW file IID&#8217;s.</p>
<h3>Coming soon</h3>
<ol>
<li>A solution for comparing file IID&#8217;s</li>
<li>Lost in lofts at SW</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://esoxrepublic.com/blog/2008/05/21/things-api-teaches-about-sw/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.398 seconds -->
