Custom Table script

Custom Table script

linas
Participant Participant
311 Views
4 Replies
Message 1 of 5

Custom Table script

linas
Participant
Participant

Hello!

I'm getting into scripts via Fusion API and my goal was to inject part numbers, description and quantity into custom tables (i'm doing that because i have a Fusion Add-in called JoinerCad and it has an another system of assigning material and so on). 

Now i found that adsk.drawing.CustomTable - add() ignores rowCount/columnCount,
updateCellData() always returns "Unknown exception"

And regardless of what was set on the input of CustomTable created via sheet.customTables.add(inp) always has rowCount=0 and columnCount=0. updateCellData(row, col, string) always returns "1 : Unknown exception".

 

If you have any info about or have succesfully put info into the custom table, would gladly hear from you 🙂 

I could also send you the code 🙂 

Thank you 

 

 

0 Likes
Accepted solutions (1)
312 Views
4 Replies
Replies (4)
Message 2 of 5

kandennti
Mentor
Mentor
Accepted solution

Hi @linas -san.

Unfortunately, the `adsk.drawing.CustomTable` property does not currently exist.
https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-CEC1BA2F-1AA7-4D7D-9C98-410637FEDB1E 

At present, there is very little support for Fusion 360's Drawing-related APIs.
However, I recall an Autodesk representative commenting earlier this year that they “plan to expand the Drawing API by the end of the year,” so support may improve in the future.

Message 3 of 5

linas
Participant
Participant

Hello kandennti!

Thank you for reply! I tried poking around what can the adsk.drawing object can offer in terms of table/custom table and you are right it is very limited in that sense! 😄 

I used these two methods: sheet.customTables.createInput() and sheet.customTables.add 

Lets hope its true and will expand on the Drawing API! 

0 Likes
Message 4 of 5

bhavani_sankuratri
Autodesk
Autodesk

Hi @linas 

I wanted to check in and see if you still needed assistance, or if you found a solution to your question already? Let us know if you need further assistance by providing an update or if you have found a solution, please share it with the community so other members who may have the same question could learn from your experience.
 

Bhavani Sankuratri | Community Manager
0 Likes
Message 5 of 5

linas
Participant
Participant

If anyone uses JoinerCAD plugin by any chance (because i needed a purchased items component table), i have found a way to create a custom table that pastes itself into the clipboard and all you need to do is CTRL+V 🙂 
Write me and i'll be happy to share the code 😄