<?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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>copy from ref</title><link>https://communities.bentley.com/products/microstation/f/microstation-forum/119215/copy-from-ref</link><description>Helllo,</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Batch Process COPY ELEMENTS FROM REFERENCE</title><link>https://communities.bentley.com/thread/370918?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2016 09:54:05 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3ea09be7-cc54-434e-aff0-9d92b2622f77</guid><dc:creator>Jon Summers</dc:creator><description>&lt;p&gt;[quote user=&amp;quot;Bettina von Reachts&amp;quot;]Is there any instruction to write these kinds of scripts?[/quote]&lt;/p&gt;
&lt;p&gt;A batch script is little more than a sequence of MicroStation key-ins.&amp;nbsp; Search MicroStation help for &lt;em&gt;Batch Process Dialog&lt;/em&gt;...&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#008000;"&gt;The Batch Process utility lets you create and run a script that can be performed on individual files or entire directories of files. The script is a text file that contains a series of MicroStation key-ins that can run commands, MicroStation &lt;a href="/products/microstation/f/273/p/370915/reply/ustnhelp1784.html#F26017"&gt;&lt;span style="color:#008000;"&gt;BASIC macros&lt;/span&gt;&lt;/a&gt;, &lt;a href="/products/microstation/f/273/p/370915/reply/ustnhelp1785.html#P533B"&gt;&lt;span style="color:#008000;"&gt;VBA Macros&lt;/span&gt;&lt;/a&gt;, or &lt;a href="/products/microstation/f/273/p/370915/reply/ustnhelp1786.html#F18833"&gt;&lt;span style="color:#008000;"&gt;MDL applications&lt;/span&gt;&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You need to know about MicroStation command key-ins.&amp;nbsp; The key-in browser (menu &lt;em&gt;Utilities|Key-in&lt;/em&gt;) will help, and some key-ins are even documented in MicroStation help.&lt;/p&gt;
&lt;p&gt;Another way to find what commands MicroStation is using is to record a VBA macro while you perform some task.&amp;nbsp; If you look at the recording, you will see the commands used.&lt;/p&gt;
&lt;p&gt;[quote user=&amp;quot;Bettina von Reachts&amp;quot;]reference merge layer &amp;quot;A[/quote]&lt;/p&gt;
&lt;p&gt;MicroStation has &lt;em&gt;levels&lt;/em&gt;.&amp;nbsp; Other CAD tools may use the term &lt;em&gt;layer&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;[quote user=&amp;quot;Bettina von Reachts&amp;quot;] I tried to also sth with choosing A layer and then merge, but also wrong[/quote]&lt;/p&gt;
&lt;p&gt;Experiment with &lt;em&gt;reference merg&lt;/em&gt;e interactively before you write your batch script.&amp;nbsp; What happens if you turn off all levels except level &lt;em&gt;A&lt;/em&gt;, then do reference merge?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Batch Process COPY ELEMENTS FROM REFERENCE</title><link>https://communities.bentley.com/thread/369192?ContentTypeID=1</link><pubDate>Thu, 26 May 2016 00:12:50 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2b50de6f-5d2a-4f7f-b49f-227c11bb3f7e</guid><dc:creator>Lorys</dc:creator><description>&lt;p&gt;First I think you should create the &amp;nbsp;new &amp;nbsp;levels first in your active file&lt;/p&gt;
&lt;p&gt;then later (I snipped this &amp;nbsp;out from the &amp;nbsp;microstation help &amp;nbsp;under levels keyins, lots of &amp;nbsp;good stuff there worth printing for future use)&lt;/p&gt;
&lt;p&gt;you can use the level element move, to move all &amp;nbsp;objects from one level to another level&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;table border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;LEVEL ELEMENT MOVE [dest:level-spec2] &amp;lt;level-spec1&amp;gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;Moves all elements on &amp;ldquo;level-spec1&amp;rdquo; to specified destination &amp;ldquo;level-spec2&amp;rdquo;. The destination level specification is optional. If it is not specified, then the elements are moved to the &amp;ldquo;Default&amp;rdquo; level.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Then use the &amp;nbsp;keyin to delete empty levels or the compress command with all the options &amp;nbsp;preset&lt;/p&gt;
&lt;p&gt;I suggest &amp;nbsp;you break your script up and test it &amp;nbsp;then &amp;nbsp;join back up if it all works...&lt;/p&gt;
&lt;p&gt;if you save your script say c:\temp\script.txt&lt;/p&gt;
&lt;p&gt;you can add it to an F key &amp;nbsp;as @c:\temp\script.txt then you can run it on a single file by pressing the assigned F key instead of batch processor this is also a quick way to test the &amp;nbsp;script &amp;nbsp;so you dont damage a lot &amp;nbsp;of files with trial and error or just &amp;nbsp;want to do it to one file, plus its quicker than typing&amp;nbsp;&amp;nbsp;@c:\temp\script.txt ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Batch Process COPY ELEMENTS FROM REFERENCE</title><link>https://communities.bentley.com/thread/367778?ContentTypeID=1</link><pubDate>Fri, 13 May 2016 23:25:20 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:8f22b87d-7297-4c10-8c00-781b7b750fd8</guid><dc:creator>Lorys</dc:creator><description>&lt;p&gt;[quote user=&amp;quot;Beata Szpircak&amp;quot;]&lt;/p&gt;
&lt;p&gt;Helllo,&lt;/p&gt;
&lt;p&gt;I have question about how to write script to Batch process, &lt;span style="text-decoration:underline;"&gt;which inludes copying objects from references to dgn&lt;/span&gt;? I have about 500 files, which are empty and are connected with another files with reference. I want to copy all objects from reference to my 500 files.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m a layman. I made only 1 file, which moved some objects from 1 layer to another, but here:&lt;/p&gt;
&lt;p&gt;I tried to connect some sentences, but it didn&amp;#39;t work:&lt;/p&gt;
&lt;p&gt;#Clear SelectBy list&lt;/p&gt;
&lt;p&gt;reference display on *&lt;br /&gt;reference levels on * *;selview all&lt;br /&gt;on=*;selview all&lt;br /&gt;reference display on border&lt;br /&gt;reference levels border;selview all&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:line-through;"&gt;selectby type all;selectby execute;makecopy on;selectby execute;xy=&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;span style="color:#ff0000;"&gt;DELETE THIS LINE and replace with&amp;nbsp;&amp;nbsp;&amp;quot;reference merge all&amp;quot;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;#----------------------------------------------------------------------------------&lt;br /&gt;#fit view&lt;br /&gt;FIT VIEW EXTENDED&lt;/p&gt;
&lt;p&gt;#----------------------------------------------------------------------------------&lt;br /&gt;#file&amp;gt;save settings&lt;br /&gt;filedesign&lt;/p&gt;
&lt;p&gt;#----------------------------------------------------------------------------------&lt;br /&gt;#file&amp;gt;save&lt;br /&gt;save design&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
&lt;p&gt;[/quote]&lt;/p&gt;
&lt;p&gt;See my &amp;nbsp;editing of your script above in red, if you dont do this you will have duplicates of all the elements from the ref files&lt;/p&gt;
&lt;p&gt;The Merge will do the copying &amp;nbsp;for you but remember you only get the elements &amp;nbsp;that are &amp;nbsp;in levels that are &amp;nbsp;turned on&lt;/p&gt;
&lt;p&gt;so you previous commands to turn on levels is correct..&lt;/p&gt;
&lt;p&gt;Beware if you have &amp;nbsp;nested refs ie refs inside refs and you want to turn on all level &amp;nbsp; you need to have &amp;nbsp;extra &amp;nbsp; *.* &amp;nbsp;-&amp;gt; * &amp;nbsp;to turn on &amp;nbsp;levels that are off in the &amp;nbsp;nest..&lt;/p&gt;
&lt;p&gt;But I dont &amp;nbsp;know if thats a good thing either &amp;nbsp;if the &amp;nbsp;files have levels off for &amp;nbsp;presentation both in the &amp;nbsp;ref and &amp;nbsp;nest do you still want &amp;nbsp;capture those &amp;nbsp;elements?&lt;/p&gt;
&lt;p&gt;for more script info &amp;nbsp;on levels look in help especially the special command &amp;nbsp; &amp;nbsp;&amp;quot; -&amp;gt; &amp;quot; &amp;nbsp;for nested refs&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Batch Process COPY ELEMENTS FROM REFERENCE</title><link>https://communities.bentley.com/thread/367691?ContentTypeID=1</link><pubDate>Fri, 13 May 2016 10:57:59 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ecdbddff-af15-4f94-91d0-a4a23af02dbc</guid><dc:creator>Bhavesh</dc:creator><description>Hello Beata Szpircak,&lt;br /&gt;
&lt;br /&gt;
Do you mean you want to Merge all References attached to those 500 files?&lt;br /&gt;
&lt;br /&gt;
If yes you can follow steps given  below.&lt;br /&gt;
1. Open a file have a reference attached &lt;br /&gt;
2. Key in &amp;quot;reference merge all&amp;quot;, it will popup one alert dialog,  &lt;br /&gt;
3 Check ON the &amp;quot;Do not Show this Again&amp;quot; option and click OK.&lt;br /&gt;
4. Now Go to Batch Process Utility.&lt;br /&gt;
5. Add line &amp;quot;reference merge all&amp;quot; to batch process command file.&lt;br /&gt;
6. run this for all the 500 files.&lt;br /&gt;
&lt;br /&gt;
Hope this Helps!&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
Bhavesh&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>