<?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>Open STAAD Command GetRepeatLoadCount not working</title><link>https://communities.bentley.com/products/ram-staad/f/ram-staad-forum/245577/open-staad-command-getrepeatloadcount-not-working</link><description>I am struggling with this Openstaad command GetRepeatLoadCount . For some reason, it is not working for me. It returns value 1 instead of the actual count.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Open STAAD Command GetRepeatLoadCount not working</title><link>https://communities.bentley.com/thread/766835?ContentTypeID=1</link><pubDate>Tue, 23 May 2023 06:14:36 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5589e5d5-ebd4-4bbf-8374-486af08149f8</guid><dc:creator>Shreyanka Bhattacharjee</dc:creator><description>&lt;p&gt;There is no direct OpenSTAAD function to get the Total repeat Load count in a model as the Repeat Load is treated as Load item like any other load items(Nodal load, member load) defined under a primary load case. But you can use combination of OpenSTAAD functions to get the count.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sample VBA code:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Set objOpenStaad = GetObject(, &amp;quot;StaadPro.OpenSTAAD&amp;quot;)&lt;br /&gt;Dim nPrimaryLoadCase As Long&lt;br /&gt;Dim LC() As Long&lt;br /&gt;Dim LoadType As Long&lt;br /&gt;Dim nLoadSize As Long&lt;br /&gt;nLoadSize = 0&lt;br /&gt;LoadType = 4201 &amp;#39;&amp;#39;Repeat load data&lt;br /&gt;Dim RepeatLoadCount As Long&lt;br /&gt;RepeatLoadCount = 0&lt;br /&gt;Dim RepeatLCNo As Long&lt;/p&gt;
&lt;p&gt;nPrimaryLoadCase = objOpenStaad.Load.GetPrimaryLoadCaseCount&lt;br /&gt;ReDim LC(nPrimaryLoadCase - 1)&lt;br /&gt;objOpenStaad.Load.GetPrimaryLoadCaseNumbers LC&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;For i = 0 To nPrimaryLoadCase - 1&lt;br /&gt; objOpenStaad.Load.SetLoadActive LC(i)&lt;br /&gt;&lt;br /&gt; nLoadSize = objOpenStaad.Load.GetLoadTypeCount(LoadType)&lt;br /&gt; If nLoadSize &amp;gt; 0 Then&lt;br /&gt; RepeatLoadCount = RepeatLoadCount + 1&lt;br /&gt; RepeatLCNo = LC(i)&lt;br /&gt; End If&lt;br /&gt;Next i&lt;br /&gt;MsgBox &amp;quot;Repeat Load count is: &amp;quot; &amp;amp; RepeatLoadCount&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Open STAAD Command GetRepeatLoadCount not working</title><link>https://communities.bentley.com/thread/766815?ContentTypeID=1</link><pubDate>Tue, 23 May 2023 03:27:11 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:e86cc260-9127-4bf4-bc60-952ba31c6f92</guid><dc:creator>Desh Raj Singh</dc:creator><description>&lt;p&gt;That explains. So there is no OpenSTAAD function to get the Repeat load count in a model, right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Open STAAD Command GetRepeatLoadCount not working</title><link>https://communities.bentley.com/thread/766722?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 13:11:50 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3deadfe2-0a13-450e-9a96-f5e94710a273</guid><dc:creator>Shreyanka Bhattacharjee</dc:creator><description>&lt;p&gt;&lt;span&gt;GetRepeatLoadCount functtion actually returns the number of repeat load present in a load case.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Example: Load case 2 has 3 Repeat Load cases. So if&amp;nbsp;GetRepeatLoadCount function is used for load case 2, the return value of&amp;nbsp;GetRepeatLoadCount will be 3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/5932/pastedimage1684761230158v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;VBA code:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Set objOpenStaad = GetObject(, &amp;quot;StaadPro.OpenSTAAD&amp;quot;)&lt;br /&gt;Dim RepeatLoadcount As Long&lt;br /&gt;Dim LoadNo As Long&lt;/p&gt;
&lt;p&gt;LoadNo = 2&lt;br /&gt;objOpenStaad.Load.SetLoadActive LoadNo&lt;br /&gt;RepeatLoadcount = objOpenStaad.Load.GetRepeatLoadCount&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Output:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/5932/pastedimage1684761280050v3.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>