Exports the calculation results to an ASCII or binary table file.
Object.Export ( settings As ExportSettings )
Result.Export ( settings As ExportSettings, [quantities As FieldQuantities] )
Two objects - Model and Result have the Export method.
The settings parameter of ExportSettings type features following properties:
To adjust export settings it is needed to get the ExportSettings object using similarly named ExportSettings property of the Model object.
Set prb = QF.ActiveProblem
prb.LoadModel
Set mdl = prb.Model
Set expSet = mdl.ExportSettings
expSet.ExportMode = qfModeMesh
expSet.FilePath = "Magn1_ExportedMesh.txt"
mdl.Export expSet
The settings parameter of ExportSettings type features following properties:
To adjust export settings it is needed to get the ExportSettings object using similarly named ExportSettings property of the Result object.
The optional quantities parameter of FieldQuantities collection type may inlude the lists of desired local physical quantities to export.
If Not prb.Solved Then prb.SolveProblem
prb.AnalyzeResults
Set res = prb.Result
Set expSet = res.ExportSettings
With expSet
.FilePath = "_Exported_Grid.txt"
.ExportMode = qfModeGrid
.StepX = 1
.StepY = 0.5
End With
Set qList = res.LocalFieldQuantities
qList.Clear
qList.Add (qfPotential)
qList.Add (qfGrad)
qList.Add (qfKGradX)
qList.Add (qfKGradY)
res.Export expSet, qList
In this example, we first get the ExportSettings object using the same name property of the Results object. Then we configure ExportSettings object parameters: ExportMode, output file name, and rectangular grid steps. Then we get a collection of physical quantities qList using the LocalFieldQuantities property. Collection contains all the field values ??that can be calculated. We remove all items from collection ??(Clear method) and then add the ones we need: qfPotential, qfGrad, qfKGradX and qfKGradY.
Now all the necessary settings are made, and we can call the Export method with two parameters.