0
파이썬에서 스크립트를 만들려고했으나 작동하지 않습니다.Abaqus에서 모달 정보를 파이썬으로 추출하기
오류는 라인 fichier = open('results.txt','w')
에 관한 것이지만 어디에서 실수인지 이해할 수 없습니다. 이 문제에 대한 해결책에 대해 알고 있습니까?
내 코드는 다음과 같습니다 라인
from odbAccess import *
from abaqus import *
from abaqusConstants import *
import types
import visualization
from math import *
from odbMaterial import *
from odbSection import *
frame_k=[]
odb=openOdb(path='demoplaque.odb','r') # opens database with specified name
for k in range (len(odb.steps['modal'].frames)):
frame_k.append(odb.steps['modal'].frames[k]
fichier = open('results.txt','w')
i=0
for data in frame_k:
if str(data) != '[]':
fichier.write(str(data))
i=i+1
fichier.write('\n')
fichier.close()
문제가 무엇입니까? –
Abaqus는 fichier = open ('results.txt', 'w') 행에 구문이 유효하지 않다고 알려 줬습니다. – user3480888