Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove non model names #3596

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions pyaedt/modeler/cad/Primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,7 @@ def model_objects(self):
@property
def non_model_objects(self):
"""List of objects of all non-model objects."""
return self._get_model_objects(model=False)

@property
def non_model_names(self):
"""List of names of all non-model objects."""
return self.oeditor.GetObjectsInGroup("Non Model")
return list(self.oeditor.GetObjectsInGroup("Non Model"))

@property
def model_consistency_report(self):
Expand Down Expand Up @@ -2172,7 +2167,7 @@ def get_bodynames_from_position(self, position, units=None, include_non_model=Tr
vArg1.append("ZPosition:="), vArg1.append(ZCenter)
list_of_bodies = list(self.oeditor.GetBodyNamesByPosition(vArg1))
if not include_non_model:
non_models = [i for i in self.non_model_names]
non_models = [i for i in self.non_model_objects]
list_of_bodies = [i for i in list_of_bodies if i not in non_models]
return list_of_bodies

Expand Down
2 changes: 1 addition & 1 deletion pyaedt/modules/PostProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3416,7 +3416,7 @@ def export_model_obj(self, obj_list=None, export_path=None, export_as_single_obj
export_path = self._app.working_directory
if not obj_list:
self._app.modeler.refresh_all_ids()
non_model = self._app.modeler.non_model_names[:]
non_model = self._app.modeler.non_model_objects[:]
obj_list = [i for i in self._app.modeler.object_names if i not in non_model]
if not air_objects:
obj_list = [
Expand Down
Loading