<?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>程远 李's Activities</title><link>https://communities.bentley.com/members/3b0ee5bb_2d00_2706_2d00_4462_2d00_82ec_2d00_a6a573c2ba6c</link><description>程远 李's recent activity</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>[MSCE C++ 创建层和删除层中所有元素的问题]</title><link>https://communities.bentley.com/communities/other_communities/chinafirst/f/microstation-projectwise/187880/msce-c</link><pubDate>Fri, 01 Nov 2019 01:49:12 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:f9dd0aa8-d0b8-4b4f-ae9c-0608e1bdd48b</guid><dc:creator>程远 李</dc:creator><description>&lt;p&gt;我创建了一个层，然后在该层上做一些操作，另外又做了一个功能，用于清除该层上所有元素。结果&lt;span&gt;清除&lt;/span&gt;的时候总是把别的层的元素也删除了，有时候会崩溃，麻烦老师帮我找找原因。&lt;/p&gt;
&lt;p&gt;创建层的代码：&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;auto ret = mdlLevel_isValidByName(ACTIVEMODEL, 0, L&amp;quot;MyLevel&amp;quot;);
if (!ret)
{
    mdlLevel_create(nullptr, ACTIVEMODEL, L&amp;quot;MyLevel&amp;quot;, LEVEL_NULL_CODE);
    mdlLevelTable_rewrite(ACTIVEMODEL);
}
mdlLevel_setActiveByName(0, L&amp;quot;MyLevel&amp;quot;);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;删除层上所有元素的代码：&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;DgnPlatform::LevelId lid = 0;
if (SUCCESS != mdlLevel_getIdFromName(&amp;amp;lid, ACTIVEMODEL, 0, L&amp;quot;MyLevel&amp;quot;))
{
	return;
}
auto sc = ScanCriteria::Create();
sc-&amp;gt;AddSingleLevelTest(lid);
sc-&amp;gt;SetModelRef(ACTIVEMODEL);
sc-&amp;gt;SetElemRefCallback([](ElementRefP el, CallbackArgP, ScanCriteriaP)-&amp;gt;int
{
	auto model = el-&amp;gt;GetDgnModelP();
	if (mdlModelRef_isActiveModel(model))
	{
		EditElementHandle eeh(el);
		if (eeh.IsPersistent())
		{
			eeh.DeleteFromModel();
		}
	}
	return 0;
}, nullptr);
sc-&amp;gt;Scan();
ScanCriteria::Delete(sc);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Let me Help You</title><link>https://communities.bentley.com/achievements/687f4b6d-e18a-4e55-836c-49926ca2c9d9</link><pubDate>Wed, 25 Sep 2019 02:35:12 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4e9e3686-417e-4c1d-843e-cf87195fe3f0</guid><dc:creator /><description>Answer a question that is verified as helpful or correct.</description></item><item><title>[MSCE C++]如何用代码实现change mesh normal的相关功能？</title><link>https://communities.bentley.com/communities/other_communities/chinafirst/f/microstation-projectwise/185968/msce-c-change-mesh-normal</link><pubDate>Mon, 23 Sep 2019 08:15:58 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:0d40a594-1d53-42f2-910e-ba31806c365e</guid><dc:creator>程远 李</dc:creator><description>&lt;p&gt;在mesh工具里有一个change mesh normal按钮，可以实现unify normals(法线方向统一)和reverse normal(法线反向)两个功能，请问这两个功能如何用代码实现？我试过&lt;/p&gt;
&lt;div class="header"&gt;
&lt;div class="headertitle"&gt;
&lt;div class="title"&gt;PolyfaceHeader的ReverseNormals函数，好像不管用。。。。。&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[MSTN CE C++]问个基础问题</title><link>https://communities.bentley.com/communities/other_communities/chinafirst/f/microstation-projectwise/185463/mstn-ce-c</link><pubDate>Thu, 12 Sep 2019 06:36:18 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2b0345f5-029a-4a17-9782-b55edc9c328d</guid><dc:creator>程远 李</dc:creator><description>&lt;p&gt;写了个放置工具类，发现放置过程中那个红框里的东东很烦人，不知道如何隐藏。。。（我的工具是在二维平面获取一个矩形区域，所以那个东东没用）&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/520x398/__key/communityserver-discussions-components-files/343510/0333.png" /&gt;&lt;/p&gt;
&lt;p&gt;问题比较基础，请高手勿笑。。。&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>如何将mesh网格投影到XY平面？</title><link>https://communities.bentley.com/communities/other_communities/chinafirst/f/microstation-projectwise/185018/mesh-xy</link><pubDate>Wed, 04 Sep 2019 07:33:31 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:b1985ddd-669f-44e8-8226-3ff39edab6da</guid><dc:creator>程远 李</dc:creator><description>&lt;p&gt;想将一个三维mesh网格投影到XY平面。。。&lt;/p&gt;
&lt;p&gt;原网格：&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/509x203/__key/communityserver-discussions-components-files/343510/2260.png" /&gt;&lt;/p&gt;
&lt;p&gt;投影后：&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/565x240/__key/communityserver-discussions-components-files/343510/1067.png" /&gt;&lt;/p&gt;
&lt;p&gt;请问如何达到这样的效果？？？&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[ORD CE C++]怎样在交互工具里让用户选择一个只读元素？</title><link>https://communities.bentley.com/communities/other_communities/chinafirst/f/microstation-projectwise/184533/ord-ce-c</link><pubDate>Mon, 26 Aug 2019 05:44:38 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:1b7aae9f-3fcf-42d1-9ce1-8b63f2b0a673</guid><dc:creator>程远 李</dc:creator><description>&lt;p&gt;我在界面上弄了个按钮，想让用户点击后加载一个交互工具，选择一个元素。&lt;/p&gt;
&lt;p&gt;目前我是使用了一个继承自DgnElementSetTool的子类做的，在_OnElementModify中获取选择集进行操作，但问题是对于参考进来的只读元素无法进行选择，重写了_OnPostLocate函数也无济于事，请问该如何实现？实在不行，就只能让用户先选择了。。。&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[ORD CE c++]如何从DTM中获取数据？</title><link>https://communities.bentley.com/communities/other_communities/chinafirst/f/microstation-projectwise/183803/ord-ce-c-dtm</link><pubDate>Fri, 09 Aug 2019 08:25:22 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:32674c5e-a229-4fd8-ad32-1d1fdd99f402</guid><dc:creator>程远 李</dc:creator><description>&lt;p&gt;我从一个地形模型(Terrain Model)中获取了DTM，代码如下：&lt;/p&gt;
&lt;p&gt;auto ts = TerrainSurface::CreateFromElementHandle(eeh);&lt;br /&gt; if (!ts.IsValid())&lt;br /&gt; {&lt;br /&gt;&amp;nbsp; mdlDialog_dmsgsPrint(L&amp;quot;not a terrain surface&amp;quot;);&lt;br /&gt;&amp;nbsp; return;&lt;br /&gt; }&lt;br /&gt; DTMPtr dtm = ts-&amp;gt;GetDTM();&lt;br /&gt; if (!dtm.IsValid())&lt;br /&gt; {&lt;br /&gt;&amp;nbsp; mdlDialog_dmsgsPrint(L&amp;quot;invalid dtm&amp;quot;);&lt;br /&gt;&amp;nbsp; return;&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;现在不知道怎么从DTM中获取Mesh网格、等高线等数据。IDTM.h里有很多抽象接口类，里面提供了一些函数，但不知道如何使用，还望高手予以解答。&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[ORD CE c++]How to get data from DTM?</title><link>https://communities.bentley.com/products/road___site_design/f/geopak-inroads-mx-openroads-forum/183806/ord-ce-c-how-to-get-data-from-dtm</link><pubDate>Fri, 09 Aug 2019 08:47:00 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:868a28d2-3e6e-4fc8-b9d6-92df762939fa</guid><dc:creator>程远 李</dc:creator><description>&lt;p&gt;I am trying to get data from a terrain model. now i have got DTM object:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;auto ts = TerrainSurface::CreateFromElementHandle(eeh);&lt;br /&gt; if (!ts.IsValid())&lt;br /&gt; {&lt;br /&gt; mdlDialog_dmsgsPrint(L&amp;quot;not a terrain surface&amp;quot;);&lt;br /&gt; return;&lt;br /&gt; }&lt;br /&gt; DTMPtr dtm = ts-&amp;gt;GetDTM();&lt;br /&gt; if (!dtm.IsValid())&lt;br /&gt; {&lt;br /&gt; mdlDialog_dmsgsPrint(L&amp;quot;invalid dtm&amp;quot;);&lt;br /&gt; return;&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;eeh is the&amp;nbsp;ElementHandle of the terrain model object. Could anyone tell me how to deal with the &lt;span&gt;DTM object?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Ask A Question I</title><link>https://communities.bentley.com/achievements/460ac7df-7ccc-4c42-a204-9e05eef3be09</link><pubDate>Tue, 30 Jul 2019 00:37:52 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:11a19860-3199-44cc-a77b-7e3c81292158</guid><dc:creator /><description>Ask a question in a forum.</description></item><item><title>【ORD CE c++】现在有一个通过tin文件导入获得的地形模型，类型为Terrain，请问如何获取指定x,y坐标的高程</title><link>https://communities.bentley.com/communities/other_communities/chinafirst/f/microstation-projectwise/183254/ord-ce-c-tin-terrain-x-y</link><pubDate>Tue, 30 Jul 2019 06:42:46 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:970f9b0c-ee61-4af8-9967-f0c314eec3fe</guid><dc:creator>程远 李</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/343510/7065.question.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>