<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Using MSBATCH to replace cells from Windows Explorer </title><link>https://communities.bentley.com/products/microstation/w/askinga/383/using-msbatch-to-replace-cells-from-windows-explorer</link><description>Articles previously found in the &amp;quot;AskInga&amp;quot; Community.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Using MSBATCH to replace cells from Windows Explorer </title><link>https://communities.bentley.com/products/microstation/w/askinga/383/using-msbatch-to-replace-cells-from-windows-explorer</link><pubDate>Wed, 09 Jun 2010 17:57:47 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3fe0d94c-49ad-4e96-94f6-df97a2eaf259</guid><dc:creator>Inga Morozoff</dc:creator><comments>https://communities.bentley.com/products/microstation/w/askinga/383/using-msbatch-to-replace-cells-from-windows-explorer#comments</comments><description>Current Revision posted to [Archived] AskInga Wiki by Inga Morozoff on 6/9/2010 5:57:47 PM&lt;br /&gt;
&lt;p&gt;&lt;img height="76" width="230" src="/askIngaPics/askingalogo.gif" alt="Ask Inga logo" border="0" title="Ask?Inga" /&gt; &lt;/p&gt;
&lt;p&gt;With thanks to &lt;em&gt;Duane Marshall&lt;/em&gt; for contributing this workflow that will allow you to replace cells by simply selecting a customized right-click menu item when using &lt;em&gt;Windows Explorer&lt;/em&gt;. It&amp;#39;s really quick slick! &lt;/p&gt;
&lt;div style="border-bottom:#cccccc 1pt solid;"&gt;&lt;/div&gt;
&lt;p&gt;Simply put, an &lt;em&gt;MS-DOS Batch File&lt;/em&gt; is a text file filled with DOS commands that will be executed by the Windows operating system. Batch files have an extension of &lt;em&gt;bat&lt;/em&gt; are commonly used to run frequently used commands such as deleting a series of files, renaming files, or running an program. If you&amp;#39;re new to the concept of using or writing up batch files, you might want to explore a &lt;a href="http://www.google.com/search?hl=en&amp;amp;lr=&amp;amp;q=define%3A+batch+file&amp;amp;btnG=Search"&gt;few external links&lt;/a&gt; first. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this sample tutorial, a little batch file is written to replace cells called &lt;em&gt;prelim&lt;/em&gt; with cells called &lt;em&gt;final&lt;/em&gt; using &lt;em&gt;msbatch&lt;/em&gt; as the mechanism to make the file changes. If you&amp;#39;re completly unfamiliar with msbatch, you may want to read this first:&amp;nbsp;&amp;nbsp;&lt;a href="/Communities/Other_Communities/AskInga/w/AskInga/using-msbatch-for-command-line-processing-.aspx"&gt;Using MSBATCH for command line processing &lt;/a&gt;&amp;nbsp;&amp;nbsp;(was *** &lt;a href="http://www.askinga.com/article.asp?ArticleID=52"&gt;Understanding and using MSBATCH&lt;/a&gt;&amp;nbsp;*** ) . In addition, take a peek at MicroStation&amp;#39;s HELP file and specifically search on &lt;em&gt;repcell&lt;/em&gt;. Ok, now you can proceed. &lt;br /&gt;&lt;br /&gt;To get started open any text editor and write the following commands as it would apply to your situation.&lt;br /&gt;Save the file with a &lt;em&gt;bat&lt;/em&gt; extension and in a safe folder such as &lt;em&gt;c:\batch\&lt;/em&gt;: &lt;br /&gt;&lt;br /&gt;@echo off&lt;br /&gt;c:&lt;br /&gt;cd..&lt;br /&gt;cd..&lt;br /&gt;cd..&lt;br /&gt;cd program files\bentley\program\microstation&lt;br /&gt;msbatch repcell.ma %1 &amp;quot;k:\projects\2007\cell\ABCompany.cel&amp;quot; y prelim final&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Where:&lt;br /&gt;&lt;em&gt;@echo off&lt;/em&gt; suppresses the printing of each command in the window.&lt;br /&gt;Refer to &lt;a href="http://en.wikipedia.org/wiki/Batch_file"&gt;Wikipedia &amp;gt; Batch File&lt;/a&gt; for additional information.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;cd..&lt;/em&gt; changes the current folder.&lt;br /&gt;See also: &lt;a href="http://en.wikipedia.org/wiki/List_of_DOS_commands#cd_or_chdir"&gt;Wikipedia &amp;gt; List of DOS Commands&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;program files\bentley\program\microstation&lt;/em&gt; would be the install folder of your MicroStation.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;msbatch repcell.ma&lt;/em&gt; kicks off the &lt;em&gt;msbatch&lt;/em&gt; utility with the Replace Cell application.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;%1&lt;/em&gt; gets converted to a file name.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;quot;k:\projects\2007\cell\ABCompany.cel&amp;quot;&lt;/em&gt; is the name of the cell library.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;y&lt;/em&gt; tells the replace cells application to save the attributes&lt;br /&gt;&lt;br /&gt;&lt;em&gt;prelim&lt;/em&gt; is the name of the cell to replace&lt;br /&gt;&lt;br /&gt;&lt;em&gt;final&lt;/em&gt; is the name of the replacment cell. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The next task is to add a shortcut that points to the batch file in the Windows Explorer right click menu. For example, when selecting and right-clicking on a design file in Windows Explorer, the following menu will appear. (Note, that your menu may be slightly different depending on your operating system and installed software). &lt;/p&gt;
&lt;table cellpadding="6" border="0" style="width:100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic1.jpg" align="left" border="0" alt="" /&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;In Windows Explorer, select &lt;em&gt;Tools &amp;gt; Folder Options...&lt;/em&gt;&lt;br /&gt;In the resulting dialog, navigate to the &lt;em&gt;File Types&lt;/em&gt; tab and highlight &lt;em&gt;DGN&lt;/em&gt; &lt;/p&gt;
&lt;table cellpadding="6" border="0" style="width:100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic2.jpg" align="left" border="0" alt="" /&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Choose &lt;em&gt;Advanced &amp;gt; New&lt;/em&gt; and fill in the following fields:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Action&lt;/em&gt; is the name of the entry that will be added to the right click menu.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Application used to perform action&lt;/em&gt; would be the location and name of the batch file created earlier.&lt;br /&gt;Don&amp;#39;t forget to put &lt;em&gt;&amp;quot;%1&amp;quot;&lt;/em&gt; at the end so that the selected file will be acted upon.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Use DDE&lt;/em&gt; enabled. &lt;br /&gt;&lt;br /&gt;&lt;em&gt;Application&lt;/em&gt; set to &lt;em&gt;ustation&lt;/em&gt;&lt;br /&gt;Note, depending upon how many version sof MicroStation you have running, you may need to input the entire path in this field.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Topic&lt;/em&gt; set to &lt;em&gt;System&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Note, to learn more about Dynamic Data Exchange refer to Windows Help or &lt;a href="http://en.wikipedia.org/wiki/Dynamic_Data_Exchange"&gt;Wikipedia &amp;gt; Dynamic Data Exchange&lt;/a&gt; &lt;/p&gt;
&lt;table cellpadding="6" border="0" style="width:100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic3.jpg" align="left" border="0" alt="" /&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Save all of the changes and then go proceed to right click on any MicroStation design file via Windows Explorer. Note the addition of the &lt;em&gt;Update Prelim cell to Final cell&lt;/em&gt; menu item as per the above instructions. Selecting this option will execute the commands located in the batch file. In this case, msbatch will replace cells called &lt;em&gt;prelim&lt;/em&gt; with cells called &lt;em&gt;final&lt;/em&gt; and will do do without actually starting MicroStation. That&amp;#39;s the power of &lt;em&gt;msbatch&lt;/em&gt;! &lt;/p&gt;
&lt;table cellpadding="6" border="0" style="width:100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic4.jpg" align="left" border="0" alt="" /&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Troubleshooting&lt;/strong&gt;&lt;br /&gt;Double check your syntax!&lt;br /&gt;Ensure that each command entry in the batch file is correct.&lt;br /&gt;In other words...will they run successfully on their own in a DOS Command Window?&lt;br /&gt;If not, you&amp;#39;ve probably got a typo. ;-) &lt;/p&gt;
&lt;table cellpadding="6" border="0" style="width:100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic5.jpg" align="left" border="0" alt="" /&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;As you can see, knowing just a wee bit of DOS can open an entirely new world for you. Of course, it goes without saying that you should always test this kind of stuff on scrap files. Also note that the information contained in this article is designed for experienced users.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;This information is supplied as is and does not come with support. AskInga, Bentley Systems Inc., and the author of the workflow assumes no liability for damages direct, indirect, or consequential, which may result from the use of these instructions. Use these instructions at your own risk.&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;AskInga Article #309 &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Askinga, Cells, Windows Interacting with&lt;/div&gt;
</description></item><item><title>Using msbatch to replace cells from Windows Explorer </title><link>https://communities.bentley.com/products/microstation/w/askinga/383/using-msbatch-to-replace-cells-from-windows-explorer/revision/4</link><pubDate>Wed, 09 Jun 2010 12:47:46 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3fe0d94c-49ad-4e96-94f6-df97a2eaf259</guid><dc:creator>Inga Morozoff</dc:creator><comments>https://communities.bentley.com/products/microstation/w/askinga/383/using-msbatch-to-replace-cells-from-windows-explorer#comments</comments><description>Revision 4 posted to [Archived] AskInga Wiki by Inga Morozoff on 6/9/2010 12:47:46 PM&lt;br /&gt;
&lt;p&gt;&lt;img height="76" width="230" src="/askIngaPics/askingalogo.gif" alt="Ask Inga logo" border="0" title="Ask?Inga" /&gt; &lt;/p&gt;
&lt;p&gt;With thanks to &lt;em&gt;Duane Marshall&lt;/em&gt; for contributing this workflow that will allow you to replace cells by simply selecting a customized right-click menu item when using &lt;em&gt;Windows Explorer&lt;/em&gt;. It&amp;#39;s really quick slick! &lt;/p&gt;
&lt;div style="border-bottom:#cccccc 1pt solid;"&gt;&lt;/div&gt;
&lt;p&gt;Simply put, an &lt;em&gt;MS-DOS Batch File&lt;/em&gt; is a text file filled with DOS commands that will be executed by the Windows operating system. Batch files have an extension of &lt;em&gt;bat&lt;/em&gt; are commonly used to run frequently used commands such as deleting a series of files, renaming files, or running an program. If you&amp;#39;re new to the concept of using or writing up batch files, you might want to explore a &lt;a href="http://www.google.com/search?hl=en&amp;amp;lr=&amp;amp;q=define%3A+batch+file&amp;amp;btnG=Search"&gt;few external links&lt;/a&gt; first. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this sample tutorial, a little batch file is written to replace cells called &lt;em&gt;prelim&lt;/em&gt; with cells called &lt;em&gt;final&lt;/em&gt; using &lt;em&gt;msbatch&lt;/em&gt; as the mechanism to make the file changes. If you&amp;#39;re completly unfamiliar with msbatch, you may want to read this first:&amp;nbsp;&amp;nbsp;&lt;a href="/Communities/Other_Communities/AskInga/w/AskInga/using-msbatch-for-command-line-processing-.aspx"&gt;Using MSBATCH for command line processing &lt;/a&gt;&amp;nbsp;&amp;nbsp;(was *** &lt;a href="http://www.askinga.com/article.asp?ArticleID=52"&gt;Understanding and using MSBATCH&lt;/a&gt;&amp;nbsp;*** ) . In addition, take a peek at MicroStation&amp;#39;s HELP file and specifically search on &lt;em&gt;repcell&lt;/em&gt;. Ok, now you can proceed. &lt;br /&gt;&lt;br /&gt;To get started open any text editor and write the following commands as it would apply to your situation.&lt;br /&gt;Save the file with a &lt;em&gt;bat&lt;/em&gt; extension and in a safe folder such as &lt;em&gt;c:\batch\&lt;/em&gt;: &lt;br /&gt;&lt;br /&gt;@echo off&lt;br /&gt;c:&lt;br /&gt;cd..&lt;br /&gt;cd..&lt;br /&gt;cd..&lt;br /&gt;cd program files\bentley\program\microstation&lt;br /&gt;msbatch repcell.ma %1 &amp;quot;k:\projects\2007\cell\ABCompany.cel&amp;quot; y prelim final&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Where:&lt;br /&gt;&lt;em&gt;@echo off&lt;/em&gt; suppresses the printing of each command in the window.&lt;br /&gt;Refer to &lt;a href="http://en.wikipedia.org/wiki/Batch_file"&gt;Wikipedia &amp;gt; Batch File&lt;/a&gt; for additional information.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;cd..&lt;/em&gt; changes the current folder.&lt;br /&gt;See also: &lt;a href="http://en.wikipedia.org/wiki/List_of_DOS_commands#cd_or_chdir"&gt;Wikipedia &amp;gt; List of DOS Commands&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;program files\bentley\program\microstation&lt;/em&gt; would be the install folder of your MicroStation.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;msbatch repcell.ma&lt;/em&gt; kicks off the &lt;em&gt;msbatch&lt;/em&gt; utility with the Replace Cell application.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;%1&lt;/em&gt; gets converted to a file name.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;quot;k:\projects\2007\cell\ABCompany.cel&amp;quot;&lt;/em&gt; is the name of the cell library.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;y&lt;/em&gt; tells the replace cells application to save the attributes&lt;br /&gt;&lt;br /&gt;&lt;em&gt;prelim&lt;/em&gt; is the name of the cell to replace&lt;br /&gt;&lt;br /&gt;&lt;em&gt;final&lt;/em&gt; is the name of the replacment cell. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The next task is to add a shortcut that points to the batch file in the Windows Explorer right click menu. For example, when selecting and right-clicking on a design file in Windows Explorer, the following menu will appear. (Note, that your menu may be slightly different depending on your operating system and installed software). &lt;/p&gt;
&lt;table cellpadding="6" border="0" style="width:100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic1.jpg" align="left" border="0" alt="" /&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;In Windows Explorer, select &lt;em&gt;Tools &amp;gt; Folder Options...&lt;/em&gt;&lt;br /&gt;In the resulting dialog, navigate to the &lt;em&gt;File Types&lt;/em&gt; tab and highlight &lt;em&gt;DGN&lt;/em&gt; &lt;/p&gt;
&lt;table cellpadding="6" border="0" style="width:100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic2.jpg" align="left" border="0" alt="" /&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Choose &lt;em&gt;Advanced &amp;gt; New&lt;/em&gt; and fill in the following fields:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Action&lt;/em&gt; is the name of the entry that will be added to the right click menu.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Application used to perform action&lt;/em&gt; would be the location and name of the batch file created earlier.&lt;br /&gt;Don&amp;#39;t forget to put &lt;em&gt;&amp;quot;%1&amp;quot;&lt;/em&gt; at the end so that the selected file will be acted upon.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Use DDE&lt;/em&gt; enabled. &lt;br /&gt;&lt;br /&gt;&lt;em&gt;Application&lt;/em&gt; set to &lt;em&gt;ustation&lt;/em&gt;&lt;br /&gt;Note, depending upon how many version sof MicroStation you have running, you may need to input the entire path in this field.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Topic&lt;/em&gt; set to &lt;em&gt;System&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Note, to learn more about Dynamic Data Exchange refer to Windows Help or &lt;a href="http://en.wikipedia.org/wiki/Dynamic_Data_Exchange"&gt;Wikipedia &amp;gt; Dynamic Data Exchange&lt;/a&gt; &lt;/p&gt;
&lt;table cellpadding="6" border="0" style="width:100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic3.jpg" align="left" border="0" alt="" /&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Save all of the changes and then go proceed to right click on any MicroStation design file via Windows Explorer. Note the addition of the &lt;em&gt;Update Prelim cell to Final cell&lt;/em&gt; menu item as per the above instructions. Selecting this option will execute the commands located in the batch file. In this case, msbatch will replace cells called &lt;em&gt;prelim&lt;/em&gt; with cells called &lt;em&gt;final&lt;/em&gt; and will do do without actually starting MicroStation. That&amp;#39;s the power of &lt;em&gt;msbatch&lt;/em&gt;! &lt;/p&gt;
&lt;table cellpadding="6" border="0" style="width:100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic4.jpg" align="left" border="0" alt="" /&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Troubleshooting&lt;/strong&gt;&lt;br /&gt;Double check your syntax!&lt;br /&gt;Ensure that each command entry in the batch file is correct.&lt;br /&gt;In other words...will they run successfully on their own in a DOS Command Window?&lt;br /&gt;If not, you&amp;#39;ve probably got a typo. ;-) &lt;/p&gt;
&lt;table cellpadding="6" border="0" style="width:100%;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic5.jpg" align="left" border="0" alt="" /&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;As you can see, knowing just a wee bit of DOS can open an entirely new world for you. Of course, it goes without saying that you should always test this kind of stuff on scrap files. Also note that the information contained in this article is designed for experienced users.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;This information is supplied as is and does not come with support. AskInga, Bentley Systems Inc., and the author of the workflow assumes no liability for damages direct, indirect, or consequential, which may result from the use of these instructions. Use these instructions at your own risk.&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;AskInga Article #309 &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Askinga, Cells, Windows Interacting with&lt;/div&gt;
</description></item><item><title>Using msbatch to replace cells from Windows Explorer </title><link>https://communities.bentley.com/products/microstation/w/askinga/383/using-msbatch-to-replace-cells-from-windows-explorer/revision/3</link><pubDate>Mon, 09 Jun 2008 13:54:20 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3fe0d94c-49ad-4e96-94f6-df97a2eaf259</guid><dc:creator>CTennyson</dc:creator><comments>https://communities.bentley.com/products/microstation/w/askinga/383/using-msbatch-to-replace-cells-from-windows-explorer#comments</comments><description>Revision 3 posted to [Archived] AskInga Wiki by CTennyson on 6/9/2008 1:54:20 PM&lt;br /&gt;
&lt;p&gt;
&lt;img src="/askIngaPics/askingalogo.gif" border="0" alt="Ask Inga logo" title="Ask?Inga" width="230" height="76" /&gt; 
&lt;/p&gt;
&lt;p&gt;
With thanks to &lt;em&gt;Duane Marshall&lt;/em&gt; for contributing this workflow that will allow you to replace cells by simply selecting a customized right-click menu item when using &lt;em&gt;Windows Explorer&lt;/em&gt;. It's really quick slick! 
&lt;/p&gt;
&lt;div style="border-bottom: #cccccc 1pt solid"&gt;
&lt;/div&gt;
&lt;p&gt;
Simply put, an &lt;em&gt;MS-DOS Batch File&lt;/em&gt; is a text file filled with DOS commands that will be executed by the Windows operating system. Batch files have an extension of &lt;em&gt;bat&lt;/em&gt; are commonly used to run frequently used commands such as deleting a series of files, renaming files, or running an program. If you're new to the concept of using or writing up batch files, you might want to explore a &lt;a href="http://www.google.com/search?hl=en&amp;amp;lr=&amp;amp;q=define%3A+batch+file&amp;amp;btnG=Search"&gt;few external links&lt;/a&gt; first. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this sample tutorial, a little batch file is written to replace cells called &lt;em&gt;prelim&lt;/em&gt; with cells called &lt;em&gt;final&lt;/em&gt; using &lt;em&gt;msbatch&lt;/em&gt; as the mechanism to make the file changes. If you're completly unfamiliar with msbatch, you may want to read this first:&amp;nbsp;&amp;nbsp;&lt;a href="/Communities/Other_Communities/AskInga/w/AskInga/using-msbatch-for-command-line-processing-.aspx"&gt;Using MSBATCH for command line processing &lt;/a&gt;&amp;nbsp;&amp;nbsp;(was *** &lt;a href="http://www.askinga.com/article.asp?ArticleID=52"&gt;Understanding and using MSBATCH&lt;/a&gt;&amp;nbsp;*** ) . In addition, take a peek at MicroStation's HELP file and specifically search on &lt;em&gt;repcell&lt;/em&gt;. Ok, now you can proceed. &lt;br /&gt;
&lt;br /&gt;
To get started open any text editor and write the following commands as it would apply to your situation.&lt;br /&gt;
Save the file with a &lt;em&gt;bat&lt;/em&gt; extension and in a safe folder such as &lt;em&gt;c:\batch\&lt;/em&gt;: &lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
c:&lt;br /&gt;
cd..&lt;br /&gt;
cd..&lt;br /&gt;
cd..&lt;br /&gt;
cd program files\bentley\program\microstation&lt;br /&gt;
msbatch repcell.ma %1 &amp;quot;k:\projects\2007\cell\ABCompany.cel&amp;quot; y prelim final&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;em&gt;@echo off&lt;/em&gt; suppresses the printing of each command in the window.&lt;br /&gt;
Refer to &lt;a href="http://en.wikipedia.org/wiki/Batch_file"&gt;Wikipedia &amp;gt; Batch File&lt;/a&gt; for additional information.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;cd..&lt;/em&gt; changes the current folder.&lt;br /&gt;
See also: &lt;a href="http://en.wikipedia.org/wiki/List_of_DOS_commands#cd_or_chdir"&gt;Wikipedia &amp;gt; List of DOS Commands&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;program files\bentley\program\microstation&lt;/em&gt; would be the install folder of your MicroStation.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;msbatch repcell.ma&lt;/em&gt; kicks off the &lt;em&gt;msbatch&lt;/em&gt; utility with the Replace Cell application.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;%1&lt;/em&gt; gets converted to a file name.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;&amp;quot;k:\projects\2007\cell\ABCompany.cel&amp;quot;&lt;/em&gt; is the name of the cell library.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;y&lt;/em&gt; tells the replace cells application to save the attributes&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;prelim&lt;/em&gt; is the name of the cell to replace&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;final&lt;/em&gt; is the name of the replacment cell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next task is to add a shortcut that points to the batch file in the Windows Explorer right click menu. For example, when selecting and right-clicking on a design file in Windows Explorer, the following menu will appear. (Note, that your menu may be slightly different depending on your operating system and installed software). 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic1.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
In Windows Explorer, select &lt;em&gt;Tools &amp;gt; Folder Options...&lt;/em&gt;&lt;br /&gt;
In the resulting dialog, navigate to the &lt;em&gt;File Types&lt;/em&gt; tab and highlight &lt;em&gt;DGN&lt;/em&gt; 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic2.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Choose &lt;em&gt;Advanced &amp;gt; New&lt;/em&gt; and fill in the following fields:&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Action&lt;/em&gt; is the name of the entry that will be added to the right click menu.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Application used to perform action&lt;/em&gt; would be the location and name of the batch file created earlier.&lt;br /&gt;
Don't forget to put &lt;em&gt;&amp;quot;%1&amp;quot;&lt;/em&gt; at the end so that the selected file will be acted upon.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Use DDE&lt;/em&gt; enabled. &lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Application&lt;/em&gt; set to &lt;em&gt;ustation&lt;/em&gt;&lt;br /&gt;
Note, depending upon how many version sof MicroStation you have running, you may need to input the entire path in this field.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Topic&lt;/em&gt; set to &lt;em&gt;System&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
Note, to learn more about Dynamic Data Exchange refer to Windows Help or &lt;a href="http://en.wikipedia.org/wiki/Dynamic_Data_Exchange"&gt;Wikipedia &amp;gt; Dynamic Data Exchange&lt;/a&gt; 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic3.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Save all of the changes and then go proceed to right click on any MicroStation design file via Windows Explorer. Note the addition of the &lt;em&gt;Update Prelim cell to Final cell&lt;/em&gt; menu item as per the above instructions. Selecting this option will execute the commands located in the batch file. In this case, msbatch will replace cells called &lt;em&gt;prelim&lt;/em&gt; with cells called &lt;em&gt;final&lt;/em&gt; and will do do without actually starting MicroStation. That's the power of &lt;em&gt;msbatch&lt;/em&gt;! 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic4.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
&lt;strong&gt;Troubleshooting&lt;/strong&gt;&lt;br /&gt;
Double check your syntax!&lt;br /&gt;
Ensure that each command entry in the batch file is correct.&lt;br /&gt;
In other words...will they run successfully on their own in a DOS Command Window?&lt;br /&gt;
If not, you've probably got a typo. ;-) 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic5.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
As you can see, knowing just a wee bit of DOS can open an entirely new world for you. Of course, it goes without saying that you should always test this kind of stuff on scrap files. Also note that the information contained in this article is designed for experienced users.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;This information is supplied as is and does not come with support. AskInga, Bentley Systems Inc., and the author of the workflow assumes no liability for damages direct, indirect, or consequential, which may result from the use of these instructions. Use these instructions at your own risk.&lt;/em&gt;&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
AskInga Article #309 
&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Askinga, Cells, Windows Interacting with&lt;/div&gt;
</description></item><item><title>Using msbatch to replace cells from Windows Explorer </title><link>https://communities.bentley.com/products/microstation/w/askinga/383/using-msbatch-to-replace-cells-from-windows-explorer/revision/2</link><pubDate>Fri, 16 May 2008 19:06:19 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3fe0d94c-49ad-4e96-94f6-df97a2eaf259</guid><dc:creator>Frank Conforti</dc:creator><comments>https://communities.bentley.com/products/microstation/w/askinga/383/using-msbatch-to-replace-cells-from-windows-explorer#comments</comments><description>Revision 2 posted to [Archived] AskInga Wiki by Frank Conforti on 5/16/2008 7:06:19 PM&lt;br /&gt;
&lt;p&gt;
&lt;img src="/askIngaPics/askingalogo.gif" border="0" alt="Ask Inga logo" title="Ask?Inga" width="230" height="76" /&gt; 
&lt;/p&gt;
&lt;p&gt;
With thanks to &lt;em&gt;Duane Marshall&lt;/em&gt; for contributing this workflow that will allow you to replace cells by simply selecting a customized right-click menu item when using &lt;em&gt;Windows Explorer&lt;/em&gt;. It's really quick slick! 
&lt;/p&gt;
&lt;div style="border-bottom: #cccccc 1pt solid"&gt;
&lt;/div&gt;
&lt;p&gt;
Simply put, an &lt;em&gt;MS-DOS Batch File&lt;/em&gt; is a text file filled with DOS commands that will be executed by the Windows operating system. Batch files have an extension of &lt;em&gt;bat&lt;/em&gt; are commonly used to run frequently used commands such as deleting a series of files, renaming files, or running an program. If you're new to the concept of using or writing up batch files, you might want to explore a &lt;a href="http://www.google.com/search?hl=en&amp;amp;lr=&amp;amp;q=define%3A+batch+file&amp;amp;btnG=Search"&gt;few external links&lt;/a&gt; first. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this sample tutorial, a little batch file is written to replace cells called &lt;em&gt;prelim&lt;/em&gt; with cells called &lt;em&gt;final&lt;/em&gt; using &lt;em&gt;msbatch&lt;/em&gt; as the mechanism to make the file changes. If you're completly unfamiliar with msbatch, you may want to read this first:&amp;nbsp;&amp;nbsp;[[Using MSBATCH for command line processing]]&amp;nbsp;&amp;nbsp;(was *** &lt;a href="http://www.askinga.com/article.asp?ArticleID=52"&gt;Understanding and using MSBATCH&lt;/a&gt;&amp;nbsp;*** ) . In addition, take a peek at MicroStation's HELP file and specifically search on &lt;em&gt;repcell&lt;/em&gt;. Ok, now you can proceed. &lt;br /&gt;
&lt;br /&gt;
To get started open any text editor and write the following commands as it would apply to your situation.&lt;br /&gt;
Save the file with a &lt;em&gt;bat&lt;/em&gt; extension and in a safe folder such as &lt;em&gt;c:\batch\&lt;/em&gt;: &lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
c:&lt;br /&gt;
cd..&lt;br /&gt;
cd..&lt;br /&gt;
cd..&lt;br /&gt;
cd program files\bentley\program\microstation&lt;br /&gt;
msbatch repcell.ma %1 &amp;quot;k:\projects\2007\cell\ABCompany.cel&amp;quot; y prelim final&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;em&gt;@echo off&lt;/em&gt; suppresses the printing of each command in the window.&lt;br /&gt;
Refer to &lt;a href="http://en.wikipedia.org/wiki/Batch_file"&gt;Wikipedia &amp;gt; Batch File&lt;/a&gt; for additional information.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;cd..&lt;/em&gt; changes the current folder.&lt;br /&gt;
See also: &lt;a href="http://en.wikipedia.org/wiki/List_of_DOS_commands#cd_or_chdir"&gt;Wikipedia &amp;gt; List of DOS Commands&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;program files\bentley\program\microstation&lt;/em&gt; would be the install folder of your MicroStation.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;msbatch repcell.ma&lt;/em&gt; kicks off the &lt;em&gt;msbatch&lt;/em&gt; utility with the Replace Cell application.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;%1&lt;/em&gt; gets converted to a file name.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;&amp;quot;k:\projects\2007\cell\ABCompany.cel&amp;quot;&lt;/em&gt; is the name of the cell library.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;y&lt;/em&gt; tells the replace cells application to save the attributes&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;prelim&lt;/em&gt; is the name of the cell to replace&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;final&lt;/em&gt; is the name of the replacment cell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next task is to add a shortcut that points to the batch file in the Windows Explorer right click menu. For example, when selecting and right-clicking on a design file in Windows Explorer, the following menu will appear. (Note, that your menu may be slightly different depending on your operating system and installed software). 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic1.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
In Windows Explorer, select &lt;em&gt;Tools &amp;gt; Folder Options...&lt;/em&gt;&lt;br /&gt;
In the resulting dialog, navigate to the &lt;em&gt;File Types&lt;/em&gt; tab and highlight &lt;em&gt;DGN&lt;/em&gt; 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic2.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Choose &lt;em&gt;Advanced &amp;gt; New&lt;/em&gt; and fill in the following fields:&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Action&lt;/em&gt; is the name of the entry that will be added to the right click menu.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Application used to perform action&lt;/em&gt; would be the location and name of the batch file created earlier.&lt;br /&gt;
Don't forget to put &lt;em&gt;&amp;quot;%1&amp;quot;&lt;/em&gt; at the end so that the selected file will be acted upon.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Use DDE&lt;/em&gt; enabled. &lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Application&lt;/em&gt; set to &lt;em&gt;ustation&lt;/em&gt;&lt;br /&gt;
Note, depending upon how many version sof MicroStation you have running, you may need to input the entire path in this field.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Topic&lt;/em&gt; set to &lt;em&gt;System&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
Note, to learn more about Dynamic Data Exchange refer to Windows Help or &lt;a href="http://en.wikipedia.org/wiki/Dynamic_Data_Exchange"&gt;Wikipedia &amp;gt; Dynamic Data Exchange&lt;/a&gt; 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic3.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Save all of the changes and then go proceed to right click on any MicroStation design file via Windows Explorer. Note the addition of the &lt;em&gt;Update Prelim cell to Final cell&lt;/em&gt; menu item as per the above instructions. Selecting this option will execute the commands located in the batch file. In this case, msbatch will replace cells called &lt;em&gt;prelim&lt;/em&gt; with cells called &lt;em&gt;final&lt;/em&gt; and will do do without actually starting MicroStation. That's the power of &lt;em&gt;msbatch&lt;/em&gt;! 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic4.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
&lt;strong&gt;Troubleshooting&lt;/strong&gt;&lt;br /&gt;
Double check your syntax!&lt;br /&gt;
Ensure that each command entry in the batch file is correct.&lt;br /&gt;
In other words...will they run successfully on their own in a DOS Command Window?&lt;br /&gt;
If not, you've probably got a typo. ;-) 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic5.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
As you can see, knowing just a wee bit of DOS can open an entirely new world for you. Of course, it goes without saying that you should always test this kind of stuff on scrap files. Also note that the information contained in this article is designed for experienced users.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;This information is supplied as is and does not come with support. AskInga, Bentley Systems Inc., and the author of the workflow assumes no liability for damages direct, indirect, or consequential, which may result from the use of these instructions. Use these instructions at your own risk.&lt;/em&gt;&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
AskInga Article #309 
&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: &lt;tags&gt;&lt;/tags&gt;&lt;/div&gt;
</description></item><item><title>Using msbatch to replace cells from Windows Explorer </title><link>https://communities.bentley.com/products/microstation/w/askinga/383/using-msbatch-to-replace-cells-from-windows-explorer/revision/1</link><pubDate>Fri, 16 May 2008 18:24:29 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3fe0d94c-49ad-4e96-94f6-df97a2eaf259</guid><dc:creator>Frank Conforti</dc:creator><comments>https://communities.bentley.com/products/microstation/w/askinga/383/using-msbatch-to-replace-cells-from-windows-explorer#comments</comments><description>Revision 1 posted to [Archived] AskInga Wiki by Frank Conforti on 5/16/2008 6:24:29 PM&lt;br /&gt;
&lt;p&gt;
&lt;img src="/askIngaPics/askingalogo.gif" border="0" alt="Ask Inga logo" title="Ask?Inga" width="230" height="76" /&gt; 
&lt;/p&gt;
&lt;p&gt;
With thanks to &lt;em&gt;Duane Marshall&lt;/em&gt; for contributing this workflow that will allow you to replace cells by simply selecting a customized right-click menu item when using &lt;em&gt;Windows Explorer&lt;/em&gt;. It's really quick slick! 
&lt;/p&gt;
&lt;div style="border-bottom: #cccccc 1pt solid"&gt;
&lt;/div&gt;
&lt;p&gt;
Simply put, an &lt;em&gt;MS-DOS Batch File&lt;/em&gt; is a text file filled with DOS commands that will be executed by the Windows operating system. Batch files have an extension of &lt;em&gt;bat&lt;/em&gt; are commonly used to run frequently used commands such as deleting a series of files, renaming files, or running an program. If you're new to the concept of using or writing up batch files, you might want to explore a &lt;a href="http://www.google.com/search?hl=en&amp;amp;lr=&amp;amp;q=define%3A+batch+file&amp;amp;btnG=Search"&gt;few external links&lt;/a&gt; first. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this sample tutorial, a little batch file is written to replace cells called &lt;em&gt;prelim&lt;/em&gt; with cells called &lt;em&gt;final&lt;/em&gt; using &lt;em&gt;msbatch&lt;/em&gt; as the mechanism to make the file changes. If you're completly unfamiliar with msbatch, you may want to read this first: ***&lt;a href="http://www.askinga.com/article.asp?ArticleID=52"&gt;Understanding and using MSBATCH&lt;/a&gt;***. In addition, take a peek at MicroStation's HELP file and specifically search on &lt;em&gt;repcell&lt;/em&gt;. Ok, now you can proceed. &lt;br /&gt;
&lt;br /&gt;
To get started open any text editor and write the following commands as it would apply to your situation.&lt;br /&gt;
Save the file with a &lt;em&gt;bat&lt;/em&gt; extension and in a safe folder such as &lt;em&gt;c:\batch\&lt;/em&gt;: &lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
c:&lt;br /&gt;
cd..&lt;br /&gt;
cd..&lt;br /&gt;
cd..&lt;br /&gt;
cd program files\bentley\program\microstation&lt;br /&gt;
msbatch repcell.ma %1 &amp;quot;k:\projects\2007\cell\ABCompany.cel&amp;quot; y prelim final&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;em&gt;@echo off&lt;/em&gt; suppresses the printing of each command in the window.&lt;br /&gt;
Refer to &lt;a href="http://en.wikipedia.org/wiki/Batch_file"&gt;Wikipedia &amp;gt; Batch File&lt;/a&gt; for additional information.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;cd..&lt;/em&gt; changes the current folder.&lt;br /&gt;
See also: &lt;a href="http://en.wikipedia.org/wiki/List_of_DOS_commands#cd_or_chdir"&gt;Wikipedia &amp;gt; List of DOS Commands&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;program files\bentley\program\microstation&lt;/em&gt; would be the install folder of your MicroStation.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;msbatch repcell.ma&lt;/em&gt; kicks off the &lt;em&gt;msbatch&lt;/em&gt; utility with the Replace Cell application.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;%1&lt;/em&gt; gets converted to a file name.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;&amp;quot;k:\projects\2007\cell\ABCompany.cel&amp;quot;&lt;/em&gt; is the name of the cell library.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;y&lt;/em&gt; tells the replace cells application to save the attributes&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;prelim&lt;/em&gt; is the name of the cell to replace&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;final&lt;/em&gt; is the name of the replacment cell. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next task is to add a shortcut that points to the batch file in the Windows Explorer right click menu. For example, when selecting and right-clicking on a design file in Windows Explorer, the following menu will appear. (Note, that your menu may be slightly different depending on your operating system and installed software). 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic1.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
In Windows Explorer, select &lt;em&gt;Tools &amp;gt; Folder Options...&lt;/em&gt;&lt;br /&gt;
In the resulting dialog, navigate to the &lt;em&gt;File Types&lt;/em&gt; tab and highlight &lt;em&gt;DGN&lt;/em&gt; 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic2.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Choose &lt;em&gt;Advanced &amp;gt; New&lt;/em&gt; and fill in the following fields:&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Action&lt;/em&gt; is the name of the entry that will be added to the right click menu.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Application used to perform action&lt;/em&gt; would be the location and name of the batch file created earlier.&lt;br /&gt;
Don't forget to put &lt;em&gt;&amp;quot;%1&amp;quot;&lt;/em&gt; at the end so that the selected file will be acted upon.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Use DDE&lt;/em&gt; enabled. &lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Application&lt;/em&gt; set to &lt;em&gt;ustation&lt;/em&gt;&lt;br /&gt;
Note, depending upon how many version sof MicroStation you have running, you may need to input the entire path in this field.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Topic&lt;/em&gt; set to &lt;em&gt;System&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
Note, to learn more about Dynamic Data Exchange refer to Windows Help or &lt;a href="http://en.wikipedia.org/wiki/Dynamic_Data_Exchange"&gt;Wikipedia &amp;gt; Dynamic Data Exchange&lt;/a&gt; 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic3.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
Save all of the changes and then go proceed to right click on any MicroStation design file via Windows Explorer. Note the addition of the &lt;em&gt;Update Prelim cell to Final cell&lt;/em&gt; menu item as per the above instructions. Selecting this option will execute the commands located in the batch file. In this case, msbatch will replace cells called &lt;em&gt;prelim&lt;/em&gt; with cells called &lt;em&gt;final&lt;/em&gt; and will do do without actually starting MicroStation. That's the power of &lt;em&gt;msbatch&lt;/em&gt;! 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic4.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
&lt;strong&gt;Troubleshooting&lt;/strong&gt;&lt;br /&gt;
Double check your syntax!&lt;br /&gt;
Ensure that each command entry in the batch file is correct.&lt;br /&gt;
In other words...will they run successfully on their own in a DOS Command Window?&lt;br /&gt;
If not, you've probably got a typo. ;-) 
&lt;/p&gt;
&lt;table border="0" cellpadding="6" width="100%"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="top" valign="top"&gt;&lt;img src="/askIngaPics/309Pic5.jpg" border="0" align="left" /&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
As you can see, knowing just a wee bit of DOS can open an entirely new world for you. Of course, it goes without saying that you should always test this kind of stuff on scrap files. Also note that the information contained in this article is designed for experienced users.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;This information is supplied as is and does not come with support. AskInga, Bentley Systems Inc., and the author of the workflow assumes no liability for damages direct, indirect, or consequential, which may result from the use of these instructions. Use these instructions at your own risk.&lt;/em&gt;&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
AskInga Article #309
&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: &lt;tags&gt;&lt;/tags&gt;&lt;/div&gt;
</description></item></channel></rss>