<?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>Maury's Activities</title><link>https://communities.bentley.com/members/d42b333d_2d00_2068_2d00_4c6a_2d00_a865_2d00_4a0b88840100</link><description>Maury's recent activity</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>[Connect C#] Creating Cell Elements from Cell Library using DGNPlatformNet</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/249098/connect-c-creating-cell-elements-from-cell-library-using-dgnplatformnet</link><pubDate>Thu, 17 Aug 2023 19:01:05 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:860a86c4-fa6a-459f-ae45-e267ef1146ae</guid><dc:creator>Maury</dc:creator><description>&lt;p&gt;Can we please get someone from Bentley to comment on the proper way of plotting cell elements from a cell library?&lt;/p&gt;
&lt;p&gt;I have been using a very convoluted process to get these elements copied from the cell model into the active model for 18 updates of Connect now.&lt;/p&gt;
&lt;p&gt;Accounting for things such as annotation scaling, unit differences, parametric properties, or any other weirdness, is not intuitive at all and has lead to constant problems when trying to plot cells.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This question has been raised several times for years now.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/171397/microstation-connect-c-place-cell-as-annotation-cell/515612"&gt;RE: MicroStation Connect C# Place cell as Annotation Cell&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/171402/connect-place-normal-cell-instance-from-library"&gt;[CONNECT] Place Normal Cell Instance from Library&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/115781/connect-c-placing-cells"&gt;[CONNECT C#] Placing cells&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[Connect U17 c++] Support for C++20 or 17</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/248544/connect-u17-c-support-for-c-20-or-17</link><pubDate>Fri, 04 Aug 2023 19:13:58 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:fecacd29-06b0-4f5f-9056-c0822b041dcd</guid><dc:creator>Maury</dc:creator><description>&lt;p&gt;I have updated to the latest SDK for Connect which has a default toolset requirement of VS2019 or better.&amp;nbsp; As such, I would expect that c++17 or c++20 features would be recognized.&lt;/p&gt;
&lt;p&gt;When trying to use c++17 features,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
const std::string myString = &amp;quot;My Hello World Wow&amp;quot;;
if (const auto it = myString.find(&amp;quot;World&amp;quot;); it != std::string::npos)
std::cout &amp;lt;&amp;lt; it &amp;lt;&amp;lt; &amp;quot; World\n&amp;quot;;
else
std::cout &amp;lt;&amp;lt; it &amp;lt;&amp;lt; &amp;quot; not found!!\n&amp;quot;;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am getting a build error&lt;/p&gt;
&lt;p&gt;error C2429: language feature &amp;#39;init-statements in if/switch&amp;#39; requires compiler flag &amp;#39;/std:c++17&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Are the newer iterations of c++ supported by the latest SDK, and if so how would I go about modifying the makefile to add the compiler flag?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[Update 14] How to create and edit coordinate systems?</title><link>https://communities.bentley.com/products/microstation/f/microstation-forum/197096/update-14-how-to-create-and-edit-coordinate-systems</link><pubDate>Tue, 12 May 2020 19:57:06 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:fad52f23-7910-4c9e-820b-17bd9fe8c374</guid><dc:creator>Maury</dc:creator><description>&lt;p&gt;In the &amp;quot;Update 14! What&amp;#39;s New in MicroStation CONNECT Edition&amp;quot; video, there is a segment for &amp;quot;Copy and Edit a geography coordinate system&amp;quot;&lt;/p&gt;
&lt;p&gt;See here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://youtu.be/bOmt5ETu62M?t=249"&gt;https://youtu.be/bOmt5ETu62M?t=249&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, I do not see an option to edit the coordinate systems.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[MSCE Update 17 C#] Create BSpline Curve through points</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/243780/msce-update-17-c-create-bspline-curve-through-points</link><pubDate>Tue, 04 Apr 2023 14:09:19 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4d4ddbaf-84d1-4ba7-ab2f-955c23b9917f</guid><dc:creator>Frank Schneller</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;I need the same in C# as MicroStation does with the KeyIn &lt;span style="color:#0000ff;"&gt;place bspline curve points&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;With the following test code I get a bspline (yellow bspline in the image), but it is not identical to the bspline of the above KeyIn (pink bspline in the image).&lt;br /&gt;But I need the bspline in pink.&lt;br /&gt;Of course, I use the same base points.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;       using BD = Bentley.DgnPlatformNET;
       using BDE = Bentley.DgnPlatformNET.Elements;
       using BG = Bentley.GeometryNET;
       using BIM = Bentley.Interop.MicroStationDGN;
       using BM = Bentley.MstnPlatformNET;
       using BMI = Bentley.MstnPlatformNET.InteropServices;

       private static double GetUors()
       {
            DgnModel activeDgnModel = Session.Instance.GetActiveDgnModel();
            return activeDgnModel.GetModelInfo().UorPerMaster * activeDgnModel.GetModelInfo().UorPerSub;
       } 
       
       public static void TestCreateBsplineCurveElement()
       {
            double uors = GetUors();

            BG.DPoint3d[] points = new BG.DPoint3d[6];
            points[0] = new BG.DPoint3d(31.5 * uors, 114 * uors, 0 * uors);
            points[1] = new BG.DPoint3d(32.5 * uors, 113 * uors, 0 * uors);
            points[2] = new BG.DPoint3d(37.5 * uors, 111 * uors, 0 * uors);
            points[3] = new BG.DPoint3d(75 * uors, 106 * uors, 0 * uors);
            points[4] = new BG.DPoint3d(253 * uors, 100 * uors, 0 * uors);
            points[5] = new BG.DPoint3d(254 * uors, 100 * uors, 0 * uors);

            BG.MSBsplineCurve curve = BG.MSBsplineCurve.CreateFromPoints(points);
            BD.DgnModel dgnModel = BM.Session.Instance.GetActiveDgnModel();
            BDE.BSplineCurveElement curveElem = new BDE.BSplineCurveElement(dgnModel, null, curve);
            curveElem.AddToModel();
        }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/343173/bspline.png" /&gt;&lt;/p&gt;
&lt;p&gt;Many greetings&lt;br /&gt;Frank&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>IntegrationTest.</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/237786/integrationtest</link><pubDate>Tue, 01 Nov 2022 18:31:15 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:16453045-70d0-4086-8f91-80b7c97a44ad</guid><dc:creator>Ivan Petrov</dc:creator><description>&lt;p&gt;Hi, &lt;br /&gt;I want to cover my code with integration tests.&lt;br /&gt;Is it possible to open the dgn file for tests?&lt;br /&gt;&lt;br /&gt;how I tried to solve it:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;DgnDocument targetDgnDocument = DgnDocument.CreateForLocalFile(dgnFilePath);
DgnFileOwner dgnFileOwner = DgnFile.Create(targetDgnDocument, DgnFileOpenMode.ReadWrite);
DgnFile dgnFile = dgnFileOwner.DgnFile;
DgnModel dgnModel = dgnFile.LoadRootModelById(out var statusInt, dgnFile.DefaultModelId);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I got an exception:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;System.BadImageFormatException: &amp;#39;Could not load file or assembly &amp;#39;Bentley.DgnPlatformNET, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4bf6c96a266e58d4&amp;#39; or one of its dependencies. An attempt was made to load a program with an incorrect format.&amp;#39;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[Connect U17 c# WPF] Problems with DockableToolbar</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/237777/connect-u17-c-wpf-problems-with-dockabletoolbar</link><pubDate>Tue, 01 Nov 2022 15:20:04 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:7cd4c04a-1c73-46ca-83d5-5477c31877af</guid><dc:creator>Maury</dc:creator><description>&lt;p&gt;I am trying to recreate the example from &lt;strong&gt;examples\WPFDemo\&lt;/strong&gt; however, I am having a couple of issues.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1) When the toolbox is closed, it is throwing an exception (&amp;#39;System.ComponentModel.Win32Exception&amp;#39; in WindowsBase.dll)..The exception seems to be handled , though it is displayed in my visual studio&amp;#39;s immediate window.&amp;nbsp; While the exception is not causing a hard error, it is causing the toolbox to run poorly in debug mode and I doubt that is an expected behavior. Every time the toolbox is reopened and closed, the exception is compounded further..&lt;/p&gt;
&lt;p&gt;Additionally, after the first exception appears, it seems to infect every toolbox and it will appear anytime another toolbox is brought into focus.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2) The drag symbol on the left side of the toolbar that appears when a toolbox is docked is not showing.. It seems the usercontrol is sitting ontop of it regardless of any margins or alignment applied.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any thoughts on these issues would be appreciated.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/343173/pastedimage1667315511369v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;public class MsToolbox : DockableToolbar, IGuiDockable
    {
        public MsToolbox(UserControl toolboxUserControl)
        {
            Content = toolboxUserControl;
            Title = &amp;quot;Test&amp;quot;;

            AttachingToHost += OnAttachingToHost;
            DetachingFromHost += OnDetachingFromHost;
            Attach(TopoCloudClient.Addin, &amp;quot;Testing&amp;quot;);
            
        }

        private void OnDetachingFromHost(object sender, EventArgs e)
        {
            Debug.Print(&amp;quot;Detaching&amp;quot;);

        }

        private void OnAttachingToHost(object sender, AttachingToHostEventArgs e)
        {
            e.AttachPoint = new Point(0, 0);
            Debug.Print(&amp;quot;Attaching&amp;quot;);
        }

        protected override void OnClosed(EventArgs e)
        {
            base.OnClosed(e);
            Detach();
            Dispose();
        }


        #region IGuiDockable Members

        private Size _rejectedSize = Size.Empty;

        public bool GetDockedExtent (GuiDockPosition dockPosition, ref GuiDockExtent extentFlag, ref Size dockExtent)
        {
            
            dockExtent.Height = CommonDockSize.Height;
            
            if (dockPosition == GuiDockPosition.Top ||
                dockPosition == GuiDockPosition.Bottom)
            {
                dockExtent.Width = (int) ActualWidth + 25;
                extentFlag = GuiDockExtent.Specified;
            }
            else if (dockPosition == GuiDockPosition.NotDocked)
                extentFlag = GuiDockExtent.Specified;
            else
                extentFlag = GuiDockExtent.InvalidRegion;
            return true;
        }

        public bool WindowMoving (WindowMovingCorner corners, ref Size newSize)
        {
            newSize.Height = CommonDockSize.Height;

            if (corners != WindowMovingCorner.LowerRight || _rejectedSize.Equals (newSize))
            {
                _rejectedSize = newSize;
                newSize.Width = (int) ActualWidth;
            }

            return true;
        }

        #endregion
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="xml"&gt;&amp;lt;UserControl x:Class=&amp;quot;TopoCloud_Client.Windows.TopoDOT.Toolboxes.Point_Cloud_Snap_Mode.PointCloudSnapModeWindow&amp;quot;
                      xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;
                      xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;
                      xmlns:userControls=&amp;quot;clr-namespace:TopoCloud_Client.Common.User_Controls&amp;quot;
					  xmlns:viewModels=&amp;quot;clr-namespace:TopoCloud_Client.Windows.TopoDOT.Toolboxes.Point_Cloud_Snap_Mode.View_Models&amp;quot;
                      xmlns:mc=&amp;quot;http://schemas.openxmlformats.org/markup-compatibility/2006&amp;quot; 
                      xmlns:d=&amp;quot;http://schemas.microsoft.com/expression/blend/2008&amp;quot; 
                      mc:Ignorable=&amp;quot;d&amp;quot; 
                      d:DesignHeight=&amp;quot;24&amp;quot;&amp;gt;
					  
	&amp;lt;UserControl.DataContext&amp;gt;
        &amp;lt;viewModels:PointCloudSnapModeViewModel/&amp;gt;
    &amp;lt;/UserControl.DataContext&amp;gt;
					  
    &amp;lt;StackPanel Orientation=&amp;quot;Horizontal&amp;quot;  &amp;gt;
        &amp;lt;CheckBox Margin=&amp;quot;0,0,12,0&amp;quot; VerticalAlignment=&amp;quot;Center&amp;quot;&amp;gt;CheckBox in Toolbar&amp;lt;/CheckBox&amp;gt;
        &amp;lt;Button VerticalAlignment=&amp;quot;Center&amp;quot; MinHeight=&amp;quot;24&amp;quot; Padding=&amp;quot;3&amp;quot;&amp;gt;Button in Toolbar&amp;lt;/Button&amp;gt;
    &amp;lt;/StackPanel&amp;gt;
&amp;lt;/UserControl&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
        public static void OpenToolbox(this UserControl userControl)
        {
            var toolBox = new MsToolbox(userControl);
            toolBox.Show();
        }&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[CONNECT C#] Are unit tests possible?</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/207166/connect-c-are-unit-tests-possible</link><pubDate>Thu, 10 Dec 2020 08:03:21 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:e3efefa5-3e12-4f98-9c9c-f103d2d6f899</guid><dc:creator>Frank Schneller</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;is it possible to cover methods with unit tests that refer to Bentley classes?&lt;/p&gt;
&lt;p&gt;If so, how could you do that?&lt;/p&gt;
&lt;p&gt;Actually, MicroStation must be running to load self-written classes.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Frank&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[CONNECT C#] Create a cell from library using Bentley.DgnPlatformNET/Bentley.GeometryNet (not Interop)</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/197488/connect-c-create-a-cell-from-library-using-bentley-dgnplatformnet-bentley-geometrynet-not-interop</link><pubDate>Tue, 19 May 2020 17:03:48 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:36641343-f1c9-4dfc-9fd0-7784eb04b62b</guid><dc:creator>John Majerle</dc:creator><description>&lt;p&gt;My C# application needs to create both cells from a cell library and other elements (cones, boxes, etc.)&amp;nbsp; I am currently creating the cells using Interop and the other&amp;nbsp;items&amp;nbsp;using Bentley.GeometryNet and&amp;nbsp;Bentley.DgnPlatformNET.&lt;/p&gt;
&lt;p&gt;After creation in memory all of these items need to be manipulated/transformed as a group with every mouse move so I would prefer to not use Interop to create the cells.&amp;nbsp; Can this be done?&amp;nbsp; &amp;nbsp;I looked at the documentation for CellHeaderElement but I don&amp;#39;t see a create method that utilizes a cell library.&amp;nbsp; I also&amp;nbsp;didn&amp;#39;t find any examples&amp;nbsp;that used CellHeaderElement in the&amp;nbsp;MicroStationCONNECTSDK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>WPF Windows Not Accepting Input In Textboxes On Machines With Third Party Mdlapp</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/232324/wpf-windows-not-accepting-input-in-textboxes-on-machines-with-third-party-mdlapp</link><pubDate>Thu, 07 Jul 2022 15:12:51 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:107db6d6-a8de-4204-8bd4-62c703efaf15</guid><dc:creator>Maury</dc:creator><description>&lt;p&gt;I seem to be having an issue with clients that have a separate third party&amp;nbsp; mdl application installed where our textboxes will not receive any input from the keyboard.&lt;/p&gt;
&lt;p&gt;If I disable their separate mdlapp, our plugin will work fine.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Alternatively, if I do NOT attach the wpf window to MicroStation using these lines:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;
    // Create the PowerPlatform Interop Helper and Attach the Window
    _wpfHelper = new WPFInteropHelper(this)
    {
        ForwardEscapeKey = false, ForwardF1Key = false, ForwardFunctionKeys = false,
    };


    _wpfHelper.Attach (Client.Addin,  WindowStartupLocation != WindowStartupLocation.CenterOwner, Title);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;then text boxes will also function properly when they have their separate mdlapp installed.&amp;nbsp;&amp;nbsp; Unfortunately, this causes our windows to fall behind MicroStation and possibly other side affects as well.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Has anyone run into any similar issues?&amp;nbsp; If you can point me to a specific direction to get this resolved, that would be great!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[Bug Connect U16] Incorrect accudraw when moving points</title><link>https://communities.bentley.com/products/microstation/f/microstation-forum/230110/bug-connect-u16-incorrect-accudraw-when-moving-points</link><pubDate>Thu, 19 May 2022 14:17:36 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:65e71a9c-7966-4e63-bb31-af6e21ccb4f9</guid><dc:creator>Maury</dc:creator><description>&lt;p&gt;Selecting an already selected point element to activate &amp;quot;move&amp;quot; is setting the accudraw differently than using the &amp;quot;Move&amp;quot; command or &amp;quot;Click and Dragging&amp;quot; an unselected point.&lt;/p&gt;
&lt;p&gt;See video that shows how it should move and when its moving incorrectly:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://certainty3d-my.sharepoint.com/:v:/g/personal/mauricio_terneus_topodot_com/ERATyWKOhDlJpuuDv9KqZAEBTL6ROjtalN8vrUDpFWwjMA?e=wFAq7W"&gt;https://certainty3d-my.sharepoint.com/:v:/g/personal/mauricio_terneus_topodot_com/ERATyWKOhDlJpuuDv9KqZAEBTL6ROjtalN8vrUDpFWwjMA?e=wFAq7W&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/273/Rt9_5F00_DEMO.dgn"&gt;communities.bentley.com/.../Rt9_5F00_DEMO.dgn&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[MSCE U16 DgnPlatformNet] Elements stored beyond an &amp;quot;Undo&amp;quot; operation are being replaced by new elements</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/230293/msce-u16-dgnplatformnet-elements-stored-beyond-an-undo-operation-are-being-replaced-by-new-elements</link><pubDate>Tue, 24 May 2022 13:22:02 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2e384cbe-ff86-4b1e-a90b-0936d4a8cba1</guid><dc:creator>Maury</dc:creator><description>&lt;p&gt;We are plotting elements and storing them in a List for reference.. What we have noticed is that when the elements are undone, the &amp;quot;IsDeleted&amp;quot; property becomes True and the IsValid property become false as expected....&lt;/p&gt;
&lt;p&gt;However, once we add a new element to the DGN (element.AddToModel()), the elements that we have stored are being replaced one at a time by the newly plotted elements.. (New element ID, IsDeleted = false, and IsValid=true, etc)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This has lead to a verify difficult to pinpoint bug.. Is this intentional design for the API?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Heres a video showing the problem.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://certainty3d-my.sharepoint.com/:v:/g/personal/mauricio_terneus_topodot_com/ETE2PxxHPVJEmsiiM02NjZkBo8t59EbcdfBcjFf9rVwavg?e=u5vmG3"&gt;https://certainty3d-my.sharepoint.com/:v:/g/personal/mauricio_terneus_topodot_com/ETE2PxxHPVJEmsiiM02NjZkBo8t59EbcdfBcjFf9rVwavg?e=u5vmG3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;*Note* I noticed in the video I chained the .GetElementUor() method of my class with the &amp;quot;AddToModel()&amp;quot; method of the returned element, however the change is happening with &amp;quot;AddToModel()&amp;quot; and nothing in my classes are causing this change&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>SDK and Visual Studio 2022 upgradation</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/227012/sdk-and-visual-studio-2022-upgradation</link><pubDate>Mon, 14 Mar 2022 13:10:29 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:dda546a0-0fdc-4013-b1d2-e699fe50d9cf</guid><dc:creator>Senthil Kumar</dc:creator><description>&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/343173/pastedimage1647263407542v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Currently, we are using Microstation CONNECT Edition SDK(v10.15,64bit) which requires Visual studio Professional software 2017&amp;ndash; screenshot attached&lt;br /&gt;we are planning to upgrade Visual studio software - Professional 2022. Request to specify whether SDK V10.15 is supported with Visual Studio Professional 2022 or which version of &lt;br /&gt;SDK needs to be used after upgradation?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[CE U16 C++]Best way to connect a desktop gui application sending and receiving large amounts of data</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/227446/ce-u16-c-best-way-to-connect-a-desktop-gui-application-sending-and-receiving-large-amounts-of-data</link><pubDate>Wed, 23 Mar 2022 13:42:06 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:423676b8-4ded-4087-8d18-508171826aca</guid><dc:creator>Jonathan Unseld</dc:creator><description>&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Hello,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;we are currently migrating an application wich was using the&amp;nbsp;COM connection (which isn&amp;#39;t possible anymore due to the problem described here:&amp;nbsp;&lt;a href="/products/programming/microstation_programming/f/microstation-programming---forum/218237/ce-u16-c-unable-to-create-createcellelement1-with-the-com-api/666854#666854"&gt;https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/218237/ce-u16-c-unable-to-create-createcellelement1-with-the-com-api/666854#666854&lt;/a&gt;). &lt;br /&gt;We planned to create a local tcp connection between our application and a microstation plugin where in the plugin the server runs in a thread and forwards the requests to microstation. This doesn&amp;#39;t work because the Microstation api threw an access violation error when we called IACSManageR::GetManager(while researching this we found that the api apparently shouldn&amp;#39;t be used from other threads &lt;a href="/products/programming/microstation_programming/f/archived-microstation-v8i-programming-forum/60143/multi-threading-in-microstation-c-mdl-functions"&gt;https://communities.bentley.com/products/programming/microstation_programming/f/archived-microstation-v8i-programming-forum/60143/multi-threading-in-microstation-c-mdl-functions&lt;/a&gt;).&amp;nbsp;&lt;br /&gt;So we are now looking for a way to get from the server thread back into the main thread. Our alternative solution would be to write the data to files and send the filenames via icp keyins. For responses from Microstation we would scan for new files at a known location when the engine-&amp;gt;startApp call returns.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Do you know better alternatives to our current approach?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Jonathan Unseld&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[Connect] How to get the name of MicroStation Window</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/188817/connect-how-to-get-the-name-of-microstation-window</link><pubDate>Wed, 20 Nov 2019 10:15:11 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:77f3935a-98b1-4aa9-8a2c-238c78e25d54</guid><dc:creator>Herve Cuzon</dc:creator><description>&lt;p&gt;Hi everybody,&lt;/p&gt;
&lt;p&gt;We have an external Delphi dll&amp;nbsp;where we would like to find the handle of the MicroStation Window with &amp;quot;FindWindow&amp;quot; (function from the Windows API).&lt;/p&gt;
&lt;p&gt;So we need to know the name of the&amp;nbsp;MicroStation Window.&lt;/p&gt;
&lt;p&gt;Can someone give me this name?&lt;/p&gt;
&lt;p&gt;Also is there an other way to get the handle of Microstation (not the handle of a view)?&lt;/p&gt;
&lt;p&gt;Thanks for your help,&lt;/p&gt;
&lt;p&gt;Herv&amp;eacute;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[Connect C#] Bug with YPRAngles.FromNormalizedMatrix(DMatrix3d)</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/225916/connect-c-bug-with-yprangles-fromnormalizedmatrix-dmatrix3d</link><pubDate>Wed, 16 Feb 2022 16:50:59 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:edfa5ce8-8953-4b53-a507-dd959ae78181</guid><dc:creator>Maury</dc:creator><description>&lt;p&gt;There seems to be an issue with YPRAngles.FromNormalizedMatrix when the DMatrix3d is rotated exactly 180 degrees around Z.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;            DMatrix3d test1 = DMatrix3d.Rotation(2, Angle.FromDegrees(179.0));
            System.Diagnostics.Debug.Print(&amp;quot;179.0 -&amp;gt; &amp;quot; + YPRAngles.FromNormalizedMatrix(test1).Yaw.Degrees);
            DMatrix3d test2 = DMatrix3d.Rotation(2, Angle.FromDegrees(180.0));
            System.Diagnostics.Debug.Print(&amp;quot;180.0 -&amp;gt; &amp;quot; + YPRAngles.FromNormalizedMatrix(test2).Yaw.Degrees);
            DMatrix3d test3 = DMatrix3d.Rotation(2, Angle.FromDegrees(181.0));
            System.Diagnostics.Debug.Print(&amp;quot;181.0 -&amp;gt; &amp;quot; + YPRAngles.FromNormalizedMatrix(test3).Yaw.Degrees);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Output: &lt;br /&gt;179.0 -&amp;gt; 179&lt;br /&gt;180.0 -&amp;gt; 0&lt;br /&gt;181.0 -&amp;gt; -179&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I believe this has to do with the final check within the FromNormalizedMatrix static function.&amp;nbsp;&amp;nbsp; This should probably be a &amp;lt;= rather than a &amp;lt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;// Assembly location: C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Bentley.GeometryNET.Structs.dll

    public static YPRAngles FromNormalizedMatrix(DMatrix3d matrix)
    {
      double coffzx = matrix.coffzx;
      double x = Math.Sqrt(matrix.coffzy * matrix.coffzy + matrix.coffzz * matrix.coffzz);
      Angle pitch1 = Angle.Atan2(coffzx, x);
      Angle pitch2 = Angle.Atan2(coffzx, -x);
      if (x &amp;lt; Geometry.SmallAngle)
        return new YPRAngles(Angle.Atan2(-matrix.coffxy, matrix.coffyy), pitch1, Angle.Zero);
      Angle yaw1 = Angle.Atan2(matrix.coffyx, matrix.coffxx);
      Angle roll1 = Angle.Atan2(matrix.coffzy, matrix.coffzz);
      Angle yaw2 = Angle.Atan2(-matrix.coffyx, -matrix.coffxx);
      Angle roll2 = Angle.Atan2(-matrix.coffzy, -matrix.coffzz);
      YPRAngles yprAngles1 = new YPRAngles(yaw1, pitch1, roll1);
      YPRAngles yprAngles2 = new YPRAngles(yaw2, pitch2, roll2);
      return yprAngles1.MaxAbsRadians() &amp;lt; yprAngles2.MaxAbsRadians() ? yprAngles1 : yprAngles2;
    }&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>