<?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>How to add a reference load with a load factor to a load case using openSTAAD commands</title><link>https://communities.bentley.com/products/ram-staad/f/ram-staad-forum/244295/how-to-add-a-reference-load-with-a-load-factor-to-a-load-case-using-openstaad-commands</link><description>Hi, 
 I have the below code which interfaces with a matrix i have created in excell/VBA. 
 I want to create the loadcase, this code works, and then add the reference load say &amp;quot;R1&amp;quot; to the load case with a load factor as per the image below. The reference</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to add a reference load with a load factor to a load case using openSTAAD commands</title><link>https://communities.bentley.com/thread/762572?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2023 10:50:57 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:cf57ee53-e4f2-4657-8e2c-9ae39e428f4d</guid><dc:creator>Shreyanka Bhattacharjee</dc:creator><description>&lt;p&gt;Yes, you need to use&amp;nbsp;&lt;span&gt;AddReferenceLoad function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I would like to mention one thing here that the datatype of the Primary or Reference Load case number should be Long instead&amp;nbsp;of Double&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sample VBA Syntax is&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Set objOpenSTAAD = GetObject(, &amp;quot;StaadPro.OpenSTAAD&amp;quot;)&lt;br /&gt;Dim LoadCaseNo As Long&lt;br /&gt;Dim RefLoadNo(2) As Long&lt;br /&gt;Dim LoadFactor(2) As Double&lt;/p&gt;
&lt;p&gt;LoadCaseNo = 1&lt;br /&gt;objOpenSTAAD.Load.SetLoadActive LoadCaseNo&lt;/p&gt;
&lt;p&gt;RefLoadNo(0) = 2&lt;br /&gt;RefLoadNo(1) = 4&lt;br /&gt;RefLoadNo(2) = 5&lt;/p&gt;
&lt;p&gt;LoadFactor(0) = 1.2&lt;br /&gt;LoadFactor(1) = 1&lt;br /&gt;LoadFactor(2) = 0.9&lt;/p&gt;
&lt;p&gt;objOpenSTAAD.Load.AddReferenceLoad RefLoadNo, LoadFactor&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add a reference load with a load factor to a load case using openSTAAD commands</title><link>https://communities.bentley.com/thread/762377?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2023 08:47:59 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:bb4881cd-3940-42ae-970d-444d0581d714</guid><dc:creator>Tom Pallister</dc:creator><description>&lt;p&gt;The answer is&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ObjOPENSTAAD.Load.AddLoadRefEx2 LoadCaseNo, RefLoadNo, LoadFactor &amp;#39; in form LoadCase, Node, Factor&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;to be replaced with&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ObjOPENSTAAD.Load.SetLoadActive LoadCaseNo&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ObjOPENSTAAD.Load.AddReferenceLoad&amp;nbsp;RefLoadNo,&amp;nbsp;LoadFactor&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>