Ipart change value of a PartTablecell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Everyone,
I will thank Brian Ekins and Wayne Brill, for posting informative AU classes on API.
As those classes helped me start thinking in a right direction.
I am still new to API and trying to find a way through. Hope experts out there might
extend me a hand to move ahead.
I am trying to write a small API which will create a new ipart row
and then change a value of one of the cell in new row
Public Sub ipart()
Dim oApp As Application
Set oApp = ThisApplication
' Get the active document.
Dim oPDoc As PartDocument
Set oPDoc = oApp.ActiveDocument
' Get the Component definition of active document.
Dim oCompdef As PartComponentDefinition
Set oCompdef = oPDoc.ComponentDefinition
Dim oiPartfactory As iPartfactory
Set oiPartfactory = oCompdef.iPartfactory
Dim oPartName As String
oPartName = oiPartfactory.TableRows.Item(1).PartName
Dim oiPart As iPartTableRow
Set oiPart = oiPartfactory.TableRows.Item(1)
Dim oThk As iPartTableColumn
Set oThk = oiPartfactory.TableColumns.Item(3)
Dim oiPart2 As iPartTableRow
Set oiPart2 = oiPart.Copy
'Dim oChange As iPartTableCell
'Set oChange =
MsgBox oPartName
End Sub
Thanks in advance
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
-----------------------------------------------------------------------------