Hi,
please help me with next problem:
how running calculation for steel members using VBA (Robot Open Standart).
Unfortunatly not any example for this case.
Nicolay,
Check pdf in message 2 here: http://forums.autodesk.com/t5/Autodesk-Robot-Structural/Manual-Calculations-for-Steel-Design-using-A...
Example from page 95
Two small examples of creating steel design groups and geting steel design ratio attached
example of creating steel design label for bars
Example code
Hi,
I'm so sorry, but I didn't understand how to specify Section database and section families in your code. I saw how to include or exclude a member in Code Grup if you define all the parameters before. In my case I want to create a Code group at the first time without any definition before. Cold you help me?
thanks.
Code update for previous example
Dim RDMServer As RDimServer Dim RDMStream As RDimStream Dim RDMGrps As RDimGroups Dim RDMGrp1 As RDimGroup Dim RDmGrpProfs As RDimGrpProfs Set RDMServer = RobApp.Kernel.GetExtension("RDimServer") RDMServer.Mode = I_DSM_STEEL Set RDMGrps = RDMServer.GroupsService idx = 0 While Cells(2 + idx, 1) <> Empty usrgr = Int(Cells(2 + idx, 1)) Set RDMGrp1 = RDMGrps.Get(usrgr) RDMGrp1.Name = Cells(2 + idx, 2) Set RDMStream = RDMServer.Connection.GetStream RDMGrp1.GetMembList RDMStream RDMStream.Clear RSelection.FromText Cells(2 + idx, 3) Cells(2 + idx, 3) = RSelection.ToText RDMStream.WriteText RSelection.ToText RDMGrp1.SetMembList RDMStream Set RDmGrpProfs = RDMServer.Connection.GetGrpProfs RDmGrpProfs.Clear RDMStream.Clear RDMStream.WriteText ("IPE") ' family of profiles RDMStream.WriteText ("HEA") ' family of profiles RDmGrpProfs.SetFamilies "SIMPL", RDMStream ' section database RDMGrp1.SetProfs RDmGrpProfs RDMGrps.Save RDMGrp1 idx = idx + 1 Wend
It's working now. Thank you.
Sorry for asking so much things, but how can I list all Database and section families defined?.
Thanks again.
I did this code to list all my section Database
Dim teste As IRobotSectionDatabaseList
Set teste = RobApp.Project.Preferences.SectionsFound
Dim sec_data As IRobotSectionDatabase
For I = 1 To teste.Count
Cells(16 + I, 1) = teste.Get(I)
Cells(16 + I, 2) = teste.GetDatabase(I).FullName
Next I
It appears more database than defined in my job preferences.
How it is possible? How can I select only steel and timber sections?
Thanks
Where can I find this Document?
I'm using Robot Open Standard 6.0 and there are only 452 pages.
Thanks
robapp.Project.Preferences.SetCurrentDatabase I_DT_SECTIONS, "AISI" Dim SDL As RobotSectionDatabaseList Set SDL = robapp.Project.Preferences.SectionsActive Dim RSD As RobotSectionDatabase For I = 1 To SDL.Count If SDL.GetDatabase(I).Name = "AISI" Then Set RSD = SDL.GetDatabase(I) End If Next I Dim Sections As RobotNamesArray Set Sections = RSD.GetAll Row = 10 Dim Familyname As String Familyname = "" For j = 1 To Sections.Count If Familyname <> Left(Sections.Get(j), InStr(Sections.Get(j), " ") - 1) Then Familyname = Left(Sections.Get(j), InStr(Sections.Get(j), " ") - 1) Cells(Row, 1) = Familyname Row = Row + 1 End If Next j
Hi Rafal,
I'm having problems in the following part. The error is attached.
Could you help me again?
//Definições das variáveis
RDimServer RDMServer; // Resultados
RDimStream RDMStream ; // vetor com os parametros
RDimGroups RDMGrps; // De todos os grupos
RDimGroup RDMGrp1; // Grupos atuais
RDimGroup RDMGrp2; // Grupo que será criado
IRDimGrpProfs RDmGrpProfs; // Code grups
RobotBar Elemento;
int num_elemento;
//Pega os elementos da linha do formulario
RobotSelection ElemSelecionado = RobotClass.Robot.Project.Structure.Selections.Create(IRobotObjectType.I_OT_BAR);
ElemSelecionado.FromText(textBox1.Text);
RobotBarCollection ElemColecao = (RobotBarCollection)RobotClass.Robot.Project.Structure.Bars.GetMany(ElemSelecionado);
//Checa se a seleção e valores de entradas
if (!ChecaSelecaoElemento(ElemSelecionado)) return; // Seleção de elementos
//Processo de criação dos grupos
RDMServer = RobotClass.Robot.Kernel.GetExtension("RDimServer");
RDMServer.Mode = IRDimServerMode.I_DSM_STEEL;
RDmGrpProfs = RDMServer.Connection.GetGrpProfs;
RDmGrpProfs.Clear();