<?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>salvatore montella's Activities</title><link>https://communities.bentley.com/members/675f9299_2d00_96a2_2d00_4325_2d00_8447_2d00_998bb57175f9</link><description>salvatore montella's recent activity</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>CE Display Rules C#</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/192465/ce-display-rules-c</link><pubDate>Fri, 14 Feb 2020 09:49:41 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:feccffd1-85e5-4ae6-b9b3-38200ae913e3</guid><dc:creator>salvatore montella</dc:creator><description>&lt;p&gt;Hello, I&amp;#39;m trying to develop an add-in for creating Display Rules in c #. I have a problem creating the condition to pass as a parameter to the constructor of the DisplayRule class.&lt;br /&gt;At this link &amp;quot;&amp;quot;&amp;gt;www.bimsdks.com/.../structBentley_1_1DgnPlatform_1_1DisplayRule.html&amp;quot; I found some examples (see Condition format and types) but they are very few.&lt;/p&gt;
&lt;p&gt;I implemented the following code that works:&lt;/p&gt;
&lt;p&gt;string MyRuleCondition = @&amp;quot;element.IsOfClass (&amp;quot;&amp;quot;ShapeElement&amp;quot;&amp;quot;,&amp;quot;&amp;quot;DgnElementSchema&amp;quot;&amp;quot;)&amp;quot;;&lt;/p&gt;
&lt;p&gt;DisplayRuleSet displayRuleSet = new DisplayRuleSet(RuleStenName, dgnFile);&lt;br /&gt;DisplayRulesManager.WriteDisplayRuleSetToFile(displayRuleSet, dgnFile, true);&lt;br /&gt;DisplayRule displayRuleElement = new DisplayRule(MyRuleCondition, true, dgnFile);&lt;/p&gt;
&lt;p&gt;IDisplayRuleAction ruleAction = new ColorOverrideAction(5, dgnFile);&lt;br /&gt;displayRuleElement.AddAction(ruleAction);&lt;br /&gt;displayRuleSet.AddDisplayRule(displayRuleElement);&lt;br /&gt;DisplayRulesManager.WriteDisplayRuleSetToFile(displayRuleSet, dgnFile, true);&lt;/p&gt;
&lt;p&gt;keyInCommand.SendKeyin(&amp;quot;MDL KEYIN CUSTOMDISPMODE DIALOG DISPLAYSTYLES&amp;quot;);&lt;br /&gt;keyInCommand.SendKeyin(@&amp;quot;DISPLAYSTYLE CREATE &amp;quot;&amp;quot;DISPLAY_STYLE_BY_KEYIN&amp;quot;&amp;quot;&amp;quot;);&lt;/p&gt;
&lt;p&gt;keyInCommand.SendKeyin(@&amp;quot;MDL KEYIN VIEWCTRL CHANGE VIEW CUSTOM &amp;quot;&amp;quot;DISPLAY_STYLE_BY_KEYIN&amp;quot;&amp;quot; 1&amp;quot;);&lt;br /&gt;keyInCommand.SendKeyin(@&amp;quot;DISPLAYSTYLE SETPARAM DISPLAYRULESET &amp;quot;&amp;quot;DISPLAY_STYLE_BY_KEYIN&amp;quot;&amp;quot; &amp;quot;&amp;quot;Rule&amp;quot;&amp;quot;&amp;quot;);&lt;br /&gt;ustnApp.CommandState.StartDefaultCommand();&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I should implement a RuleCondition that evaluates the value of a property of an ItemType,&lt;br /&gt;does anyone know a way, a tool, or examples (in c #) to create RuleConditions?&lt;/p&gt;
&lt;p&gt;Thanks for the help, greetings&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[CONNECT EDITION] How Split a Shape Element</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/194594/connect-edition-how-split-a-shape-element</link><pubDate>Mon, 30 Mar 2020 07:21:00 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:be7dd9b8-f23b-4181-8821-1d1fd7717bb3</guid><dc:creator>salvatore montella</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;could someone show me (with a code example) how to perform, in c #, the Split operation on a Shape element?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks for your help,&lt;br /&gt;regards&lt;/p&gt;
&lt;p&gt;Salvio Montella&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Ask A Question II</title><link>https://communities.bentley.com/achievements/cd3cd235-25c1-476e-bb88-33a5705ca45a</link><pubDate>Fri, 16 Apr 2021 09:31:32 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:90f8b949-88eb-4c20-a01d-9595f64105e8</guid><dc:creator /><description>Ask 10 questions in a forum.</description></item><item><title>[Microstation Connect] How to create a GroupedHole Element with a AreaPattern</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/212669/microstation-connect-how-to-create-a-groupedhole-element-with-a-areapattern</link><pubDate>Fri, 16 Apr 2021 09:31:30 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:335bbe86-47b5-401e-b542-280fa39c2833</guid><dc:creator>salvatore montella</dc:creator><description>&lt;p&gt;Good morning,&lt;br /&gt;I have a problem with creating PatternArea on an object of type GroupedHoleElement,&lt;br /&gt;I would like to create a groupedHole like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/343173/pastedimage1618565445230v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;the Microstation version is the following: Microstation CONNECT Edition Update 12 - Version 10.12.00.40.&lt;br /&gt;Given that I have already searched for a solution or examples in the SDK example .. \ Elements \ ManagedToolsExample and I have not found anything about it, I report below the code I wrote in C #.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;GroupedHoleElement groupedHoleElement = currElement as GroupedHoleElement;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;PatternParams patternParams = new PatternParams ();&lt;/em&gt;&lt;br /&gt;&lt;em&gt;patternParams.CellName = &amp;quot;A0A&amp;quot;; &amp;lt;- This field must contain the name of a model from the tmplate.cel library linked to the working file&lt;/em&gt;&lt;br /&gt;&lt;em&gt;patternParams.PrimarySpacing = 1&lt;/em&gt;&lt;br /&gt;&lt;em&gt;patternParams.SecondarySpacing = 1&lt;/em&gt;&lt;br /&gt;&lt;em&gt;patternParams.PrimaryAngle = 45&lt;/em&gt;&lt;br /&gt;&lt;em&gt;patternParams.Scale = 1;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;DwgHatchDefLine dwgHatchDefLine = new DwgHatchDefLine ();&lt;/em&gt;&lt;br /&gt;&lt;em&gt;dwgHatchDefLine.Angle = 45;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;DwgHatchDefLine [] dwgHatchDefLines = new DwgHatchDefLine [1];&lt;/em&gt;&lt;br /&gt;&lt;em&gt;dwgHatchDefLines [0] = dwgHatchDefLine;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;groupedHoleElement.AddPattern (patternParams, dwgHatchDefLines, 0);&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The code is executed without errors, only that in the output the selected element has no pattern,&lt;br /&gt;would you have a working example in c #?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks so much,&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Salvio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Create a grouped hole with a pattern</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/206906/create-a-grouped-hole-with-a-pattern</link><pubDate>Fri, 04 Dec 2020 12:16:10 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:21d19bfe-d670-404d-adf1-33709524a1dd</guid><dc:creator>leonardk</dc:creator><description>&lt;p&gt;&lt;br /&gt;With C# i&amp;nbsp;am trying to create a grouped hole with a pattern in Microstation Connect v10 update 14. So far with no success.&lt;/p&gt;
&lt;p&gt;Because a grouped hole does not have the ClosedElement interface i cannot use the SetPattern method.&lt;/p&gt;
&lt;p&gt;Creating a grouped hole &lt;strong&gt;without&lt;/strong&gt; a pattern is succesful:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp;// Create some complex elements: outermost and holes. All have property NotFilled and are on the same level&lt;br /&gt;&amp;nbsp; &amp;nbsp;var outermost = Application.CreateComplexStringElement1(ref elementArray);&lt;br /&gt;&amp;nbsp; &amp;nbsp;var holes[] = new Element[] { Application.CreateComplexStringElement1(ref elementArray) };&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;foreach (var hole in holes)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; mdlElmdscr_initOrAddToChain(&amp;amp;outEdPP2, hole.MdlElementDescrP());&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;mdlElmdscr_createShapeWithHoles(&amp;amp;outEdPP2, outermost.MdlElementDescrP(), holeEdP);&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;// Create element&lt;br /&gt;&amp;nbsp; &amp;nbsp;var groupedHole = Application.MdlCreateElementFromElementDescrP(outEdPP);&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;// Add to the designfile&lt;br /&gt;&amp;nbsp; &amp;nbsp;Application.ActiveModelReference.AddElement(groupedHole);&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;// Create pattern params e.g.&lt;br /&gt;&amp;nbsp; &amp;nbsp;var patternParams = new PatternParams();&lt;br /&gt;&amp;nbsp; &amp;nbsp;patternParams.PrimaryAngle = Math.PI/4;&lt;br /&gt;&amp;nbsp; &amp;nbsp;patternParams.PrimarySpacing = 20.0;&lt;br /&gt;&amp;nbsp; &amp;nbsp;patternParams.Modifiers = PatternParamsModifierFlags.Angle1 | PatternParamsModifierFlags.Space1;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;var result = mdlPattern_addAssociative(&amp;amp;outEdPP2, -1, -1, ref patternParams, 0, 0, 0, MicroStationGlobals.Instance.Application.ActiveModelReference.MdlModelRefP());&lt;/p&gt;
&lt;p&gt;result is 0 (SUCCESS). outEdPP2 will have another value.&lt;/p&gt;
&lt;p&gt;A grouped hole does appear in the designfile, but it has &lt;strong&gt;no pattern&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In MicroStation the property &amp;#39;Pattern&amp;#39; says &amp;#39;None&amp;#39;, but I can create it manualy.&lt;/p&gt;
&lt;p&gt;Any help would be appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[Connect] - Mesh Project</title><link>https://communities.bentley.com/products/microstation/f/microstation-forum/200675/connect---mesh-project</link><pubDate>Tue, 21 Jul 2020 13:18:45 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:e784c6a0-9939-40d5-bfd3-b4dc358b09a0</guid><dc:creator>salvatore montella</dc:creator><description>&lt;p&gt;Hi everyone,&lt;br /&gt;I have a problem with the Mesh functionality:&lt;br /&gt;By applying the procedure to a Shape that does not have concave angles, the split of the shape according to the defined division lines is correct as in the figure&amp;nbsp;ShapeSplittedOK.JPG.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/273/ShapeSplittedOK.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;If instead I try to apply the same procedure to a Shape that has concave angles the result is somewhat strange, that is, the Shape is not split&amp;nbsp;only on the basis of the dividing lines but dividing lines appear, ranging from the vertex of the concave angle to the nearest corner, dividing&amp;nbsp;in this way the original shape in N additional triangles as in the figure ShapeSplittedKO.JPG&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/273/ShapeSplittedKO.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;The procedure I follow is as follows:&lt;br /&gt;- I select the shape with Element Selection&lt;br /&gt;- KeyIn -&amp;gt; FACET CREATE&lt;br /&gt;- Double click on a vertex of the shape&lt;br /&gt;- KeyIn -&amp;gt; place line&amp;nbsp;&lt;br /&gt;- I apply the dividing line between two points of the shape perimeter&amp;nbsp;(only one line)&lt;br /&gt;- I select the shape with Element Selection&lt;br /&gt;- KeyIn -&amp;gt; FACET PROJECT&lt;br /&gt;- Double click on a vertex of the shape&lt;br /&gt;- KeyIn -&amp;gt; DROP ELEMENT&lt;br /&gt;- I select the shape with Element Selection&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The settings of the FACET CREATE, FACET PROJECT and DROP ELEMENT are shown in the attached screenshots&lt;br /&gt;Mesh_Settings.JPG (FACET CREATE)&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/273/Mesh_5F00_Settings.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;MeshProject_Settings.JPG (FACET PROJECT)&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/273/MeshProject_5F00_Settings.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;DropElement_Settings.JPG (DROP ELEMENT)&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/273/DropElement_5F00_Settings.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Has anyone already faced this type of situation?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for help,&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Salvio&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[Connect] - GroupeHoles</title><link>https://communities.bentley.com/products/microstation/f/microstation-forum/200609/connect---groupeholes</link><pubDate>Mon, 20 Jul 2020 13:36:18 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:80e8c24d-b0a3-475b-ba21-fe8d2d8fce3a</guid><dc:creator>salvatore montella</dc:creator><description>&lt;p&gt;&lt;span style="font-size:150%;"&gt;Hi everyone,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:150%;"&gt;I report a request that was made to me:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:150%;"&gt;In Microstation Connect it&amp;#39;s possible create a plane figure (Shape, ComplexShape), using the&amp;nbsp;GroupedHoles function, where the resulting plane figure is presented with a &amp;quot;hole&amp;quot; inside it, but without using multiple elements (eg shape with another shape inside)&amp;nbsp;so that Microstation sees it as the&amp;nbsp;unique Shape or ComplexShape element?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;Salvio&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[CONNECT] - Microstation has stopped working</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/198338/connect---microstation-has-stopped-working</link><pubDate>Thu, 04 Jun 2020 15:24:01 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:d228766b-4483-4490-8d52-fcfdf31fe5f8</guid><dc:creator>salvatore montella</dc:creator><description>&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;I have the following problem: I have developed an AddIn, in c #, for Microstation Connect version 12,&lt;/p&gt;
&lt;p&gt;the problem is that, in a completely random way, Microstation crashes and shows the message &amp;quot;Microstation has stopped working&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Attached is the exception.log file and the screenshot of the error&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your help,&lt;/p&gt;
&lt;p&gt;Salvio&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/5557.Error.JPG" /&gt;&lt;a href="https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/343173/7103.exception.log"&gt;communities.bentley.com/.../7103.exception.log&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>CE C# Build Display Rules programmatically</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/197326/ce-c-build-display-rules-programmatically</link><pubDate>Sat, 16 May 2020 11:23:22 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:e08e0e0f-d4b0-43e0-8a93-f9e914aaca35</guid><dc:creator>salvatore montella</dc:creator><description>&lt;p&gt;&lt;span style="font-size:150%;"&gt;Hi everyone, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;I&amp;#39;m developing an AddIn in C # for Microstation Connect Version 12 and&amp;nbsp;I&lt;/span&gt;&lt;span style="font-size:150%;"&gt;&amp;nbsp;should create, by code, a rule to insert in a display rules.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="font-size:150%;"&gt;If I&amp;nbsp;create the following rule (REFERENCE.References.Logical Name = Attachment_1), in the Microstation environment, everything works correctly (DisplayRules1.JPG) .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="font-size:150%;"&gt;If I try to create the same rule from c # Microstation I get the message &amp;quot;Unrecognized Criteria&amp;quot; (DisplayRules2.JPG)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Code Example :&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;em&gt;&lt;strong&gt;string fieldValue = &amp;quot;Attachment_1&amp;quot;;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;string RuleStenName = &amp;quot;RulSet_1&amp;quot;;&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt; string MyRuleCondition = $@&amp;quot;REFERENCE.References.Logical Name = {fieldValue}&amp;quot;;&lt;/strong&gt;&lt;/em&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/343173/DisplayRules1.JPG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/343173/DisplayRules2.JPG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre class="tw-data-text tw-text-large tw-ta" id="tw-target-text" dir="ltr"&gt;&lt;br /&gt;&lt;span style="font-size:150%;"&gt;Could anyone tell me what is the exact way to build this rule condition from code?&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;Thanks for your help,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;Salvio&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[Connect] c# Display Rules - AreaPatternAction</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/197590/connect-c-display-rules---areapatternaction</link><pubDate>Thu, 21 May 2020 09:39:18 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:7d8beca9-b82d-4a81-9163-ef62f80638f4</guid><dc:creator>salvatore montella</dc:creator><description>&lt;p&gt;&lt;br /&gt;&lt;span style="font-size:150%;"&gt;Hi,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:150%;"&gt;I have the following problem with creating a display rules action:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:150%;"&gt;I would like to create a pattern that applies a pattern by selecting a pattern from a cell library.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:150%;"&gt;This is the code I wrote&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;long elemId = 0;//1,2,3,4,5,6,7
ElementId elementId = new ElementId(ref elemId);

AreaPatternAction.AreaPatternParams patternParams = new AreaPatternAction.AreaPatternParams(
                elementId, 1, false, 45, 5, 1, 1);
IDisplayRuleAction ruleAction = new AreaPatternAction(patternParams, dgnFile);

displayRuleElement.AddAction(ruleAction);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;In the file, in which I want to create the display rules, I hooked a cell library&amp;nbsp;but the result is the following&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/343173/Display.JPG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;the cell model is empty.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;I suppose the problem may arise from how I calculate the ElementId object&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;Any ideas on this?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;thanks for the help, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;greetings&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;Salvio&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>[Microstation Connect Edition] Problems with &amp;quot;Saved Batch Conversion Job from the System Command Line&amp;quot;</title><link>https://communities.bentley.com/products/microstation/f/microstation-forum/192624/microstation-connect-edition-problems-with-saved-batch-conversion-job-from-the-system-command-line</link><pubDate>Tue, 18 Feb 2020 11:29:27 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:77d75414-4c88-4b78-afb1-181f97e99d70</guid><dc:creator>salvatore montella</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;I created a batch convert job file,which merges between a file and its references.&lt;br /&gt;Using it from the Micorstation environment it works correctly, if instead I try to use a Run a Saved Batch Conversion Job from the System Command Line &lt;br /&gt;&amp;quot;msbatch batchconvert C:\Users\montella\Desktop\BCNV\CONVERT_TO_3D_MERGE_TEMPLATE_CE.BCNV&amp;quot; &lt;br /&gt;it doesn&amp;#39;t work, nothing happens.&lt;/p&gt;
&lt;p&gt;If I try to do the same thing in V8i it works ...&lt;/p&gt;
&lt;p&gt;Can someone help me ?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks for help&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>Fri, 14 Feb 2020 00:28:04 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2c47c98a-1daa-4a6a-a194-6e9352120a24</guid><dc:creator /><description>Ask a question in a forum.</description></item><item><title>CE Display Rules -  Condition format and types c#</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/192461/ce-display-rules---condition-format-and-types-c</link><pubDate>Fri, 14 Feb 2020 08:54:17 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ba660a7d-e270-4fa8-8c6f-af43d090bde0</guid><dc:creator>salvatore montella</dc:creator><description>&lt;p&gt;&lt;br /&gt;Hello, I&amp;#39;m trying to develop an add-in for creating Display Rules in c #. I have a problem creating the condition to pass as a parameter to the constructor of the DisplayRule class.&lt;br /&gt;At this link &amp;quot;&lt;a href="https://www.bimsdks.com/bentley/MicroStationAPI/structBentley_1_1DgnPlatform_1_1DisplayRule.html"&gt;&amp;quot;&amp;gt;www.bimsdks.com/.../structBentley_1_1DgnPlatform_1_1DisplayRule.html&amp;quot;&lt;/a&gt; I found some examples (see Condition format and types) but they are very few.&lt;/p&gt;
&lt;p&gt;I implemented the following code that works:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;em&gt;&lt;span style="font-family:inherit;"&gt;string MyRuleCondition = @&amp;quot;element.IsOfClass (&amp;quot;&amp;quot;ShapeElement&amp;quot;&amp;quot;,&amp;quot;&amp;quot;DgnElementSchema&amp;quot;&amp;quot;)&amp;quot;;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;em&gt;&lt;span style="font-family:inherit;"&gt;DisplayRuleSet displayRuleSet = new DisplayRuleSet(RuleStenName, dgnFile);&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:inherit;"&gt;&lt;em&gt;&lt;span style="font-family:inherit;"&gt;DisplayRulesManager.WriteDisplayRuleSetToFile(displayRuleSet, dgnFile, true);&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:inherit;"&gt;&lt;em&gt;&lt;span style="font-family:inherit;"&gt;DisplayRule displayRuleElement = new DisplayRule(MyRuleCondition, true, dgnFile);&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;em&gt;&lt;span style="font-family:inherit;"&gt;IDisplayRuleAction ruleAction = new ColorOverrideAction(5, dgnFile);&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:inherit;"&gt;&lt;em&gt;&lt;span style="font-family:inherit;"&gt;displayRuleElement.AddAction(ruleAction);&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:inherit;"&gt;&lt;em&gt;&lt;span style="font-family:inherit;"&gt;displayRuleSet.AddDisplayRule(displayRuleElement);&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:inherit;"&gt;&lt;em&gt;&lt;span style="font-family:inherit;"&gt;DisplayRulesManager.WriteDisplayRuleSetToFile(displayRuleSet, dgnFile, true);&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;em&gt;&lt;span style="font-family:inherit;"&gt;keyInCommand.SendKeyin(&amp;quot;MDL KEYIN CUSTOMDISPMODE DIALOG DISPLAYSTYLES&amp;quot;);&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:inherit;"&gt;&lt;em&gt;&lt;span style="font-family:inherit;"&gt;keyInCommand.SendKeyin(@&amp;quot;DISPLAYSTYLE CREATE &amp;quot;&amp;quot;DISPLAY_STYLE_BY_KEYIN&amp;quot;&amp;quot;&amp;quot;);&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;em&gt;&lt;span style="font-family:inherit;"&gt;keyInCommand.SendKeyin(@&amp;quot;MDL KEYIN VIEWCTRL CHANGE VIEW CUSTOM &amp;quot;&amp;quot;DISPLAY_STYLE_BY_KEYIN&amp;quot;&amp;quot; 1&amp;quot;);&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:inherit;"&gt;&lt;em&gt;&lt;span style="font-family:inherit;"&gt;keyInCommand.SendKeyin(@&amp;quot;DISPLAYSTYLE SETPARAM DISPLAYRULESET &amp;quot;&amp;quot;DISPLAY_STYLE_BY_KEYIN&amp;quot;&amp;quot; &amp;quot;&amp;quot;Rule&amp;quot;&amp;quot;&amp;quot;);&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:inherit;"&gt;&lt;em&gt;&lt;span style="font-family:inherit;"&gt;ustnApp.CommandState.StartDefaultCommand();&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I should implement a RuleCondition that evaluates the value of a property of an ItemType,&lt;br /&gt;does anyone know a way, a tool, or examples (in c #) to create RuleConditions?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre class="tw-data-text tw-text-large tw-ta" id="tw-target-text" dir="ltr"&gt;&lt;span lang="en"&gt;Thanks for the help, greetings&lt;/span&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>