Hi ,
i trying to develop custom tool using openstaad + c#.
i want know what is reference .dll name and where its located in staad installed path.(specially connect edition)
your sample Excel macro is working fine in my system. in this new version i not able find openstaadUI reference .dll.
i want known whether openstadd is separate installation and need separate license to develop custom Tool? if not can you guide us how find reference .dll.
Hi Chinna
With the latest version of STAAD.Pro, the distribution of OpenStaadUI.tlb file has been discontinued. Instead, we have embedded the file inside ‘StaadPro.dll’. You need to add the ‘StaadPro.dll’ as a reference to lookup the methods in Intellisense box. However, to run the code, TLB is not required.
I hope this helps,
B. ZIANE
Hi Badrz,
Visual Studio 2017 + STAAD pro Connect Edition
i tried with referring 'Staadpro.dll' but am not able view or Call Openstaad Function using .Net(c#) language. here i attached snap shot for your reference.
can help help me. whether i added correct references or i want to any others references.
HI Chinna,
I facing same issue in vs 2019.Do you get any solution for this?
Hi Rathod,
No. not find any solution yet. i am looking solution from Bentley Dev Team.
Ok.No problem.Thank you.Please let me know if you get any updates/solution.
any update from development team.. already my tools are developed in Select Series 6 version + C#. Really worrying how to make this tools should run for Connect edition. we need your Support to get solution for this issue
i am having same issue, what's point of all these features if we can't use it. i tried to contact dev team but each reply take few weeks and i finally gave up on it , there are only two options currently either switch to old version or switch to VBA
Hello All,
Adding StaadPro.dll will not help in C# application. You need to add the interop dll. Please create the dll by following steps:
The output DLL will be found in the folder where your command prompt is pointing.
Now, add this dll to your C# project and you can access the OpenStaad application object.
Let us know if this has helped.
Regards
Rudra Lahiri
Senior Principal Software Engineer, Structural
Hi Rudra,
Thanks for the answer.Let me try with this.If it's work then it will be great help for me.
As per yours steps, i converted staadpro.dll into Interop.staadPro.dll with one Waring message (attached here).
After that i added dll into c# project. now i have view the Openstaad Methods. but i not able get the object.
while connecting Staad pro object below error occurred.. show in snap shot.
give me suggestion how i solve this issue.
Regards,
Chinna
Tried it , Didn't work
Hi Vivek, Chinna,
I am attaching a sample project which will demo how to connect to a running STAAD instance and query data.
Please note the following:
1. Launch an instance of STAAD and open a model file
2. Launch Visual Studio 2017 and open the attached Sample project. (Note: configuration should be a x64 one)
3. Build the project and run it.
4. It will print the node numbers in the opened model. The sample project uses the geometry interface. Likewise you can use others.
SampleOSApp.zip
Note: If you want to access specific instance of STAAD, please refer /cfs-file/__key/communityserver-discussions-components-files/5932/Using-OpenSTAAD-application-object.pdf. This refers to an old version of deployment but the code snippets provided is still valid.
Hope this helps all.