Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

PthError: Incorrect data for path

Status
Not open for further replies.

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.

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor