Hi all.
I try to make the python script with the macro.
As you know, the funtion of macro manager can record the every acticvity in python script. But this script work on the macro manager only. I want to make this script work on the run script menu.
The error message was done when I try to run the macro script.
Message says "C:/Temp/abaqusMacros.py :56: SyntaxWarning: import * only allowed at module level
def analzer2():
C:/Temp/abaqusMacros.py :56: SyntaxWarning: import * only allowed at module level
def analzer2():"
Following codes are the macro script what I try to transfer.
Plz help me.
I try to make the python script with the macro.
As you know, the funtion of macro manager can record the every acticvity in python script. But this script work on the macro manager only. I want to make this script work on the run script menu.
The error message was done when I try to run the macro script.
Message says "C:/Temp/abaqusMacros.py :56: SyntaxWarning: import * only allowed at module level
def analzer2():
C:/Temp/abaqusMacros.py :56: SyntaxWarning: import * only allowed at module level
def analzer2():"
Following codes are the macro script what I try to transfer.
Plz help me.
Code:
# Do not delete the following import lines
from abaqus import *
from abaqusConstants import *
import __main__
def analyzer():
import section
import regionToolset
import displayGroupMdbToolset as dgm
import part
import material
import assembly
import step
import interaction
import load
import mesh
import job
import sketch
import visualization
import xyPlot
import displayGroupOdbToolset as dgo
import connectorBehavior
o1 = session.openOdb(name='C:/Temp/1.odb')
session.viewports['Viewport: 1'].setValues(displayedObject=o1)
import sys
sys.path.insert(11, r'C:\SIMULIA\Abaqus\6.10-1\abaqus_plugins\reportGenerator')
from abaqus import *
from abaqusConstants import *
import form
import reportGenerator
report=reportGenerator.ReportGenerator()
report.setValues('C:/Temp/1.odb', interactionAdditionalFigure=r"(, , )",
logo=r"*.gif", styleSheet=r"*.css", includeXYData=1,
outputVariableList=r"(, , , , )", outputVariableView=r"(, , , , )",
resultsXYData=r"(, , , , )", resultsAdditionalFigure=r"(, , , , )",
userName=r"", includeUsername=1, includeTOC=1, includeLoadData=1,
includeResultsData=1, includeStepData=1, imageStyle=r"INLINE",
includeInteractionData=1, includePartData=1, includeJobData=1,
includeAssemblyData=1, includeMaterialData=1, outputDir=r"C:\Temp",
reportTitle=r"Report Generated by 'Abaqus Report Generator'",
instanceFigureTop=1, instanceFigureBottom=0, instanceFigureUser2=0,
instanceFigureUser1=0, instanceFigureUser3=0, instanceFigureFront=1,
instanceThreeDXML=1, imageTogether=r"TOGETHER", instanceFigureIso=1,
instanceFigureLeft=0, instanceFigureRight=0,
instanceList=r"(ALL, , , , )", instanceFigureUser4=0,
includeInstanceTable=1, instanceAdditionalFigure=r"(, , , , )",
materialFigureBottom=0, materialFigureFront=1, materialFigureUser1=0,
materialFigureUser3=0, materialFigureUser2=0, materialFigureRight=0,
materialFigureTop=1, materialFigureUser4=0, materialFigureIso=1,
includeMaterialDetails=1, materialThreeDXML=1,
materialAdditionalFigure=r"(, , )", includeMaterialTable=1,
materialFigureLeft=0, loadAdditionalFigure=r"(, , )", )
report.processRequest()
Comment