cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Family Table - SetCell() using vb.net

hemant.pawar
1-Visitor

Family Table - SetCell() using vb.net

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


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
2 REPLIES 2

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

Announcements


Top Tags