Setting Design table value through Macro
Setting Design table value through Macro
(OP)
Hi,
I was trying to edit Design table value through macro.
I used SetEntryValue method under Designtable object.
DT.SetEntryValue(7, 3, False, cellvalue)
* DT is deisgntable object
Its giving me a compile error.
I have written the code as per syntax.
Can anyone help me on this.
Regards,
Vinay
I was trying to edit Design table value through macro.
I used SetEntryValue method under Designtable object.
DT.SetEntryValue(7, 3, False, cellvalue)
* DT is deisgntable object
Its giving me a compile error.
I have written the code as per syntax.
Can anyone help me on this.
Regards,
Vinay






RE: Setting Design table value through Macro
The following line is correct:
DT.SetEntryValue 7, 3, False, cellvalue
Artem Taturevich, CSWP
Software and Design Engineer
AMCBridge LLC
www.amcbridge.com
RE: Setting Design table value through Macro
I am not getting compile error now.
But I am not able to edit the designtable with this API.
Follwing is the bit of the code I am using,
DT.EditTable2 (True)
DT.SetEntryValue 49, 3, False, cellvalue
Doc.CloseFamilyTable
Regards,
Vinay
RE: Setting Design table value through Macro
DT.EditTable2 True
You seem to be troubled a bit by VB syntax. It's one of those odd things in VB. If you are requesting a return value, you need parentheses like any other function. If not, no parentheses.
Example:
CODE
CODE
re: "void"
The word void by a command in the SW API help indicates that there is no return value, therefore you should not use parentheses to enclose arguments EVER.
http://www.EsoxRepublic.com-SolidWorks API VB programming help
RE: Setting Design table value through Macro
Regards,
Vinay
RE: Setting Design table value through Macro
As a workaround you can use diret Excel API for editing the table.
Artem Taturevich, CSWP
Software and Design Engineer
AMCBridge LLC
www.amcbridge.com