SaurabhLondhe
Mechanical
- Nov 28, 2014
- 1
Hello All,
I am new to python.
I want to create a script for extracting contact pressure along a path.
Path type is node list, and the name and node numbers are provided via a text file.
Following is the code I wrote so far.
However I am getting error saying PthError: Incorrect data for path.
Any help will be appreciated.
Thanks in advance.
Regards,
Saurabh.
I am new to python.
I want to create a script for extracting contact pressure along a path.
Path type is node list, and the name and node numbers are provided via a text file.
Following is the code I wrote so far.
Python:
read_file=open("Node_Numbers.txt", "r")
lines=read_file.readlines()
str2find=","
for line in lines:
commaPosition=line.find(str2find)
listName=line[0:commaPosition]
nodeList= line[commaPosition+1:]
session.Path(name=listName, type=NODE_LIST, expression=(('PART-1-1', nodeList )))
read_file.close()
However I am getting error saying PthError: Incorrect data for path.
Any help will be appreciated.
Thanks in advance.
Regards,
Saurabh.