Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Dear All,
I am trying to set values in family table using vb.net
I can get access to family table.
But Couldn't get a access to column and row.
Please if any one has code for setting value in particular cell of family table using vb.net.
Regards,
Hemant
Hi,
I am not able to have a look to the API doc at the moment, but it should work the following way (code for VB .NET not for VBA4Office):
' -------------------------------------------------------------------------------------------------------------
'Please assure that you have the Session handle defined (here 'Session'):
Dim RowArr As IpfcFamilyTableRows
Dim ColArr As IpfcFamilyTableColumns
Dim hCol As IpfcFamilyTableColumn
Dim hRow As IpfcFamilyTableRow
Dim hCurMdl As IpfcModel
Dim hVal As CpfcParamValue
hCurMdl = Session.CurrentModel
RowArr = hCurMdl.ListRows()
ColArr = hCurMdl.ListColumns()
' wewant to get cell in row number 4 andcolumn 2:
hCol = ColArr (2)
hRow =RowArr (4)
' we want to set the cell value to double value 123.4:
hVal=(New CMpfcModelItem).CreateDoubleParamValue (123.4)
SetCell (hCol, hRow, hVal)
' ---------------------------------------------------
Hope that helps.
Andreas
__________________________________
Andreas Hellmann
MCAD Services Pro/E & Pro/E customization
Rudolf-Diesel-Str. 6
D-65439 Floersheim / Germany
phone: +49 6145 598296
mail: -
Hi Andreas,
I have used your above setcell coding, its working. Thnks lot.
I want to modify or edit the instance name in the family table, i tried with get instance name only.
Please help me, how to do further process in instance name changing.
Thnks
Balaji.S