Robot Structural Analysis Forum
Welcome to Autodesk’s Robot Structural Analysis Forums. Share your knowledge, ask questions, and explore popular Robot Structural Analysis topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

(API) ROBOT / API / VBA - Panel cuts and table generation

8 REPLIES 8
Reply
Message 1 of 9
Anonymous
2110 Views, 8 Replies

(API) ROBOT / API / VBA - Panel cuts and table generation

Hello,

 

I'm tying to make panelcuts on slabs. I saw that Rafal has already sent an example.

It's quite useful but i have some questions:

 

    - I also read on the forum that while generating a panel cut it's not possible to extract Bending moments or other sollicitations directly on Excel. Do i correctly understand?

 

    - Is it possible to open directly the diagram analysis of the cut in a window like it's possible with "geometry" or "loadings"?

 

I also tried to create tables to extract sollicitations on each point of the structure.

I've already managed to create a table wich gives Mxx/Myy/Mxy, but i'd like to have x, y, z, and others results like the shear effect by adding new columns.

 

You'll find below the code with the questions:

 

 

Sub table_creation()


Dim robot As New RobotApplication

Dim table_1 As RobotTable
Dim column_4 As IRobotTableDataType
Dim tableframe As IRobotTableFrame

Set table_1 = robot.Project.ViewMngr.CreateTable(I_TT_FE_RESULTS, I_TDT_MATERIAL)

table_1.AddColumn (column_1)
table_1.AddColumn (column_2)
table_1.AddColumn (column_3)
table_1.AddColumn (column_4)


column_1 = I_TDT_VALUES ' ___________              Wich command will return x values? y values? z values?
column_2 = I_TDT_DEFAULT  '________                   Wich command will return shear effect value?
column_3 = I_TDT_PANEL ' ___________                 Wich command will return z displacements values?
'____________________________________                 ? How can i get shear effect or other results ?

table_1.StoreSelection I_ST_FINITE_ELEMENT, "table_1"
table_1.Visible = True

'table_1.Printable.SaveToFile'                                         ? How to use this command for the .csv file creation ?
End Sub

 

 

Thanks for your help.

 

Regards.

 

 

8 REPLIES 8
Message 2 of 9
Rafal.Gaweda
in reply to: Anonymous


column_1 = I_TDT_VALUES ' ___________              Wich command will return x values? y values? z values?
column_2 = I_TDT_DEFAULT  '________                   Wich command will return shear effect value?
column_3 = I_TDT_PANEL ' ___________                 Wich command will return z displacements values?
'____________________________________                 ? How can i get shear effect or other results ?

First create such table (with these columns) manually in robot.

 

Use such \ similar script to find columns numbers:

 

Dim RT As RobotTable
Dim RTF As RobotTableFrame
Set RTF = Robapp.Project.ViewMngr.GetTable(1)

Set RT = RTF.Get(1)
For I = 1 To RT.ColCount
Cells(1, I) = RT.GetDataType(I)
Next I

 Then use these numbers in Table generation macro

 

Example:

 

Set RT = Robapp.Project.ViewMngr.CreateTable(I_TT_DYNAMIC, I_TDT_VALUES)
RT.AddColumn (257)

 


'table_1.Printable.SaveToFile'                                         ? How to use this command for the .csv file creation ?

There is no such option.

 

nocsv.jpg

 



Rafal Gaweda
Message 3 of 9

My comment to this part or Rafal's comment:

 

'table_1.Printable.SaveToFile' ? How to use this command for the .csv file creation ?
There is no such option.

 

 

Maybe you can create txt file, which is "semicolon separated", and you can make code to search+replace those semicolons with commas.

 

With Rafal's help I've managed to extract table data to external file.

I've posted my code here:

http://forums.autodesk.com/t5/Robot-Structural-Analysis/API-get-load-combination-properties/m-p/4596...

If this solved your issue, please Accept it as Solution help other forum users with similar issues to find answers easily.
  
Mirko Jurcevic


My blog: www.engipedia.com
Try my Revit add-ins: Autodesk App Store
Message 4 of 9

 

'table_1.Printable.SaveToFile' ? How to use this command for the .csv file creation ?
There is no such option.

 

TXT = CSV

 

csvf.jpg

 

 

Maybe you can create txt file, which is "semicolon separated", and you can make code to search+replace those semicolons with commas.

 

I do not think I is good idea or you have to change commas to dots firts - at least with my windows regional settings.

As far as I remember Decimal separator depends on windows system - be careful with changing

 

 

c#  

read the file to string then

 

string.Replace(";",",")

 

 



Rafal Gaweda
Message 5 of 9

Yes, txt = csv  (should change extension also).

 

I agree, I forgot about that comma and dot stuff depending on system settings.

However, C# string.Split(';') and string.Replace() methods can make good work if one should implement them wisely.

If this solved your issue, please Accept it as Solution help other forum users with similar issues to find answers easily.
  
Mirko Jurcevic


My blog: www.engipedia.com
Try my Revit add-ins: Autodesk App Store
Message 6 of 9
Message 7 of 9

Yes, I've already check it out, and used logic from it for my app.

But now I want to close that table, look at my last question here:

http://forums.autodesk.com/t5/Robot-Structural-Analysis/API-get-load-combination-properties/td-p/458...

If this solved your issue, please Accept it as Solution help other forum users with similar issues to find answers easily.
  
Mirko Jurcevic


My blog: www.engipedia.com
Try my Revit add-ins: Autodesk App Store
Message 8 of 9


But now I want to close that table, 

 

Checking it

 



Rafal Gaweda
Message 9 of 9
Rafal.Gaweda
in reply to: Rafal.Gaweda

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums