<?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>Extensible By Design &#187; Extensible By Design</title>
	<atom:link href="http://extensiblecad.com/words/category/pdmplm/pdmwe/pdmwe-api/feed/" rel="self" type="application/rss+xml" />
	<link>http://extensiblecad.com/words</link>
	<description>SolidWorks and PDMWorks Enterprise Development Blog</description>
	<lastBuildDate>Mon, 02 Feb 2009 09:02:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>EPDM Number Generator&#8230;Updated For 2009</title>
		<link>http://extensiblecad.com/words/2008/12/02/epdm-number-generatorupdated-for-2009/</link>
		<comments>http://extensiblecad.com/words/2008/12/02/epdm-number-generatorupdated-for-2009/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 07:04:21 +0000</pubDate>
		<dc:creator>Jeff Cope</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Enterprise PDM]]></category>
		<category><![CDATA[Enterprise PDM API]]></category>
		<category><![CDATA[PDMWE API]]></category>
		<category><![CDATA[PDMWorks Enterprise]]></category>
		<category><![CDATA[SolidWorks Enterprise PDM]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[solidworks enterprise pdm]]></category>

		<guid isPermaLink="false">http://extensiblecad.com/words/?p=140</guid>
		<description><![CDATA[Due to blackmail and extortion a request from my good friend Rohizzle, I have updated the popular Number Generator to work with 2009.  I have not made any enhancements so you can refer to the previous version&#8217;s post for instructions.  Net:  This is an addin for SolidWorks Entperprise PDM that enables users to pick, at run-time, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://extensiblecad.com/words/wp-content/uploads/2007/10/jeffcopeteaser.jpg"><img class="size-medium wp-image-12 alignleft" title="Jeff Cope" src="http://extensiblecad.com/words/wp-content/uploads/2007/10/jeffcopeteaser.jpg" alt="" width="67" height="70" /></a>Due to <span style="text-decoration: line-through;">blackmail and extortion</span> a request from my good friend Rohizzle, I have updated the popular Number Generator to work with 2009.  I have not made any enhancements so you can refer to the <a href="http://extensiblecad.com/words/2008/07/09/pdmwe-number-generator-part-deaux/" target="_blank">previous version&#8217;s post</a> for instructions. </p>
<p>Net:  This is an addin for SolidWorks Entperprise PDM that enables users to pick, at run-time, the numbering sequence to use for auto-numbering.</p>
<p><a href="http://extensiblecad.com/words/wp-content/uploads/2008/12/numbergeneratorforpdmwe2009.zip">2009 Version Download</a></p>
	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<small><p>&copy; Jeff Cope for <a href="http://extensiblecad.com/words">Extensible By Design</a>, 2008. |
	<a href="http://extensiblecad.com/words/2008/12/02/epdm-number-generatorupdated-for-2009/">Permalink</a> |
	<a href="http://extensiblecad.com/words/2008/12/02/epdm-number-generatorupdated-for-2009/#comments">4 comments</a> |
	Add to
	<a href="http://del.icio.us/post?url=http://extensiblecad.com/words/2008/12/02/epdm-number-generatorupdated-for-2009/&amp;title=EPDM Number Generator&#8230;Updated For 2009"><img src="http://yoursite.com/images/icons/delicious.gif" border="0"> del.icio.us</a>
	<a href="http://www.digg.com/submit"><img src="http://yoursite.com/images/digg.gif" border="0"> digg</a><br/>
	Who's linking ?
	<a href="http://www.technorati.com/search/http://extensiblecad.com/words/2008/12/02/epdm-number-generatorupdated-for-2009/" title="Search on Technorati"><img src="http://yoursite.com/images/icons/technorati.gif" border="0">Technorati</a>
	<a href="http://www.blogpulse.com/search?query=http://extensiblecad.com/words/2008/12/02/epdm-number-generatorupdated-for-2009/" title="Search on Blogpulse"><img src="http://yoursite.com/images/icons/blogpulse.gif" border="0">BlogPulse</a>
	<a href="http://google.com/blogsearch?q=http://extensiblecad.com/words/2008/12/02/epdm-number-generatorupdated-for-2009/" title="Search on Google Blog Search"><img src="http://yoursite.com/images/icons/google.gif" border="0">Google</a><br/>
	Want more on these topics ? Browse the archive of posts filed under <a href="http://extensiblecad.com/words/category/net/" title="View all posts in .NET" rel="category tag">.NET</a>, <a href="http://extensiblecad.com/words/category/solidworks/enterprise-pdm/" title="View all posts in Enterprise PDM" rel="category tag">Enterprise PDM</a>, <a href="http://extensiblecad.com/words/category/solidworks/enterprise-pdm-api/" title="View all posts in Enterprise PDM API" rel="category tag">Enterprise PDM API</a>, <a href="http://extensiblecad.com/words/category/pdmplm/pdmwe/pdmwe-api/" title="View all posts in PDMWE API" rel="category tag">PDMWE API</a>, <a href="http://extensiblecad.com/words/category/pdmworks-enterprise/" title="View all posts in PDMWorks Enterprise" rel="category tag">PDMWorks Enterprise</a>, <a href="http://extensiblecad.com/words/category/pdmplm/solidworks-enterprise-pdm-pdmplm/" title="View all posts in SolidWorks Enterprise PDM" rel="category tag">SolidWorks Enterprise PDM</a>, <a href="http://extensiblecad.com/words/category/xml/" title="View all posts in XML" rel="category tag">XML</a>.</small></p>
<p>Copyright 2007 <a href=http://extensiblecad.com/words>Extensible By Design.</a>  All rights reserved.</p>]]></content:encoded>
			<wfw:commentRss>http://extensiblecad.com/words/2008/12/02/epdm-number-generatorupdated-for-2009/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A Free Template For Creating PDMWorks Enterprise Addins &#8211; It&#8217;s Automagically Delicious</title>
		<link>http://extensiblecad.com/words/2008/07/17/a-free-template-for-creating-pdmworks-enterprise-addins-its-automagically-delicious/</link>
		<comments>http://extensiblecad.com/words/2008/07/17/a-free-template-for-creating-pdmworks-enterprise-addins-its-automagically-delicious/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 15:57:40 +0000</pubDate>
		<dc:creator>Jeff Cope</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[PDMWE]]></category>
		<category><![CDATA[PDMWE API]]></category>
		<category><![CDATA[PDMWorks Enterprise]]></category>

		<guid isPermaLink="false">http://extensiblecad.com/words/?p=125</guid>
		<description><![CDATA[API development and customization is all about automating repetitive tasks and I am sometimes amazed at how much I have been able to do over the years to make end users’ daily tasks easier to accomplish.  One place I have fallen short, however, is automating my own repetitive development tasks.  That is why decided to [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;"><img class="alignleft" style="float: left; margin: 5px;" src="http://extensiblecad.com/words/wp-content/uploads/2007/10/jeffcopeteaser.jpg" alt="My Mugshot" width="67" height="70" />API development and customization is all about automating repetitive tasks and I am sometimes amazed at how much I have been able to do over the years to make end users’ daily tasks easier to accomplish.<span style="mso-spacerun: yes;">  </span>One place I have fallen short, however, is automating my own repetitive development tasks.<span style="mso-spacerun: yes;">  </span>That is why decided to create a Visual Studio Template to automate the creation of PDMWorks Enterprise Addins.<span style="mso-spacerun: yes;">  </span>This is similar to the SolidWorks Software Development Kit offered by SolidWorks for developing SolidWorks Addins. </span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span id="more-125"></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small;"><span style="font-family: Calibri;">For those of you who may not be familiar with Visual Studio Templates, they are very similar to SolidWorks Templates.<span style="mso-spacerun: yes;">  </span><span style="mso-spacerun: yes;">  </span>Within SolidWorks Templates, you store things like unit information, material information and dimensioning standards information.<span style="mso-spacerun: yes;">  </span>Within Visual Studio Templates you store References, source code files (e.g. classes, modules, forms, etc…) and the like.<span style="mso-spacerun: yes;">  </span>Hitherto, if you wished to create a custom PDMWorks Enterprise Addin, you would create a generic Visual Studio Class Library, add a reference to the PDMWorks Enterprise Type Library (i.e. EDMLib), add a class file that implements the IEdmAddIn5 interface and then add your custom code to the GetAddinInfo and OnCmd event handlers.<span style="mso-spacerun: yes;">  </span>With the PDMWE Addin Template, all you have to do is select the PDMWE Addin template from Visual Studio’s New Project dialog.<span style="mso-spacerun: yes;">  </span>All the files and references are added automagically.<span style="mso-spacerun: yes;">  </span>It is ready to go and all you have to do is add your custom code to the GetAddinInfo and OnCmd event handlers.<span style="mso-spacerun: yes;">  </span>There is already some custom code there to for your reference.<span style="mso-spacerun: yes;">  Currently, the Template is only available for Visual Basic but if some C# developer out there wants to send me a stubbed out PDMWorks Enterprise Addin written in C#, then I would be happy to package it into a Visual Studio Template.</span></span></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;">This is going to save me a lot of time and I hope it will save you a lot of time too.<span style="mso-spacerun: yes;">  </span>I also hope it saves SolidWorks API Support a lot of time so that they can spend more time on my Service Requests : )<span style="mso-spacerun: yes;">  </span>I guess on one level it is not so bright of me to make this thing public as it will also save time for my competitors in the PDMWorks Enterprise API Consulting world.<span style="mso-spacerun: yes;">  </span>It seemed like the right thing to do though considering all of the help that people have provided me with over the years.<span style="mso-spacerun: yes;">  </span>I hope you enjoy it.<span style="mso-spacerun: yes;">  </span>As always, if you use it, then I ask that you leave a comment with your feedback.<span style="mso-spacerun: yes;">  </span>It is a small price to pay.</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;"> </span></p>
<h2 class="MsoNormal" style="margin: 0in 0in 10pt;">Installing The PDMWorks Enterprise Addin Template</h2>
<p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l2 level1 lfo1;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size: small; font-family: Calibri;">1.</span><span style="font: 7pt ">       </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;"> </span><a title="PDMWorks Enterprise Addin Template for PDMWorks Enterprise Customization" href="http://extensiblecad.com/words/wp-content/uploads/2008/07/pdmwe-addin-template.zip" target="_blank">Download the installer from here</a> and unzip it.</span></span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in; text-indent: -0.25in; mso-list: l2 level1 lfo1;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size: small; font-family: Calibri;">2.</span><span style="font: 7pt ">       </span></span></span><span style="font-size: small; font-family: Calibri;">Run the installer.<span style="mso-spacerun: yes;">  </span>You should see these screens:</span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"> <span style="font-size: small; font-family: Calibri;"> <img style="margin: 5px; vertical-align: baseline;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/installer1.png" alt="PDWorks Enterprise Addin Template For Visual Basic" width="513" height="418" /></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><img style="vertical-align: baseline;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/installer2.png" alt="PDWorks Enterprise Addin Template For Visual Basic" width="513" height="418" /></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><img style="vertical-align: baseline;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/installer3.png" alt="PDWorks Enterprise Addin Template For Visual Basic" width="513" height="418" /></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><img style="margin: 5px; vertical-align: baseline;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/installer4.png" alt="PDWorks Enterprise Addin Template For Visual Basic" width="513" height="418" /></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><img style="margin: 5px; vertical-align: baseline;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/installer5.png" alt="PDWorks Enterprise Addin Template For Visual Basic" width="513" height="418" /></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><img style="margin: 5px; vertical-align: baseline;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/installer6.png" alt="PDWorks Enterprise Addin Template For Visual Basic" width="523" height="280" /></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;">Note:<span style="mso-spacerun: yes;">  </span>The Addin Template will only be installed for the releases of Visual Studio that you have installed.<span style="mso-spacerun: yes;">  </span>Visual Studio 2005 and 2008 are supported.<span style="mso-spacerun: yes;">  </span>If the installation is unsuccessful, then you can follow the manual installation steps below. </span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><img style="margin: 5px; vertical-align: baseline;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/installer7.png" alt="PDWorks Enterprise Addin Template For Visual Basic" width="513" height="418" /></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"> Finished!  Now you are ready to create your first Custom PDMWorks Enterprise Addin using the PDMWE Addin Template.</p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;"> </span></p>
<h2>Creating Your First Addin With The PDMWE Addin Template</h2>
<p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo2;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size: small; font-family: Calibri;">1.</span><span style="font: 7pt ">       </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span>Launch Visual Studio.<span style="mso-spacerun: yes;">  </span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo2;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size: small; font-family: Calibri;">2.</span><span style="font: 7pt ">       </span></span></span><span style="font-size: small; font-family: Calibri;">Select Create Project from the Start Page or File, New, Project from the toolbar.</span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 19.5pt; mso-add-space: auto;"><span style="font-size: small; font-family: Calibri;"> <img style="margin: 5px; vertical-align: baseline;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/createproject1.png" alt="PDWorks Enterprise Addin Template For Visual Basic" width="878" height="680" /></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"> </p>
<p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo2;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size: small; font-family: Calibri;">3.</span><span style="font: 7pt ">       </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;"> </span>Select PDMWE Addin from the New Project dialog’s Visual Basic folder.</span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in;"> <img style="margin: 5px; vertical-align: baseline;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/createproject2.png" alt="PDWorks Enterprise Addin Template For Visual Basic" width="783" height="405" /></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in;"><span style="font-size: small; font-family: Calibri;"> </span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo2;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size: small; font-family: Calibri;">4.</span><span style="font: 7pt ">       </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;"> </span>Provide a name for your new Addin and press the Ok button.</span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in;"><span style="font-size: small; font-family: Calibri;"> </span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in;"><span style="font-size: small;"><span style="font-family: Calibri;">A new Addin is created for you with a functional PdmweAddin class and a reference to EDMLib.<span style="mso-spacerun: yes;">  </span>The Addin is functional as is and may be compiled and debugged before adding any additional code if you want to try it out.<span style="mso-spacerun: yes;">  </span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in;"><span style="font-size: small; font-family: Calibri;"> <img style="margin: 5px; vertical-align: baseline;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/createproject3.png" alt="PDWorks Enterprise Addin Template For Visual Basic" width="878" height="680" /></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in;"> </p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in;"><span style="font-size: small; font-family: Calibri;"> </span><span style="font-size: small; font-family: Calibri;">Enjoy!</span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in;"> </p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in;"><span style="font-size: small; font-family: Calibri;"> </span></p>
<h2 class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in;">Manual Installation Steps For A Failed Installation</h2>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in;"><span style="font-size: small; font-family: Calibri;"> </span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in; mso-add-space: auto; mso-list: l1 level1 lfo3;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size: small; font-family: Calibri;">1.</span><span style="font: 7pt ">       </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;"> </span>Go to the installation folder (C:\Program Files\Extensible CAD Technologies\PDMWE Addin Template\ is the default) and find the PDMWEAddin.zip file.</span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.75in; mso-add-space: auto;"> <img style="margin: 5px; vertical-align: baseline;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/installation-folder.png" alt="PDWorks Enterprise Addin Template For Visual Basic" width="753" height="411" /></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.75in; mso-add-space: auto;"><span style="font-size: small; font-family: Calibri;"> </span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.75in; text-indent: -0.25in; mso-add-space: auto; mso-list: l1 level1 lfo3;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size: small; font-family: Calibri;">2.</span><span style="font: 7pt ">       </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;"> </span>Copy the PdmweAddin.zip file to your Visual Basic Project Templates Folder .<span style="mso-spacerun: yes;">  </span>By default, this folder is located at My Documents\Visual Studio 200X\Templates\Project Templates\Visual Basic</span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.75in; mso-add-space: auto;"><span style="font-size: small; font-family: Calibri;"> <img style="margin: 5px; vertical-align: baseline;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/templates-folder.png" alt="PDWorks Enterprise Addin Template For Visual Basic" width="734" height="411" /></span></p>
<p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.75in; mso-add-space: auto;"> <span style="font-size: small; font-family: Calibri;"> </span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.75in; mso-add-space: auto;"><span style="font-size: small; font-family: Calibri;">You should now be ready to go!</span></p>
<p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.75in; mso-add-space: auto;"> </p>
<h2 class="MsoNormal" style="margin: 0in 0in 10pt;">Uninstalling The Template</h2>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;"> <img style="margin: 5px; vertical-align: baseline;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/installer8.png" alt="PDWorks Enterprise Addin Template For Visual Basic" width="713" height="477" /></span></p>
<p class="MsoNormal" style="margin: 0in 0in 10pt;"><span style="font-size: small; font-family: Calibri;">To uninstall the PDMWE Addin Template, simply find “PDMWE Addin Template” on <span style="mso-spacerun: yes;"> </span>Add/Remove Programs and uninstall it from there.</span></p>
	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<small><p>&copy; Jeff Cope for <a href="http://extensiblecad.com/words">Extensible By Design</a>, 2008. |
	<a href="http://extensiblecad.com/words/2008/07/17/a-free-template-for-creating-pdmworks-enterprise-addins-its-automagically-delicious/">Permalink</a> |
	<a href="http://extensiblecad.com/words/2008/07/17/a-free-template-for-creating-pdmworks-enterprise-addins-its-automagically-delicious/#comments">15 comments</a> |
	Add to
	<a href="http://del.icio.us/post?url=http://extensiblecad.com/words/2008/07/17/a-free-template-for-creating-pdmworks-enterprise-addins-its-automagically-delicious/&amp;title=A Free Template For Creating PDMWorks Enterprise Addins &#8211; It&#8217;s Automagically Delicious"><img src="http://yoursite.com/images/icons/delicious.gif" border="0"> del.icio.us</a>
	<a href="http://www.digg.com/submit"><img src="http://yoursite.com/images/digg.gif" border="0"> digg</a><br/>
	Who's linking ?
	<a href="http://www.technorati.com/search/http://extensiblecad.com/words/2008/07/17/a-free-template-for-creating-pdmworks-enterprise-addins-its-automagically-delicious/" title="Search on Technorati"><img src="http://yoursite.com/images/icons/technorati.gif" border="0">Technorati</a>
	<a href="http://www.blogpulse.com/search?query=http://extensiblecad.com/words/2008/07/17/a-free-template-for-creating-pdmworks-enterprise-addins-its-automagically-delicious/" title="Search on Blogpulse"><img src="http://yoursite.com/images/icons/blogpulse.gif" border="0">BlogPulse</a>
	<a href="http://google.com/blogsearch?q=http://extensiblecad.com/words/2008/07/17/a-free-template-for-creating-pdmworks-enterprise-addins-its-automagically-delicious/" title="Search on Google Blog Search"><img src="http://yoursite.com/images/icons/google.gif" border="0">Google</a><br/>
	Want more on these topics ? Browse the archive of posts filed under <a href="http://extensiblecad.com/words/category/net/" title="View all posts in .NET" rel="category tag">.NET</a>, <a href="http://extensiblecad.com/words/category/pdmplm/pdmwe/" title="View all posts in PDMWE" rel="category tag">PDMWE</a>, <a href="http://extensiblecad.com/words/category/pdmplm/pdmwe/pdmwe-api/" title="View all posts in PDMWE API" rel="category tag">PDMWE API</a>, <a href="http://extensiblecad.com/words/category/pdmworks-enterprise/" title="View all posts in PDMWorks Enterprise" rel="category tag">PDMWorks Enterprise</a>.</small></p>
<p>Copyright 2007 <a href=http://extensiblecad.com/words>Extensible By Design.</a>  All rights reserved.</p>]]></content:encoded>
			<wfw:commentRss>http://extensiblecad.com/words/2008/07/17/a-free-template-for-creating-pdmworks-enterprise-addins-its-automagically-delicious/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>PDMWE Number Generator &#8211; Part Deaux</title>
		<link>http://extensiblecad.com/words/2008/07/09/pdmwe-number-generator-part-deaux/</link>
		<comments>http://extensiblecad.com/words/2008/07/09/pdmwe-number-generator-part-deaux/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 04:40:54 +0000</pubDate>
		<dc:creator>Jeff Cope</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[PDMWE]]></category>
		<category><![CDATA[PDMWE API]]></category>
		<category><![CDATA[PDMWorks Enterprise]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://extensiblecad.com/words/?p=105</guid>
		<description><![CDATA[Over the past few months I have received numerous emails from folks using the original PDMWE Number Generator.  It is such a simple little app that I was pleasantly surprised at all of the nice feedback people gave me regarding it.  To show my appreciation, I have modified the Number Generator to allow it to work with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://extensiblecad.com/words/wp-content/uploads/2008/07/serial-numbers.png"></a><a href="http://extensiblecad.com/words/wp-content/uploads/2008/07/serial-numbers.png"></a><a href="http://extensiblecad.com/words/wp-content/uploads/2008/07/add-addin-one.png"></a><a href="http://extensiblecad.com/words/wp-content/uploads/2008/07/partdeaux.png"><img class="alignleft alignnone size-medium wp-image-123" style="float: left; margin: 10px;" title="partdeaux" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/partdeaux.png" alt="PDMWorks Enterprise Number Generator - Part Deaux" width="228" height="245" /></a>Over the past few months I have received numerous emails from folks using the original PDMWE Number Generator.  It is such a simple little app that I was pleasantly surprised at all of the nice feedback people gave me regarding it.  To show my appreciation, I have modified the Number Generator to allow it to work with multiple serial number sequences &#8221;on the fly.&#8221; </p>
<p> You have always had the ability to set up muliple serial number generators in PDMWorks Enterprise but now the user can decide at File/Folder creation time which serial number to use.  An anticipated use case with this improved version of the tools is for users who have multiple categories of parts with numbers being assigned by category.  Note:  Even though the functionality has been expanded, the tool is still very easy to install and configure. </p>
<p>So how does it work?</p>
<p><span id="more-105"></span></p>
<p>The Number Generator is a PDMWorks Enterprise add-in that runs whenever a user presses a command button (from a data card) that is configured to &#8220;call&#8221; it.  The Number Generator downloads the latest copy of the ListItems.xml file from your vault&#8217;s Options folder and checks it for List Items.  Each &lt;ListItem&gt; element in the XML file has a &lt;Name&gt; element and corresponding &lt;Value&gt; element.  The &lt;Name&gt; elements represent what the users sees in the Number Generator&#8217;s drop-down list and the &lt;Value&gt; elements represent the Serial Number sequence that is &#8220;called&#8221; whenever a user selects that item from the drop-down list.  There is no reasonable limit to the number of serial number sequences that can be supported by the Number Generator.  Just add a new &lt;ListItem&gt; node to the ListItems.xml file, being careful to type the exact name of the Serial Number sequence in the &lt;Value&gt; node.</p>
<p> Don&#8217;t be afraid of the xml.  It is really simple.  Here is the xml file that was used to develop and test the Number Generator.  Notice that the text contained in the &lt;Value&gt; nodes of the ListItems are an exact match for the names of the Serial Number sequences in the vault.<img style="margin: 5px;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/notepad.png" alt="" width="971" height="570" /></p>
<p>Alright&#8230;  Ready to get started?  Good.  Here are the high-level installation and configuration steps:</p>
<ol>
<li>Download and unzip the file containing the tool.</li>
<li>Create any desired serial number sequences using the PDMWorks Enterprise Administration Tool. </li>
<li>Add the included add-in to the PDMWorks Enterprise Add-ins using the PDMWorks Enterprise Administration Tool. </li>
<li>Using Notepad or (better) an XML editor such as XML Notepad, edit the ListItems.xml file that is included in the Options folder to include your desired serial number sequences.</li>
<li>Copy the included Options folder to the root of your PDMWorks Enterprise vault.</li>
<li>Checkin the ListItems.xml file, if not done automatically.</li>
<li>Give all users Read Only permissions to the Options folder.</li>
<li>Add a command button to any data card you wish to run the Number Generator from and configure the command button to &#8220;call&#8221; the Number Generator.</li>
<li>Test it out and if it works well for you, then add some nice feedback to this post.  Otherwise, curse me under your breath and keep it to yourself.</li>
</ol>
<p>Here are the detailed steps:</p>
<ol>
<li><a title="PDMWorks Enterprise 2008 Number Generator From Extensible CAD Technologies" href="http://extensiblecad.com/words/wp-content/uploads/2008/07/number-generator-part-deaux.zip" target="_self">Download the file containing the tool from here. </a> Unzip it once it is downloaded.  It should contain two dll files (Interop.EdmLib.dll and NumberGeneratorForPDMWE2008.dll) and an Options folder which in turn contains a single xml file (ListItems.xml).<img style="MARGIN: 5px; VERTICAL-ALIGN: text-top" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/top-directory.png" alt="" width="621" height="320" /></li>
<li>Create any desired serial number sequences using the PDMWorks Enterprise Administration Tool.  Keep track of the names of the Serial Number sequences as you will need this information for step four.<img class="aligncenter size-full wp-image-114" title="serial-numbers" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/serial-numbers.png" alt="Add Serial Numbers to your PDMWorks Enterprise vault" width="911" height="514" /></li>
<li>Add the included add-in to the PDMWorks Enterprise Add-ins using the PDMWorks Enterprise Administration Tool.  Use the New button to add the Add-in&#8217;s dll files to the vault.  Make sure you select BOTH dll files to add.  Don&#8217;t worry about the warning message that PDMWorks Enterprise gives you after you add the dlls.  The warning message is just letting you know that you have to reboot when updating the same Add-in to a later version.  I changed the name of this add-in from the previous version so that won&#8217;t be an issue here.<img style="MARGIN: 5px; VERTICAL-ALIGN: middle" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/add-addin-one.png" alt="" width="973" height="571" /><img style="MARGIN: 5px" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/add-addin-two.png" alt="" width="580" height="430" /><img style="MARGIN: 5px" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/add-addin-three.png" alt="" width="492" height="236" /><img style="MARGIN: 5px" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/add-addin-four.png" alt="" width="646" height="539" /></li>
<li>Using Notepad or (better) an XML editor such as XML Notepad, edit the ListItems.xml file that is included in the Options folder to include your desired serial number sequences.  Notepad can be used but I am partial to XML Notepad as seen below.  <a title="Download XML Notepad" href="http://www.microsoft.com/downloads/details.aspx?familyid=72d6aa49-787d-4118-ba5f-4f30fe913628&amp;displaylang=en" target="_self">XML Notepad is a totally free utility from Microsoft and can be downloaded from here.</a>  If using Notepad, be very careful to preserve the format of the XML file.  Each &lt;ListItem&gt; element tag must be closed by a corresponding &lt;/ListItem&gt; element tag.  The same goes true for the &lt;Name&gt; and &lt;Value&gt; element tags.  <img style="MARGIN: 5px; VERTICAL-ALIGN: text-top" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/xmlnotepad.png" alt="" width="971" height="572" /></li>
<li>Copy the included Options folder to the root of your PDMWorks Enterprise vault.  I want to emphasize the &#8220;to the ROOT of your vault&#8221; part of that.  If your vault&#8217;s local view is found at &#8220;C:\PDMWE\MyVault&#8221; then your Options folder should be found at &#8220;C:\PDMWE\MyVault\Options.&#8221;</li>
<li>Checkin the ListItems.xml file, if not done automatically.</li>
<li>Give all users Read Only permissions to the Options folder.</li>
<li>Add a command button to any data card you wish to run the Number Generator from and configure the command button to &#8220;call&#8221; the Number Generator.<img style="MARGIN: 5px; VERTICAL-ALIGN: text-top" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/wire-into-data-card.png" alt="" width="870" height="561" /></li>
<li>Test it out and if it works well for you, then add some nice feedback to this post.  Otherwise, curse me under your breath and keep it to yourself.<img style="margin: 5px;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/test-it-out-2.png" alt="" width="945" height="615" /><a href="http://extensiblecad.com/words/wp-content/uploads/2008/07/partdeaux.png"><img style="margin: 5px;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/test-it-out-4.png" alt="" width="465" height="223" /></a></li>
</ol>
<p>You can hit the &#8220;Copy&#8221; button to copy the auto-generated number to the clipboard.  You can then paste it anywhere you want (e.g. filename, data card variable, etc&#8230;).</p>
<p><img style="margin: 5px;" src="http://extensiblecad.com/words/wp-content/uploads/2008/07/test-it-out-5.png" alt="" width="936" height="606" /></p>
<p> If you or someone you know use(s) this thing and find it helpful, then give us a holler in the comments section below.  Thanks.</p>
	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<small><p>&copy; Jeff Cope for <a href="http://extensiblecad.com/words">Extensible By Design</a>, 2008. |
	<a href="http://extensiblecad.com/words/2008/07/09/pdmwe-number-generator-part-deaux/">Permalink</a> |
	<a href="http://extensiblecad.com/words/2008/07/09/pdmwe-number-generator-part-deaux/#comments">10 comments</a> |
	Add to
	<a href="http://del.icio.us/post?url=http://extensiblecad.com/words/2008/07/09/pdmwe-number-generator-part-deaux/&amp;title=PDMWE Number Generator &#8211; Part Deaux"><img src="http://yoursite.com/images/icons/delicious.gif" border="0"> del.icio.us</a>
	<a href="http://www.digg.com/submit"><img src="http://yoursite.com/images/digg.gif" border="0"> digg</a><br/>
	Who's linking ?
	<a href="http://www.technorati.com/search/http://extensiblecad.com/words/2008/07/09/pdmwe-number-generator-part-deaux/" title="Search on Technorati"><img src="http://yoursite.com/images/icons/technorati.gif" border="0">Technorati</a>
	<a href="http://www.blogpulse.com/search?query=http://extensiblecad.com/words/2008/07/09/pdmwe-number-generator-part-deaux/" title="Search on Blogpulse"><img src="http://yoursite.com/images/icons/blogpulse.gif" border="0">BlogPulse</a>
	<a href="http://google.com/blogsearch?q=http://extensiblecad.com/words/2008/07/09/pdmwe-number-generator-part-deaux/" title="Search on Google Blog Search"><img src="http://yoursite.com/images/icons/google.gif" border="0">Google</a><br/>
	Want more on these topics ? Browse the archive of posts filed under <a href="http://extensiblecad.com/words/category/net/" title="View all posts in .NET" rel="category tag">.NET</a>, <a href="http://extensiblecad.com/words/category/pdmplm/pdmwe/" title="View all posts in PDMWE" rel="category tag">PDMWE</a>, <a href="http://extensiblecad.com/words/category/pdmplm/pdmwe/pdmwe-api/" title="View all posts in PDMWE API" rel="category tag">PDMWE API</a>, <a href="http://extensiblecad.com/words/category/pdmworks-enterprise/" title="View all posts in PDMWorks Enterprise" rel="category tag">PDMWorks Enterprise</a>, <a href="http://extensiblecad.com/words/category/xml/" title="View all posts in XML" rel="category tag">XML</a>.</small></p>
<p>Copyright 2007 <a href=http://extensiblecad.com/words>Extensible By Design.</a>  All rights reserved.</p>]]></content:encoded>
			<wfw:commentRss>http://extensiblecad.com/words/2008/07/09/pdmwe-number-generator-part-deaux/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Who? Me?&#8230;PDMWorks Enterprise API Development Gotchas With .NET</title>
		<link>http://extensiblecad.com/words/2008/06/18/who-mepdmworks-enterprise-api-development-gotchas-with-net/</link>
		<comments>http://extensiblecad.com/words/2008/06/18/who-mepdmworks-enterprise-api-development-gotchas-with-net/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 17:49:24 +0000</pubDate>
		<dc:creator>Jeff Cope</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[PDMWE]]></category>
		<category><![CDATA[PDMWE API]]></category>
		<category><![CDATA[PDMWorks Enterprise]]></category>
		<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[PDMWorks Enterprise API Development]]></category>

		<guid isPermaLink="false">http://extensiblecad.com/words/?p=99</guid>
		<description><![CDATA[A year or two ago I read a book that changed the game for me.  The book was called .NET Gotchas and it made me about  10x more effective as a developer.  The book details 75 common pitfalls with .NET development and explains how to avoid them.  I was knee-deep in a few of those [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://extensiblecad.com/words/wp-content/uploads/2008/06/homer-doh1.jpg"></a><a href="http://extensiblecad.com/words/wp-content/uploads/2008/06/homer-doh2.jpg"></a><a href="http://extensiblecad.com/words/wp-content/uploads/2008/06/rodney.jpg"><img class="alignleft alignnone size-medium wp-image-102" style="FLOAT: left; MARGIN: 5px 10px" title="rodney" src="http://extensiblecad.com/words/wp-content/uploads/2008/06/rodney-300x168.jpg" alt="PDMWorks Enterprise API Development Gotchas" width="300" height="168" /></a></p>
<p>A year or two ago I read a book that changed the game for me.  The book was called <a title=".NET Gotchas" href="http://labs.oreilly.com/stats/detail.xqy?fpi=0596009097" target="_blank">.NET Gotchas</a> and it made me about  10x more effective as a developer.  The book details 75 common pitfalls with .NET development and explains how to avoid them.  I was knee-deep in a few of those pitfalls when I found the book at my local library.  In fact, I was at the library specifically to get help for a few problems I was having with a PDMWE Addin project that I was working on at the time.  The addin was written for <span id="more-99"></span>.NET and even though the book was written based on an earlier version of the .NET Framework, it still did wonders for me and for my project. <br />
Time went on and eventually I found myself at a PDMWorks Enterprise Addin development breakout session at SolidWorks World 2008 in San Diego.  Although the presenter did a pretty good job explaining the process for creating,  editing and debugging an Addin for PDMWE, he told attendees to select the “Register for COM Interop” button in Visual Studio to register their Addin for Interop.  I knew at the time that this was a violation of <a title="Gotcha #73" href="http://labs.oreilly.com/stats/detail.xqy?fpi=0596009097" target="_blank">Gotcha #73 – Simply turning the switch for COM Interop is dangerous</a>.  I kept my mouth shut at the time but I made a note to self to write up a PDMWorks Enterprise-specific Gotcha column based on some of the things that have tripped me up during my three years of Conisio / PDMWorks Enterprise API development. </p>
<p> </p>
<p>Here are my top five:</p>
<p><a href="http://extensiblecad.com/words/wp-content/uploads/2008/06/homer-doh1.jpg"><img class="alignnone size-medium wp-image-100" style="margin: 5px; vertical-align: baseline;" title="homer-doh1" src="http://extensiblecad.com/words/wp-content/uploads/2008/06/homer-doh1.jpg" alt="PDMWorks Enterprise API Development Gotchas" width="115" height="106" /></a></p>
<p><strong>#1 –PDMWorks Enterprise doesn’t like COM Interop assemblies that don’t include “interop” in the filename.</strong></p>
<p><strong></strong><br />
When referencing COM libraries from managed code using Visual Studio’s Project, Add Reference method, Visual Studio automatically creates the COM Interop assemblies for you and by default adds .interop to the filename just before .dll. However, sometimes it is necessary to create your own COM interop assemblies (to support multiple versions of an app for instance). In this situation, the developer specifies the filename arbitrarily (e.g. mySolidWorks2007assembly.dll, mySolidWorks2008assembly.dll, etc…). Additionally, you may be using interop assemblies provided by the software OEM (side note – it is usually a good idea to use these if they are available) in which case the assemblies’ filenames might also not include interop. So, there are a few scenarios in which you may run into a situation where you have a COM interop assembly that doesn’t have .interop in the filename. This is normally not a problem but for some reason PDMWorks Enterprise (this was last tested on 2007 but I suspect the issue is present in 2008 as well) does not recognize the interop assembly as an interop assembly unless it has interop in the name. In this situation, PDMWorks Enterprise will fail to bring the assembly down to the client machine to load with your addin. This in turn causes various loading and binding issues and an Addin that doesn’t work.<br />
<strong>Solution:</strong></p>
<p>Use the Type Library Importer tool to create an interop assembly with the name you desire from a COM assembly. For example, typing</p>
<p><span style="color: #800080;">tlbimp.exe MyActiveX.dll /out:Interop.MyActiveX.dll</span></p>
<p>at the Visual Studio command prompt will generate a COM Interop assembly named Interop.MyActiveX.dll from a COM assembly called MyActiveX.dll.  If you need a strong-named interop assembly (also usually a good idea), then you should instead type</p>
<p><span style="color: #800080;">tlbimp.exe MyActiveX.dll /out:Interop.MyActiveX.dll/keyfile:MyKeyFile.snk</span></p>
<p>where MyKeyFile.snk is your company’s strong-name key.</p>
<p> </p>
<p><strong>#2 – Weakly named assemblies can cause security issues on Windows clients at run-time.</strong></p>
<p><strong></strong><br />
Microsoft introduced a number of security enhancements in .NET 2.0 that are meant to protect you from bad guys and boogie-men. These enhancements are specifically dealing with “trusted zones” and are generally helpful. However, if your assemblies were written in Visual Studio 2005 or later or were written in Visual Studio 2003 but don’t specify a pre-2.0 .NET framework in their .config file, then these enhancements will wreak havoc and mayhem on your addin.</p>
<p><strong>Solution:</strong></p>
<p>Unless you want to configure your assemblies as “trusted” on every machine, which by the way requires the .NET Framework Administration tool, then your best bet is to simply provide a strong-name to your assemblies. Note: Creating your assemblies in Visual Studio 2003 isn’t a good option due to the great enhancements in Visual Studio 2005 and Visual Studio 2008.</p>
<p><a href="http://extensiblecad.com/words/wp-content/uploads/2008/06/homer-doh2.jpg"><img class="alignnone size-medium wp-image-101" style="margin: 5px; vertical-align: baseline;" title="homer-doh2" src="http://extensiblecad.com/words/wp-content/uploads/2008/06/homer-doh2.jpg" alt="PDMWorks Enterprise API Development Gotchas" width="75" height="106" /></a></p>
<p><strong>#3 – Using COM interop assemblies in your addin causes assembly loading issues if the COM assembly isn’t installed on the client machine beforehand.</strong></p>
<p>COM Interop assemblies are really just wrappers for your COM assemblies. The COM assemblies still do most of the work. The wrapper just tells Windows to load the COM assembly using MSCOREE to marshal calls between your managed and unmanaged code. This means that the COM assembly must still be present on the machine running your addin. PDMWorks Enterprise will auto-magically download your COM Interop assembly (if it has interop in the filename) but this is not the case for the COM assembly itself. This is problematic in cases where you have so many clients using PDMWorks Enterprise that installing the COM assembly manually isn’t a good option. This issue usually presents itself via nasty assembly binding errors and will kill your Addin and anything else within a 50 meter kill-zone.</p>
<p><strong>Solution:</strong></p>
<p>Place a copy of the COM assembly in your PDMWorks Enterprise vault and write a PDMWorks Enterprise Addin to automatically install it in the Global Assembly Cache, GAC, on the PDMWorks Client. Once the COM assembly is deployed to the GAC on all clients, you should be able to run your addin with confidence. I haven’t tried doing this from the same Addin that requires the COM assembly but in theory it should be possible. You may have to explicitly load the assemblies in question using the System.Runtime.InteropServices and System.Reflection namespaces but I think it is possible.</p>
<p> </p>
<p><strong>#4 – Adding files directly to PDMWorks Enterprise-managed folders in Windows can put you on the hot seat.</strong><br />
Imagine this phone call to you at 8am on a Monday morning just as you arrive at the office: “Hi Jim, this is Bruce, VP of Operations at ACME Fab and I wanted to let you know that the PDMWorks Enterprise addin that you sold us is crashing PDMWorks Enterprise intermittently. All hell appears to have broken loose and I think we want our money back.” Those aren’t fun phone calls but you are prime candidate for one of those calls if you are adding / writing files directly to managed folders in Windows and relying on PDMWorks Enterprise’s hooks into Windows to add the files to the vault. File access permissions typically ensue depending on what SolidWorks Addins are loaded on the client and which way the end user is holding his or her mouth at the time. That is the extreme case though. The more common, though less severe, situation is where PDMWorks Enterprise and SolidWorks don’t crash but some of the files simply are not added to the vault (i.e. they are marked as a local file).</p>
<p><strong>Solution:</strong></p>
<p>Use a non-managed working directory (e.g. C:\MyPDMWEtempFolder\) to write your files to and then use the addfile API call from PDMWorks Enterprise to actually add the file to the vault.</p>
<p> </p>
<p><strong>#5 – Forgetting your assembly’s configuration file may cause heartburn.</strong></p>
<p>If you have specified Settings in your project (accessed in VB through my.settings) or a specific version of the .NET Framework for your addin, then those items are persisted by Visual Studio in the configuration file located in your application’s execution directory.  The file is usually named MyAssembly.dll.config where MyAssembly.dll is the filename of your Addin.  If you don’t add that to the PDMWorks Enterprise vault along with your addin via the PDMWorks Enterprise Administration tool, then those settings will not be available to your addin while it executes on the client machine.  If you have specified a setting, then chances are it is important to your application and will give you  and/or your end users chest pains if they are missing.</p>
<p><strong>Solution:</strong> </p>
<p>Add the MyAssembly.dll.config file to your addin (i.e. MyAssembly.dll) in the PDMWorks Enterprise Vault using the PDMWorks Enterprise Administration tool.  PDMWorks Enterprise will download it at runtime to the same directory as your assembly.</p>
<p> </p>
<p>There are numerous potential hazards to negotiate when writing a PDMWorks Enterprise Addin using .NET but those are my top five.  I hope you find them useful and if you do, then please don’t hesitate to give me some blog love in the comments section.  My ego is a powerful motivator to keep writing these articles : )</p>
	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<small><p>&copy; Jeff Cope for <a href="http://extensiblecad.com/words">Extensible By Design</a>, 2008. |
	<a href="http://extensiblecad.com/words/2008/06/18/who-mepdmworks-enterprise-api-development-gotchas-with-net/">Permalink</a> |
	<a href="http://extensiblecad.com/words/2008/06/18/who-mepdmworks-enterprise-api-development-gotchas-with-net/#comments">9 comments</a> |
	Add to
	<a href="http://del.icio.us/post?url=http://extensiblecad.com/words/2008/06/18/who-mepdmworks-enterprise-api-development-gotchas-with-net/&amp;title=Who? Me?&#8230;PDMWorks Enterprise API Development Gotchas With .NET"><img src="http://yoursite.com/images/icons/delicious.gif" border="0"> del.icio.us</a>
	<a href="http://www.digg.com/submit"><img src="http://yoursite.com/images/digg.gif" border="0"> digg</a><br/>
	Who's linking ?
	<a href="http://www.technorati.com/search/http://extensiblecad.com/words/2008/06/18/who-mepdmworks-enterprise-api-development-gotchas-with-net/" title="Search on Technorati"><img src="http://yoursite.com/images/icons/technorati.gif" border="0">Technorati</a>
	<a href="http://www.blogpulse.com/search?query=http://extensiblecad.com/words/2008/06/18/who-mepdmworks-enterprise-api-development-gotchas-with-net/" title="Search on Blogpulse"><img src="http://yoursite.com/images/icons/blogpulse.gif" border="0">BlogPulse</a>
	<a href="http://google.com/blogsearch?q=http://extensiblecad.com/words/2008/06/18/who-mepdmworks-enterprise-api-development-gotchas-with-net/" title="Search on Google Blog Search"><img src="http://yoursite.com/images/icons/google.gif" border="0">Google</a><br/>
	Want more on these topics ? Browse the archive of posts filed under <a href="http://extensiblecad.com/words/category/net/" title="View all posts in .NET" rel="category tag">.NET</a>, <a href="http://extensiblecad.com/words/category/com/" title="View all posts in COM" rel="category tag">COM</a>, <a href="http://extensiblecad.com/words/category/pdmplm/pdmwe/" title="View all posts in PDMWE" rel="category tag">PDMWE</a>, <a href="http://extensiblecad.com/words/category/pdmplm/pdmwe/pdmwe-api/" title="View all posts in PDMWE API" rel="category tag">PDMWE API</a>, <a href="http://extensiblecad.com/words/category/pdmworks-enterprise/" title="View all posts in PDMWorks Enterprise" rel="category tag">PDMWorks Enterprise</a>.</small></p>
<p>Copyright 2007 <a href=http://extensiblecad.com/words>Extensible By Design.</a>  All rights reserved.</p>]]></content:encoded>
			<wfw:commentRss>http://extensiblecad.com/words/2008/06/18/who-mepdmworks-enterprise-api-development-gotchas-with-net/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>PDMWE API 201 &#8211; A Simple Addin To Pull Document Numbers On Demand</title>
		<link>http://extensiblecad.com/words/2007/11/20/pdmwe-api-201-a-simple-addin-to-pull-document-numbers-on-demand/</link>
		<comments>http://extensiblecad.com/words/2007/11/20/pdmwe-api-201-a-simple-addin-to-pull-document-numbers-on-demand/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 06:46:39 +0000</pubDate>
		<dc:creator>Jeff Cope</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[PDMWE]]></category>
		<category><![CDATA[PDMWE API]]></category>
		<category><![CDATA[PDMWorks Enterprise]]></category>

		<guid isPermaLink="false">http://extensiblecad.com/words/?p=37</guid>
		<description><![CDATA[What Does This Addin Do?  This Addin &#8220;listens&#8221; for Command Button events to be &#8220;fired&#8221; from data cards in PDMWorks Enterprise.  This could be File Cards (i.e. for existing files or folders) or Input Cards (i.e. for new files or folders).  If the command string of the Command Button matches our criteria, then the Addin will [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What Does This Addin Do?</strong></p>
<p> This Addin &#8220;listens&#8221; for Command Button events to be &#8220;fired&#8221; from data cards in PDMWorks Enterprise.  This could be File Cards (i.e. for existing files or folders) or Input Cards (i.e. for new files or folders).  If the command string of the Command Button matches our criteria, then the Addin will pull the next Serial Number from a Serial Number sequence in the vault.  The best thing about the Addin is that the Serial Number sequence name is specified as part of the command string.  This means that the Addin can be configured very easily by a non-programmer to run on any number of different Serial Number sequences.  In other words, our Addin is Extensible (sorry, I couldn&#8217;t resist). </p>
<p> <strong>Why Do I Need A Custom PDMWorks Enterprise Addin For Handling Document Numbers When PDMWorks Enterprise Already Has &#8220;Serial Numbers&#8221; Functionality That Handles This?</strong></p>
<p> PDMWorks Enterprise is a great tool and the Serial Numbers functionality is very useful.  However, as implemented in PDMWorks Enterprise, the Serial Numbers are kind of wired directly in to the system and don&#8217;t allow much flexibility in terms of when and how they are used.  You either set your part number to be populated from the Serial Number sequence or you don&#8217;t.  There is no &#8220;let&#8217;s do it this way for this case and another way for this other case.&#8221;  By writing a very simple Addin, <span id="more-37"></span>we can set up our data cards to pull Serial Numbers when the user pushes a button of our choosing.  In other words, with a small amount of work, we allow the user to choose when to use a given number sequence.  I am tempted to say something here like &#8220;&#8230;and choice is good&#8230;&#8221; but I realize that not everyone will agree on that.  So I have decided to leave the freewill debates up to philosophers and priests while I tackle the PDMWorks Enterprise API.</p>
<p><strong><em>I Don’t Want To Learn Anything, Can I Just Have The Finished Addin?</em></strong></p>
<p>Yes.  <a href="http://www.extensiblecad.com/downloads/NumberGenerator_Binary.zip">You may download the compiled Addin from here. </a>  However, you will still need to see the section below on deploying the Addin. </p>
<p><em>Disclaimer:  No warranty is either expressed or implied for this Addin and the Addin is not in any way supported.  By downloading the Addin, you assume all responsibility for the Addin.</em><strong>How Hard Is This To Do?</strong></p>
<p>Writing a PDMWorks Enterprise Addin is surprisingly easy although deploying them correctly can sometimes be a challenge.  This article does assume though that you understand the basics of  creating Addins with Visual Basic.NET.  If you haven&#8217;t yet mastered the basics of creating Addins with VB.NET then you can brush up with the fairly decent tutorial that is included in the PDMWorks Enterprise API guide.  <img border="1" vspace="5" align="textTop" width="90" src="http://extensiblecad.com/words/wp-content/uploads/2007/11/api-help-file.PNG" hspace="5" height="18" style="width: 90px; height: 18px" /></p>
<p><img vspace="20" align="baseline" width="800" src="http://extensiblecad.com/words/wp-content/uploads/2007/11/api-help-create-addin.PNG" hspace="20" height="555" style="width: 800px; height: 555px" /></p>
<p><strong>What Version of PDMWorks Enterprise Was This Addin Written For?</strong>This Addin was written for and compiled against PDMWorks Enterprise 2007.  However, you should be able to recompile it against PDMWorks Enterprise 2008 without much trouble.</p>
<p> <strong>What Development Tools Do I Need To Write Such An Addin?</strong></p>
<p>Visual Studio 2005 Standard is definitely sufficient for creating COM addins and you can usually pick it up in the US for $300.  Currently, that would be like 5 Euros for you guys across the ocean.    I haven&#8217;t tried it, but it may be possible to use the Visual Basic 2005 Express (aka &#8220;the free version&#8221;) to write this by manually adding the COMVisible&lt;&#8230;&gt; tags where appropriate in the Addin.  Although I am too lazy to install VB 2005 Express to test this out, I did go ahead an put the COMVisible&lt;&#8230;&gt; tags in their appropriate (at least by my reckoning) places.  If anyone tries this, I would be thankful if you could post your results for posterity.</p>
<p><strong>Where Can I Find The Source Code For This Addin?</strong></p>
<p>You can find the Project for this Addin, with all source code, in a zip file <a href="http://www.extensiblecad.com/downloads/NumberGenerator_Source.zip">here.</a></p>
<p> <strong>How Do You Do It (High-Level)?</strong></p>
<ol>
<li> Follow the steps in the PDMWorks Enterprise API Guide to create a generic PDMWE Addin.  Note:  Yes I know this is cheating but it is getting late and I am starting to get pretty sleepy so I hope you will forgive the shortcut.  </li>
<li>Add a Serial Number sequence to your PDMWorks Enterprise vault.</li>
<li>Create a Windows Form in your application that will be used to provide the generated number back to the user.</li>
<li>Create or edit a datacard such that it has a Command Button to call the Addin.</li>
<li>Replace the generic OnCmd method in the generic Addin created at step 1 with an OnCmd method that accesses the next number in Serial Number sequence that is specified by the Command Button.</li>
<li>Debug endlessly until it “works” (on your machine)</li>
<li>Enlist a co-worker to test the Addin for you on their machine.  Note:  You can blame them later for inadequate testing coverage if the Addin doesn&#8217;t work properly : )</li>
</ol>
<p><strong>How Do You Do It (Detailed)?</strong></p>
<ol>
<li>Follow steps in API guide for creating a generic Addin.  (Sorry, you are on your own for this step) </li>
<li>Add a Serial Number sequence (or two or three or four &#8230;) to your vault.  You will need to login as an administrator to do that. <img vspace="20" align="textTop" width="431" src="http://extensiblecad.com/words/wp-content/uploads/2007/11/pdmwe-admin.PNG" hspace="20" height="497" style="width: 431px; height: 497px" />
<ul>
<li>Note:  Just expand your PDMWorks Enterprise Vault node in the PDMWorks Enterprise Administration tool and then right-click on the &#8220;Serial Numbers&#8221; item in the tree.  You can then add as many serial numbers as you need.  I decided to create four in my example to handle the case where different departments number their documents differently.<img vspace="20" align="bottom" width="596" src="http://extensiblecad.com/words/wp-content/uploads/2007/11/serialnumbers.PNG" hspace="20" height="341" style="width: 596px; height: 341px" /></li>
</ul>
</li>
<li>Create a Windows Form in your application that will be used to provide the generated number back to the user.  In this example, the form is already created for you. </li>
<li>Create or edit a datacard such that it has a Command Button to call the Addin.  You will need to set the Command type for the button equal to &#8220;Run Add-in.&#8221;  Also, notice the string in the &#8220;Name of add-in:&#8221; text box.  The string has the format of &#8220;Autonumber:&lt;Serial Number sequence name&gt;.  &#8220;Autonumber&#8221; is used to tell our Add-in which command buttons &#8220;belong&#8221; to it and the Serial Number sequence name tells our Add-in which Serial Number to pull the number from.  Make sure you save your changes.<img vspace="20" align="textTop" width="633" src="http://extensiblecad.com/words/wp-content/uploads/2007/11/txt-card-eng-nr.PNG" hspace="20" height="499" style="width: 633px; height: 499px" /></li>
<li>Replace the generic OnCmd method in the generic Addin created at step 1 with an OnCmd method that accesses the next number in Serial Number sequence that is specified by the Command Button.  You will want to modify your error messages to be more user-friendly than mine before deploying your version of the Add-in.  In the interests of time, I opted to simply write out the exceptions to strings and return those, in their entirety, in messageboxes to the user.  This is okay for a blog article but probably not okay for production.</li>
<li>Debug endlessly until it “works” (on your machine)
<ul>
<li>There are detailed instructions in the PDMWE API Guide on how to debug an Add-in.  Oversimplifying, you just right-click the &#8220;Add-ins&#8221; item and then select &#8220;Debug Add-ins.&#8221;  You will then browse to your top-level assembly (.dll file).  When debugging, you do not need to specify the files referenced by your assembly (.dll file).  <img vspace="20" align="textTop" width="298" src="http://extensiblecad.com/words/wp-content/uploads/2007/11/add-addin1.PNG" hspace="20" height="323" style="width: 298px; height: 323px" /></li>
</ul>
</li>
<li>Deploy the Addin
<ul>
<li>Right-click the &#8220;Add-ins&#8221; item and then select &#8220;Open.&#8221;  You will then browse to your top-level assembly (.dll file) AND its dependencies.  When running in Open mode, you DO NEED to specify the files referenced by your assembly (.dll file).  In this case, your top-level assembly (NumberGenerator.dll) references only Interop.EdmLib.dll.  This is the .NET wrapper for the PDMWorks Enterprise COM Library.<img vspace="20" align="textTop" width="428" src="http://extensiblecad.com/words/wp-content/uploads/2007/11/add-addin2.PNG" hspace="20" height="273" style="width: 428px; height: 273px" /></li>
<li>You will see a message telling you that you will have to Restart your machine any time you add a new version of your Add-in to the vault.  Note:  This is a real requirement and can cause much grief when you start developing applications that utilize numerous assemblies.<img vspace="20" width="554" src="http://extensiblecad.com/words/wp-content/uploads/2007/11/add-addin3.PNG" hspace="20" height="133" style="width: 554px; height: 133px" /></li>
</ul>
</li>
<li>Test it &#8220;one more time&#8221; just to be sure.  By pressing the &#8220;Engineering Doc#&#8221; button on the File Card in the example below, I am able to receive a message from the Add-in telling me that a new number has been generated and that I can copy the number to the clipboard by selecting the &#8220;Copy&#8221; button on the form.  Note:  You could write to the file variable instead of the copy/paste method but it would not work for Input Cards as there is not yet a file on which to access variables.</li>
<li><img vspace="20" width="641" src="http://extensiblecad.com/words/wp-content/uploads/2007/11/pastednumber.PNG" hspace="20" height="579" style="width: 641px; height: 579px" /><img vspace="20" align="textTop" width="524" src="http://extensiblecad.com/words/wp-content/uploads/2007/11/pdmwe-number-generator-dialog.PNG" hspace="20" height="160" style="width: 524px; height: 160px" /></li>
</ol>
<p>Good luck.  Let me know if this article was helpful.</p>
	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<small><p>&copy; Jeff Cope for <a href="http://extensiblecad.com/words">Extensible By Design</a>, 2007. |
	<a href="http://extensiblecad.com/words/2007/11/20/pdmwe-api-201-a-simple-addin-to-pull-document-numbers-on-demand/">Permalink</a> |
	<a href="http://extensiblecad.com/words/2007/11/20/pdmwe-api-201-a-simple-addin-to-pull-document-numbers-on-demand/#comments">6 comments</a> |
	Add to
	<a href="http://del.icio.us/post?url=http://extensiblecad.com/words/2007/11/20/pdmwe-api-201-a-simple-addin-to-pull-document-numbers-on-demand/&amp;title=PDMWE API 201 &#8211; A Simple Addin To Pull Document Numbers On Demand"><img src="http://yoursite.com/images/icons/delicious.gif" border="0"> del.icio.us</a>
	<a href="http://www.digg.com/submit"><img src="http://yoursite.com/images/digg.gif" border="0"> digg</a><br/>
	Who's linking ?
	<a href="http://www.technorati.com/search/http://extensiblecad.com/words/2007/11/20/pdmwe-api-201-a-simple-addin-to-pull-document-numbers-on-demand/" title="Search on Technorati"><img src="http://yoursite.com/images/icons/technorati.gif" border="0">Technorati</a>
	<a href="http://www.blogpulse.com/search?query=http://extensiblecad.com/words/2007/11/20/pdmwe-api-201-a-simple-addin-to-pull-document-numbers-on-demand/" title="Search on Blogpulse"><img src="http://yoursite.com/images/icons/blogpulse.gif" border="0">BlogPulse</a>
	<a href="http://google.com/blogsearch?q=http://extensiblecad.com/words/2007/11/20/pdmwe-api-201-a-simple-addin-to-pull-document-numbers-on-demand/" title="Search on Google Blog Search"><img src="http://yoursite.com/images/icons/google.gif" border="0">Google</a><br/>
	Want more on these topics ? Browse the archive of posts filed under <a href="http://extensiblecad.com/words/category/net/" title="View all posts in .NET" rel="category tag">.NET</a>, <a href="http://extensiblecad.com/words/category/com/" title="View all posts in COM" rel="category tag">COM</a>, <a href="http://extensiblecad.com/words/category/pdmplm/pdmwe/" title="View all posts in PDMWE" rel="category tag">PDMWE</a>, <a href="http://extensiblecad.com/words/category/pdmplm/pdmwe/pdmwe-api/" title="View all posts in PDMWE API" rel="category tag">PDMWE API</a>, <a href="http://extensiblecad.com/words/category/pdmworks-enterprise/" title="View all posts in PDMWorks Enterprise" rel="category tag">PDMWorks Enterprise</a>.</small></p>
<p>Copyright 2007 <a href=http://extensiblecad.com/words>Extensible By Design.</a>  All rights reserved.</p>]]></content:encoded>
			<wfw:commentRss>http://extensiblecad.com/words/2007/11/20/pdmwe-api-201-a-simple-addin-to-pull-document-numbers-on-demand/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
