<?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>09-如何给元素加links信息</title><link>https://communities.bentley.com/communities/other_communities/chinafirst/w/chinawiki/21070/09-links</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>09-如何给元素加links信息</title><link>https://communities.bentley.com/communities/other_communities/chinafirst/w/chinawiki/21070/09-links</link><pubDate>Wed, 29 Apr 2015 09:12:33 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:361e1a95-8fe8-454d-a9b3-c2f32aad3c24</guid><dc:creator>lijun.ma</dc:creator><comments>https://communities.bentley.com/communities/other_communities/chinafirst/w/chinawiki/21070/09-links#comments</comments><description>Current Revision posted to 技术资料库 by lijun.ma on 4/29/2015 9:12:33 AM&lt;br /&gt;
&lt;p&gt;可以用DgnLinkManager下面的AddFileLinkToElement方法，需要通过links信息构造一个DgnDocumentMoniker对象，然后将该对象传入AddFileLinkToElement，示例代码如下：&lt;/p&gt;
&lt;pre class="brush: applescript; fontsize: 100; first-line: 1; "&gt;            DgnDocumentMoniker m = DgnDocumentMoniker.CreateFromFileName(&amp;quot;linktest.txt&amp;quot;, @&amp;quot;D:\mytest\&amp;quot;);
            StatusInt status = DgnLinkManager.AddFileLinkToElement(imLine.Element, m);&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: imodel links&lt;/div&gt;
</description></item></channel></rss>