Open Quantity Survey Table via API and copying to Excel

anacffaria
Enthusiast
Enthusiast

Open Quantity Survey Table via API and copying to Excel

anacffaria
Enthusiast
Enthusiast

Hi everyone!

I'm looking to copy the quantity survey table to a new excel file (and save it as .txt/.csv) and also, if possible copy it to my current worksheet.
I already understood how to dump tables (via another piece of vba code that I found on the forum) but that one dumps all the opened tables, while in my situation I don't have any tables opened and I want to open the Quantity Survey and copy it!

Thanks in advance for any help.

Ana

0 Likes
Reply
Accepted solutions (1)
665 Views
4 Replies
Replies (4)

anacffaria
Enthusiast
Enthusiast

To add more detail.
I want my vba code to be able to export the table to a csv like in the example file (Quantity Survey.csv) and to paste the table (as is) in another excel worksheet (example.jpg) as I'm trying to do a report for every model that I have.

I'm using and already existant vba code that I found on the forum in this thread: https://forums.autodesk.com/t5/robot-structural-analysis-forum/api-macro-for-dumping-all-opened-tabl...

But that vba dumps already "opened" tables in Robot. In my case I need to require the Quantity Survey table to be "opened" via API or know a calling method to extract such table specifically, which I don't!
I'm asking for help in that regard!

Thanks for any help

0 Likes

Rafal.Gaweda
Autodesk Support
Autodesk Support
Accepted solution

Hi @anacffaria 

 

Example code:

Dim RobApp As RobotApplication
Set RobApp = New RobotApplication
Dim t As RobotTable

Set t = RobApp.Project.ViewMngr.CreateTable(I_TT_MEASURE, I_TDT_VALUES)


Rafal Gaweda
0 Likes

anacffaria
Enthusiast
Enthusiast

Thank you @Rafal.Gaweda 

0 Likes

Anonymous
Not applicable

Hi @Rafal.Gaweda,

 

Although I use the same code, the error 13 still pop up. The table was created in Robot, but the code was stopped with this error. do you have any idea about that?

 

suiking_yu_1-1624611346952.png

 

Thanks,

 

 

 

0 Likes