How do I add a sum/total cell to a table through API?
How do I add a sum/total cell to a table through API?
(OP)
I've got code that creates a drawing, inserts views, and inserts a table (not excel based) and adds a row to the bottom... now i need it to add a sum/total cell to a column, but i can't find how, or if it's even possible...
anyone done this successfully before?
anyone done this successfully before?






RE: How do I add a sum/total cell to a table through API?
RE: How do I add a sum/total cell to a table through API?
Regards,
Scott Baugh, CSWP
3DVision Technologies
www.3dvisiontech.com
www.scottjbaugh.com
FAQ731-376
FAQ559-716 - SW Fora Users
RE: How do I add a sum/total cell to a table through API?
RE: How do I add a sum/total cell to a table through API?
RE: How do I add a sum/total cell to a table through API?
Chapter 10 - Page 10-16
Regards,
Scott Baugh, CSWP
3DVision Technologies
www.3dvisiontech.com
www.scottjbaugh.com
FAQ731-376
FAQ559-716 - SW Fora Users
RE: How do I add a sum/total cell to a table through API?
could it be part of another reference that i don't have installed? how would i know what i need activated?
as far as i can tell, it's not possible to make a cell a sum/total cell through API...
RE: How do I add a sum/total cell to a table through API?
why is the macro recorder such a piece of crap?
RE: How do I add a sum/total cell to a table through API?
Regards,
Scott Baugh, CSWP
3DVision Technologies
www.3dvisiontech.com
www.scottjbaugh.com
FAQ731-376
FAQ559-716 - SW Fora Users
RE: How do I add a sum/total cell to a table through API?
i'm quite convinced this isn't built into the API. should be, though.
RE: How do I add a sum/total cell to a table through API?
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim DwgDoc As SldWorks.ModelDoc2
Dim swSheet As SldWorks.Sheet
Dim swRevTable As SldWorks.TableAnnotation
Dim Msg As String
Dim nRow As Long
Dim nCol As Long
Dim nSum As Long
Sub Main()
Set swApp = Application.SldWorks
Set DwgDoc = swApp.ActiveDoc
Set swSheet = DwgDoc.GetCurrentSheet
Set swRevTable = swSheet.RevisionTable
nSum = 0
nCol = 3
For nRow = 1 To swRevTable.RowCount - 2
nSum = nSum + CLng(swRevTable.Text(nRow, nCol))
Next nRow
swRevTable.Text(swRevTable.RowCount - 1, nCol) = CStr(nSum)
End Sub
RE: How do I add a sum/total cell to a table through API?
RE: How do I add a sum/total cell to a table through API?
Evan T. Basalik, MCSD
--------------------------------
It's all about prioritization...
RE: How do I add a sum/total cell to a table through API?
h