Error with DPF operator: stl_export

Options
Mike.Thompson
Mike.Thompson Member, Employee Posts: 280
First Anniversary First Comment 5 Likes Ansys Employee

I am getting an error with stl export operator. Any ideas why? The mesh region is found fine with the mesh_provider op, but the stl export fails with: Could not find the specified Output Type

import mech_dpf
import Ans.DataProcessing as dpf my_file_path=r'C:\Users\mthompso\MyData\test.stl'
dataSource = dpf.DataSources(Model.Analyses[0].ResultFileName) op = dpf.operators.mesh.mesh_provider() # operator instantiation
op.inputs.data_sources.Connect(dataSource)
my_mesh = op.outputs.mesh.GetData() op = dpf.operators.mesh.stl_export() # operator instantiation
op.inputs.mesh.Connect(my_mesh)
op.inputs.file_path.Connect(my_file_path)
stl = op.outputs.data_sources.GetData()

Tagged:

Best Answer

  • Lea PARADIS
    Lea PARADIS Member, Employee Posts: 2
    Ansys Employee First Answer Name Dropper First Comment
    edited August 2023 Answer ✓
    Options

    I've created a PR to fix that bug.

    Meanwhile, note that you can use "op.Run()" instead of "stl = op.outputs.data_sources.GetData()". 

Answers