Hi,
I have to open 5 tables in hundred of files every day so maybe someone know the way how to open specyfic tables by using the button in excel.
I would be extremely grateful.
🙂
Solved! Go to Solution.
Solved by Stephane.kapetanovic. Go to Solution.
You can search the Forum and you will get a lot of info regarding this subject.
Try this and see if it helps you
Dim RobApp As IRobotApplication
Set RobApp = New RobotApplication
' open one model
Dim MyPath As String
MyPath = "c:\lixo\RS.rtd" 'Put your path or loop
RobApp.Project.Open MyPath
' Create Node Table
Dim rt As IRobotTable
Set rt = RobApp.Project.ViewMngr.CreateTable(I_TT_NODES, I_TDT_NODE)
rt.Select I_ST_NODE, "all"
rt.AddColumn (0) 'X
rt.AddColumn (1) 'Y
rt.AddColumn (2) 'Z
Dim OutPath
OutPath = "c:\lixo\RS.txt" 'Put your path or loop
rt.Printable.SaveToFile OutPath, I_OFF_TEXT
Set RobApp = Nothing
Regards
I'm sorry i caused confusion. I would like to open table window in robot program, without clicking right mouse button and pick Node, Bar tables. I would like to click in excel one button and Five different tables will open in my tab.
On the bottom of the screen:
View | Nodes | Reactions | Bars | Loads | Combinations <--- these are tabs
I don't want this tables in excel.
I want it here:
Maybe there is some setting file, where we can adjust tables which open automatically when program is opening.
I have a old version of RSA and there is some issue with tables creation by API and View Manager that is responsible for those tabs.
Set RobApp = New RobotApplication
' Create Node Table
Dim rt As IRobotTable
Set rt = RobApp.Project.ViewMngr.CreateTable(I_TT_NODES, I_TDT_NODE)
rt.Select I_ST_NODE, "all"
' check wich columns do you need
rt.AddColumn (0)
rt.AddColumn (1)
rt.AddColumn (2)
rt.Window.State = I_WS_NORMAL
rt.Visible = True
rt.UserControl = True
Set rt = RobApp.Project.ViewMngr.CreateTable(I_TT_BARS, I_TDT_BAR)
rt.Select I_ST_BAR, "all"
' check wich columns do you need
rt.AddColumn (10)
rt.AddColumn (11)
rt.AddColumn (12)
rt.Window.State = I_WS_NORMAL
rt.Visible = True
rt.UserControl = True
Set RobApp = Nothing
After running this code, if you go to window menu and choose cascade you can see the tables are open but don't appear on those tabs.
Maybe someone can give more insights in this problem or even have a solution.
Regards
try this
Private Sub OpeningSeveralTablesInRobot()
Dim RobApp As RobotApplication
Set RobApp = New RobotApplication
For Each Tbl In Array(IRobotTableType.I_TT_NODES, _
IRobotTableType.I_TT_BARS, _
IRobotTableType.I_TT_COMBINATIONS)
RobApp.Project.ViewMngr.CreateTable Tbl, I_TDT_DEFAULT
Next
Set RobApp = Nothing
End Sub
Best Regards
Can't find what you're looking for? Ask the community or share your knowledge.