Ipart change value of a PartTablecell

Ipart change value of a PartTablecell

Ktelang
Collaborator Collaborator
515 Views
2 Replies
Message 1 of 3

Ipart change value of a PartTablecell

Ktelang
Collaborator
Collaborator

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
-----------------------------------------------------------------------------
0 Likes
516 Views
2 Replies
Replies (2)
Message 2 of 3

Ktelang
Collaborator
Collaborator

oiPartfactory.DefaultRow = oiPart2

 

Activated my new member

 

 

------------------------------------------------------------------------------
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
-----------------------------------------------------------------------------
0 Likes
Message 3 of 3

Ktelang
Collaborator
Collaborator

Thanks Sanjay

 

http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/how-to-update-the-active-row-value-of-...

/m-p/2357759#M26585

------------------------------------------------------------------------------
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
-----------------------------------------------------------------------------
0 Likes