Working with meshes
Use DPF mesh objects to inspect nodes, elements, and connectivity from the active Mechanical analysis.
Was this page helpful?
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import mech_dpf
import Ans.DataProcessing as dpf
mech_dpf.setExtAPI(ExtAPI)
analysis = ExtAPI.DataModel.Project.Model.Analyses[0]
ds = dpf.DataSources()
ds.SetResultFilePath(analysis.ResultFileName)
model = dpf.Model(ds)
mesh = model.Mesh
print("Nodes: {0}".format(mesh.Nodes.Count))
print("Elements: {0}".format(mesh.Elements.Count))
Was this page helpful?