<?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>[CONNECT Update 14 VBA] Issue with CreateDesignFile Method</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/210749/connect-update-14-vba-issue-with-createdesignfile-method</link><description>Hi, Im relatively new to Microstation VBA and this is my first time posting here. My company recently upgraded from Microstation V8i (Select Series 4) to Microstation Connect Edition (Update 14). Code that includes the CreateDesignFile Method will run</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: [CONNECT Update 14 VBA] Issue with CreateDesignFile Method</title><link>https://communities.bentley.com/thread/638108?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 15:43:56 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:eaa1cf74-5705-4bfb-a259-796bb24de7e8</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="1103107" url="~/products/programming/microstation_programming/f/microstation-programming---forum/210749/connect-update-14-vba-issue-with-createdesignfile-method/637801"]Our V8i projects were setup with a seed file called &amp;quot;Seed3d&amp;quot; that they put on our c drive&amp;#39;s with the Config variable containing the local path[/quote]
&lt;p&gt;There are a number of MicroStation &lt;a title="MicroStation Help: Seed Files Configuration Variables" href="https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v17/en/GUID-83CD505E-5EF0-D799-ADF8-5DB17A5C56A0.html" rel="noopener noreferrer" target="_blank"&gt;configuration variables concerning seed files&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The two that are relevant to you are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;MS_SEEDFILES&lt;/code&gt; Search path(s) for all seed files&lt;/li&gt;
&lt;li&gt;&lt;code&gt;MS_DESIGNSEED&lt;/code&gt; Default seed file&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;In a configuration file your CAD admin can write something like this:&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;MS_SEEDFILES  = //NetworkServer/Common Files/MicroStation/Seed Files/
MS_DESIGNSEED = seedsishenlocal3d.dgn &lt;/pre&gt;
&lt;p&gt;You can write VBA code to get those configuration variable values...&lt;/p&gt;
&lt;pre&gt;Dim seedFileFolder As String
seedFileFolder = ActiveWorkspace.ConfigurationVariableValue(&amp;quot;MS_SEEDFILES&amp;quot;)
Dim defaultSeedFile As String
defaultSeedFile = ActiveWorkspace.ConfigurationVariableValue(&amp;quot;MS_DESIGNSEED&amp;quot;)
Dim seedFileName As String
seedFileName = seedFileFolder &amp;amp; seedFileName&lt;/pre&gt;
&lt;p&gt;Now you don&amp;#39;t have to hard-wire your seed file name or location into your code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT Update 14 VBA] Issue with CreateDesignFile Method</title><link>https://communities.bentley.com/thread/637801?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 10:02:47 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:0b7d5d40-f62d-4484-86b4-c4fcfd5ecea4</guid><dc:creator>Timothy Russell</dc:creator><description>&lt;p&gt;Thank you for the help Jan.&amp;nbsp; I checked some older files, prior to Connect our V8i projects were setup with a seed file called &amp;quot;Seed3d&amp;quot; that they put on our c drive&amp;#39;s with the Config variable containing the local path.&amp;nbsp; Now they use&amp;nbsp;&lt;span&gt;&amp;quot;seedsishenlocal3d.dgn&amp;quot; on the network drive.&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT Update 14 VBA] Issue with CreateDesignFile Method</title><link>https://communities.bentley.com/thread/637800?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 09:47:06 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ce396d8d-fd65-4d36-8423-a2a69d553c6f</guid><dc:creator>Jan Šlegr</dc:creator><description>[quote userid="1103107" url="~/products/programming/microstation_programming/f/microstation-programming---forum/210749/connect-update-14-vba-issue-with-createdesignfile-method/637787"]My workspace and MS_SEEDFILES configuration variables are set up by our survey department.[/quote]
&lt;p&gt;If there is an application, used in company, the workflow has to support it and to be configured properly.&lt;/p&gt;
&lt;p&gt;Fortunately there are more ways (places) how configuration variable can be defined. Not only on system level, but e.g. using own application cfg file, or, in the worst case, in .ucf file.&lt;/p&gt;
[quote userid="1103107" url="~/products/programming/microstation_programming/f/microstation-programming---forum/210749/connect-update-14-vba-issue-with-createdesignfile-method/637787"]although I feel this is also bad practice as it is&amp;nbsp;using a specific file name&amp;nbsp;on the network.&amp;nbsp; [/quote]
&lt;p&gt;There is no difference whether files are on network or on local drive.&lt;/p&gt;
&lt;p&gt;Seed file is important when pre-configured to contain specific settings, even when with increasing usage of dgnlibs a number of settings in seed file is decreasing.&lt;/p&gt;
&lt;p&gt;So based on why the new file is created, a proper seed file should be used. And when it&amp;#39;s not important, probably the best is to use some from seed files delivered with MicroStation itself.&lt;/p&gt;
[quote userid="1103107" url="~/products/programming/microstation_programming/f/microstation-programming---forum/210749/connect-update-14-vba-issue-with-createdesignfile-method/637787"]Is there still something missing or incorrect in my setup, like I said before I could just use &amp;quot;Seed3d&amp;quot; when running the code with V8i.[/quote]
&lt;p&gt;Compare used workspace (or generate msdebug files for V8i and CE) to find what is set differently.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT Update 14 VBA] Issue with CreateDesignFile Method</title><link>https://communities.bentley.com/thread/637787?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 09:01:32 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ef331b96-7d8c-4ed6-b22c-daed49c6379d</guid><dc:creator>Timothy Russell</dc:creator><description>&lt;p&gt;Hi Jan, My workspace and MS_SEEDFILES configuration variables are set up by our survey department.&amp;nbsp; The config variable is just a folder path with two seed files in the folder&amp;nbsp;&amp;quot;seedsishenlocal2d.dgn&amp;quot; and &amp;quot;seedsishenlocal3d.dgn&amp;quot;, if I use&amp;nbsp;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;seedsishenlocal3d.dgn&amp;quot; in the CreateDesignFile Method it works, although I feel this is also bad practice as it is&amp;nbsp;using a specific file name&amp;nbsp;on the network.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is there still something missing or incorrect in my setup, like I said before I could just use &amp;quot;Seed3d&amp;quot; when running the code with V8i.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Tim&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT Update 14 VBA] Issue with CreateDesignFile Method</title><link>https://communities.bentley.com/thread/637774?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 08:14:02 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:6b448510-49ab-4b5f-ba91-535747667140</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Tim,&lt;/p&gt;
[quote userid="1103107" url="~/products/programming/microstation_programming/f/microstation-programming---forum/210749/connect-update-14-vba-issue-with-createdesignfile-method/637771"]I replaced &amp;quot;Seed3d.dgn&amp;quot; with the full file path&amp;nbsp;in my code and it worked.[/quote]
&lt;p&gt;be aware such solution is wrong for more reasons!&lt;/p&gt;
&lt;p&gt;As mentioned in the method description: &amp;quot;The name of the seed file. &lt;span style="text-decoration:underline;"&gt;Should not include a path.&lt;/span&gt; The default extension is &amp;quot;.dgn&amp;quot;. &amp;quot;&lt;/p&gt;
&lt;p&gt;And it&amp;#39;s general software development rule: No code is allowed to contain hard coded path. Never. Otherwise it&amp;#39;s dirty and potentially buggy.&lt;/p&gt;
&lt;p&gt;Your code has to follow MicroStation standards. A location of seed files is defined by configuration variable (MS_SEEDFILES) and all used seeds have to be there. So the only acceptable solution is to use properly configured workspace, where seed files are at location where MicroStation expects them.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT Update 14 VBA] Issue with CreateDesignFile Method</title><link>https://communities.bentley.com/thread/637771?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 08:06:44 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:aff6fe11-e731-43ad-a8d7-12d33d81357f</guid><dc:creator>Timothy Russell</dc:creator><description>&lt;p&gt;Thanks for the help Jan, It seems that is the issue, I replaced &amp;quot;Seed3d.dgn&amp;quot; with the full file path&amp;nbsp;in my code and it worked.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Tim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT Update 14 VBA] Issue with CreateDesignFile Method</title><link>https://communities.bentley.com/thread/637749?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 06:54:52 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:be9c8d5f-8123-46ba-aaf9-2a04a28f9210</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Timothy,&lt;/p&gt;
&lt;p&gt;I guess the problem is in the used seed file. Does the file &amp;quot;Seed3d.dgn&amp;quot; exist and is the used workspace configured properly, so it can be found by MicroStation?&lt;/p&gt;
&lt;p&gt;In MicroStation CE, the seed file &amp;quot;seed3d.dgn&amp;quot; is not delivered, so if you want to use it (e.g. because it contains company specific settings), you have to add it to your workspace. Or to use some from seed files, delivered with MicroStation CE.&lt;/p&gt;
&lt;p&gt;And one more comment: I guess to use &amp;quot;C:\Microstation Files\Test&amp;quot; is incorrect, because as described in MicroStation VBA help, MicroStation does not add extensions. So I guess the right format is &amp;quot;C:\Microstation Files\Test.dgn&amp;quot;.&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>