<?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>[MSCE/OPM C#] 在ElementSetTool中如何正确处理选择集？</title><link>https://communities.bentley.com/communities/other_communities/chinafirst/f/microstation-projectwise/189575/msce-opm-c-elementsettool</link><description>在基于OpenPlant CE版的.net二次开发过程中，我定义了一个类继承自DgnElementSetTool，希望实现两个功能： 
 1.允许选择多个元素，允许单击，框选将元素加入选择集，按住Ctrl键单击、框选将已选择的元素从选择集中排除 
 2.通过代码访问DgnElementSetTool的选择集，并进行修改（添加、删除元素） 
 目前我已通过重载 
 WantAddtionalLocate(...) =&amp;gt; true; 
 WantDynamics(...) =&amp;gt; false; 
 WantAccuSnap</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: [MSCE/OPM C#] 在ElementSetTool中如何正确处理选择集？</title><link>https://communities.bentley.com/thread/558384?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2019 05:46:38 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4596ca78-6326-408e-b903-f17be97fd249</guid><dc:creator>HongQiang Guo</dc:creator><description>&lt;p&gt;&lt;span&gt;ElementAgenda本身就是个集合，只不过是没有实现ICollection&amp;lt;Element&amp;gt;接口。通过GetCount、GetEntry就可以遍历其包含的元素。刚刚我也测了一下，貌似反选的确实存在bug，我会马上提交给开发组。有新的情况后再回复您。&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [MSCE/OPM C#] 在ElementSetTool中如何正确处理选择集？</title><link>https://communities.bentley.com/thread/558357?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2019 03:15:45 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:e8fcd2be-9144-4eeb-ba71-c9af55ea94b8</guid><dc:creator>renbo tang</dc:creator><description>&lt;p&gt;我的代码没有什么其他东西了，就只重载了上面提到的几个函数以及&lt;/p&gt;
&lt;p&gt;OnElementModify(...) =&amp;gt; Status.Int.Success;&lt;/p&gt;
&lt;p&gt;OnRestartTool(...) =&amp;gt; ;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [MSCE/OPM C#] 在ElementSetTool中如何正确处理选择集？</title><link>https://communities.bentley.com/thread/558346?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2019 01:55:33 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3aecf910-171c-4460-a2b3-14cc84b10a02</guid><dc:creator>renbo tang</dc:creator><description>&lt;p&gt;像SelectionSetManager就是一个不错的实现&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [MSCE/OPM C#] 在ElementSetTool中如何正确处理选择集？</title><link>https://communities.bentley.com/thread/558345?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2019 01:54:33 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:350f4a9c-fc6a-4545-a5d9-6e177df4d060</guid><dc:creator>renbo tang</dc:creator><description>&lt;p&gt;目前确实也没有时间深入研究C++的代码，精力有限&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [MSCE/OPM C#] 在ElementSetTool中如何正确处理选择集？</title><link>https://communities.bentley.com/thread/558344?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2019 01:53:04 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:710a1db0-48c0-4dbe-bb67-3e9cc4a0b05b</guid><dc:creator>renbo tang</dc:creator><description>&lt;p&gt;我安装的是Microstation CE Update 12及OpenPlant CE Update 5，在开发过程中的C#工程引用了Microstation的程序集（Bentley.XXX.dll），开发的addin程序加载到OpenPlant中运行&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [MSCE/OPM C#] 在ElementSetTool中如何正确处理选择集？</title><link>https://communities.bentley.com/thread/558343?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2019 01:50:45 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:84b9622f-256e-44b2-aa9f-872f08d487bd</guid><dc:creator>renbo tang</dc:creator><description>&lt;p&gt;建议ElementAgenda实现ICollection&amp;lt;Element&amp;gt;，或将Element集合作为ElementAgenda的一个属性，目前的接口不太适合开发&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [MSCE/OPM C#] 在ElementSetTool中如何正确处理选择集？</title><link>https://communities.bentley.com/thread/558337?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2019 01:36:12 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:da9252e5-c6cc-49fb-b8f6-d5b5c576aab6</guid><dc:creator>Yongan.Fu</dc:creator><description>&lt;p&gt;您使用的软件版本是多少？我印象中早起版本DgnTool的C#封装是有问题的。请用C++改写一下你的代码再测试一下。另外，有关DgnTool，郭老师写有如下系列文章供学习：&lt;/p&gt;
&lt;p&gt;&lt;a href="/communities/other_communities/bdn_other_communities/w/chinabdn-wiki/43485/microstation"&gt;学习Microstation交互式工具开发&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [MSCE/OPM C#] 在ElementSetTool中如何正确处理选择集？</title><link>https://communities.bentley.com/thread/558338?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2019 01:35:27 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:b9592e0e-bd97-4df9-b8d3-ba71f0398a44</guid><dc:creator>HongQiang Guo</dc:creator><description>&lt;p&gt;能否把您的代码都发上来，我帮您看一下。通过DgnElementSetTool.ElementAgenda访问元素选择的结果，读取是没问题的，但是往这个几何里边插入确实会出现您说的现象，这是因为c#对c/c++封装的接口不是太完善造成的，这种现象已经反馈给开发组了。另外&lt;a href="/communities/other_communities/bdn_other_communities/w/chinabdn-wiki/43485/microstation"&gt;https://communities.bentley.com/communities/other_communities/bdn_other_communities/w/chinabdn-wiki/43485/microstation&lt;/a&gt;这个下边有讲解DgnElementSetTool的用法，带着几个例子您可以看看，不过例子都是c/c++的。&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>