import element inside a group using python
-
Hello,
I am trying to have an automated import of files in python.
I need import an obj file directly inside a s4l group.
I am able to do the action of importing and creating the group, separately, however I cannot move the elemt I imported inside the created group with python.
Can you help me?Thank you
-
Hello,
Can you please explain what happens when you try to "move the element you imported inside the created group"?
What error message do you get when you do something like:my_obj_list = s4l_v1.model.Import("my_file.sab") my_group = s4l_v1.model.CreateGroup() for my_obj in my_obj_list: my_group.Add(my_obj)
-
Thank you, Indeed using this lines it works, thank you!
Could I ask you, how can I save a matlab file with pyhon?
When I do this, I only add the exporter but I can't save the file in my folder, I have to refresh the exporter manuallyAdding a new MatlabExporter
inputs = [field_interpolation_filter.Outputs["EM E(x,y,z,f0)"]] matlab_exporter = analysis.exporters.MatlabExporter(inputs=inputs) matlab_exporter.UpdateAttributes() document.AllAlgorithms.Add(matlab_exporter)
Thank you for your help