adamkovacs1126
posted this
02 October 2018

Hi Sandeep,

I tried to do everything as you said and I get the following errors:

I tried to clear the solution and solve it again but I got the same error messages. Is there anything I did wrong?

These are the scripts that I wrote following yours:

Script 1

contact = CS_Contact.Find(_cid)

Script 2

contactForce = contact.GetOutputContactForce();

contactValues = contactForce.FillValuesThroughTime()

nbValues = contactValues.Length/7

fich=open(r"contactForce.csv",'w')

fich.write('Time,FX,FY,FZ,MX,MY,MZ\n')

for i in range(0, nbValues):

fich.write('{0:4.3f},{1:11.4e},{2:11.4e},{3:11.4e},{4:11.4e},{5:11.4e},

{6:11.4e}\n'.format(contactValues[i,0],contactValues[i,1],contactValues[i,2],contactValues[i,3],contactValues[i,4],contactValues[i,5],contactValues[i,6]))

fich.close()

Of course I will mark your answer as solution, I am just waiting for mine to work so the discussion can be closed

Thanks again and kind regards,

Adam